Skip to content

Instantly share code, notes, and snippets.

View Taump's full-sized avatar
💪
Not give up is my magic

Alexander Ponomarev Taump

💪
Not give up is my magic
View GitHub Profile
@Taump
Taump / .env
Created April 21, 2020 07:24
REACT CREATE APP ENV for ESLINT
EXTEND_ESLINT=true
@Taump
Taump / tokens.md
Created September 2, 2020 15:14 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
const my_share = inputRedeem * 10 ** reserve_asset_decimals / fund_state.shares_supply;
const reserve_amount = Math.floor(my_share * fund_balance?.[reserve_asset]);
const t1_amount = Math.floor(my_share * p1Balance);
const exchange = t1_amount && $get_exchange_result(obj);
const you_get_in_full_units = (reserve_amount - exchange.reserve_needed - (reserve_asset === "base" ? 4000 : 0));
const you_get = you_get_in_full_units / 10 ** reserve_asset_decimals;
const fee_percent = (exchange.fee / you_get_in_full_units) * 100;
This file has been truncated, but you can view the full file.
{
"data": {
"unstable_mc_joints": [
{
"unit": {
"version": "3.0t",
"alt": "2",
"messages": [
{
"app": "payment",