From 2e71117f59e0ae6106930e705ae6a54a9839281b Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 23 Dec 2021 15:17:36 -0300 Subject: deposit from wallet webex: wip --- .../src/wallet/BalancePage.tsx | 42 ++-- .../src/wallet/DepositPage.stories.tsx | 52 +++++ .../src/wallet/DepositPage.tsx | 234 +++++++++++++++++++++ .../src/wallet/Transaction.tsx | 10 +- 4 files changed, 318 insertions(+), 20 deletions(-) create mode 100644 packages/taler-wallet-webextension/src/wallet/DepositPage.stories.tsx create mode 100644 packages/taler-wallet-webextension/src/wallet/DepositPage.tsx (limited to 'packages/taler-wallet-webextension/src/wallet') diff --git a/packages/taler-wallet-webextension/src/wallet/BalancePage.tsx b/packages/taler-wallet-webextension/src/wallet/BalancePage.tsx index 0a8910646..52edbbe51 100644 --- a/packages/taler-wallet-webextension/src/wallet/BalancePage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/BalancePage.tsx @@ -24,7 +24,9 @@ import * as wxApi from "../wxApi"; export function BalancePage({ goToWalletManualWithdraw, + goToWalletDeposit, }: { + goToWalletDeposit: (currency: string) => void; goToWalletManualWithdraw: () => void; }): VNode { const state = useAsyncAsHook(wxApi.getBalance); @@ -33,6 +35,7 @@ export function BalancePage({ balance={state} Linker={PageLink} goToWalletManualWithdraw={goToWalletManualWithdraw} + goToWalletDeposit={goToWalletDeposit} /> ); } @@ -41,12 +44,14 @@ export interface BalanceViewProps { balance: HookResponse; Linker: typeof PageLink; goToWalletManualWithdraw: () => void; + goToWalletDeposit: (currency: string) => void; } export function BalanceView({ balance, Linker, goToWalletManualWithdraw, + goToWalletDeposit, }: BalanceViewProps): VNode { if (!balance) { return
Loading...
; @@ -65,28 +70,35 @@ export function BalanceView({ } if (balance.response.balances.length === 0) { return ( -

- - - You have no balance to show. Need some{" "} - help getting started? - -

- - Withdraw - -
- -

+ +

+ + + You have no balance to show. Need some{" "} + help getting started? + + +

+
+
+ + Withdraw + +
+
); } return (
- +
-