From 7a2fe8018faa4666ff681072682f16f8fb1bfc13 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 4 May 2022 16:25:53 -0300 Subject: add age restriction option to withdraw cta --- .../src/wallet/DeveloperPage.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx') diff --git a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx index 829e60b44..c4725a8d7 100644 --- a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx @@ -81,6 +81,7 @@ export function DeveloperPage(): VNode { type CoinsInfo = CoinDumpJson["coins"]; type CalculatedCoinfInfo = { + ageKeysCount: number | undefined; denom_value: number; remain_value: number; status: string; @@ -132,11 +133,13 @@ export function View({ const money_by_exchange = coins.reduce( (prev, cur) => { const denom = Amounts.parseOrThrow(cur.denom_value); + console.log(cur); if (!prev[cur.exchange_base_url]) { prev[cur.exchange_base_url] = []; currencies[cur.exchange_base_url] = denom.currency; } prev[cur.exchange_base_url].push({ + ageKeysCount: cur.ageCommitmentProof?.proof.privateKeys.length, denom_value: parseFloat(Amounts.stringifyValue(denom)), remain_value: parseFloat( Amounts.stringifyValue(Amounts.parseOrThrow(cur.remaining_value)), @@ -305,7 +308,7 @@ function ShowAllCoins({

{ex}: {total} {currencies[ex]}

-

+

setCollapsedUnspent(true)}> usable coins @@ -313,7 +316,7 @@ function ShowAllCoins({ {collapsedUnspent ? (

setCollapsedUnspent(false)}>click to show
) : ( - setCollapsedUnspent(true)}> +
+ {coins.usable.map((c, idx) => { return ( @@ -339,12 +345,13 @@ function ShowAllCoins({ + ); })}
id @@ -330,6 +333,9 @@ function ShowAllCoins({ from refresh? + age key count +
{c.remain_value} {c.status} {c.from_refresh ? "true" : "false"}{String(c.ageKeysCount)}
)} -

+

setCollapsedSpent(true)}> spent coins

{collapsedSpent ? ( @@ -352,7 +359,7 @@ function ShowAllCoins({ click to show ) : ( - setCollapsedSpent(true)}> +
id -- cgit v1.2.3