From fb22009ec4799a624f00c228fbd7435b44c1cbac Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 10 Jan 2022 16:04:53 -0300 Subject: deposit design from belen, feature missing: kyc --- .../src/components/BalanceTable.tsx | 28 ++++++++-------------- 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'packages/taler-wallet-webextension/src/components/BalanceTable.tsx') diff --git a/packages/taler-wallet-webextension/src/components/BalanceTable.tsx b/packages/taler-wallet-webextension/src/components/BalanceTable.tsx index 05a7d28dd..c69625cd2 100644 --- a/packages/taler-wallet-webextension/src/components/BalanceTable.tsx +++ b/packages/taler-wallet-webextension/src/components/BalanceTable.tsx @@ -14,31 +14,28 @@ TALER; see the file COPYING. If not, see */ -import { amountFractionalBase, Amounts, Balance } from "@gnu-taler/taler-util"; +import { Amounts, amountToPretty, Balance } from "@gnu-taler/taler-util"; import { h, VNode } from "preact"; -import { - ButtonPrimary, - TableWithRoundRows as TableWithRoundedRows, -} from "./styled"; +import { TableWithRoundRows as TableWithRoundedRows } from "./styled"; export function BalanceTable({ balances, - goToWalletDeposit, + goToWalletHistory, }: { balances: Balance[]; - goToWalletDeposit: (currency: string) => void; + goToWalletHistory: (currency: string) => void; }): VNode { - const currencyFormatter = new Intl.NumberFormat("en-US"); return ( {balances.map((entry, idx) => { const av = Amounts.parseOrThrow(entry.available); - const v = currencyFormatter.format( - av.value + av.fraction / amountFractionalBase, - ); return ( - + goToWalletHistory(av.currency)} + style={{ cursor: "pointer" }} + > {av.currency} - {v} - - - goToWalletDeposit(av.currency)}> - Deposit - + {Amounts.stringifyValue(av)} ); -- cgit v1.2.3