Debug tools:
Coins:
{Object.keys(money_by_exchange).map((ex) => { const allcoins = money_by_exchange[ex]; allcoins.sort((a, b) => { return b.denom_value - a.denom_value; }); const coins = allcoins.reduce( (prev, cur) => { if (cur.remain_value > 0) prev.usable.push(cur); if (cur.remain_value === 0) prev.spent.push(cur); return prev; }, { spent: [], usable: [], } as SplitedCoinInfo, ); returnPending operations
{JSON.stringify(o, undefined, 2)}
{ex}: {total} {currencies[ex]}
usable coins
{collapsedUnspent ? (id | denom | value | status | from refresh? |
{c.id.substring(0, 5)} | {c.denom_value} | {c.remain_value} | {c.status} | {c.from_refresh ? "true" : "false"} |
spent coins
{collapsedSpent ? (id | denom | value | status | refresh? |
{c.id.substring(0, 5)} | {c.denom_value} | {c.remain_value} | {c.status} | {c.from_refresh ? "true" : "false"} |