summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-09-08 15:30:32 -0300
committerSebastian <sebasjm@gmail.com>2021-09-08 15:35:44 -0300
commit217f34397f95fc988280eee9c376efe0781c69ea (patch)
tree8cfb4011a7ddcb7409b7617ec8ac1425d08b1512 /packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx
parenta72ec5971e7c65e13a22627fc52983b75d4bea71 (diff)
downloadwallet-core-217f34397f95fc988280eee9c376efe0781c69ea.tar.gz
wallet-core-217f34397f95fc988280eee9c376efe0781c69ea.tar.bz2
wallet-core-217f34397f95fc988280eee9c376efe0781c69ea.zip
first approach to new design for withdraw
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx34
1 files changed, 25 insertions, 9 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx
index 747f855f..a89a18c1 100644
--- a/packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Withdraw.stories.tsx
@@ -19,6 +19,9 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
+import { amountFractionalBase, Amounts } from '@gnu-taler/taler-util';
+import { ExchangeRecord } from '@gnu-taler/taler-wallet-core';
+import { ExchangeWithdrawDetails } from '@gnu-taler/taler-wallet-core/src/operations/withdraw';
import { createExample } from '../test-utils';
import { View as TestedComponent } from './Withdraw';
@@ -30,16 +33,29 @@ export default {
},
};
-export const CompleteWithExchange = createExample(TestedComponent, {
+export const WithdrawWithFee = createExample(TestedComponent, {
details: {
- amount: 'USD:2',
- possibleExchanges: [],
- },
- selectedExchange: 'Some exchange'
+ exchangeInfo: {
+ baseUrl: 'exchange.demo.taler.net'
+ } as ExchangeRecord,
+ withdrawFee: {
+ currency: 'USD',
+ fraction: amountFractionalBase*0.5,
+ value: 0
+ },
+ } as ExchangeWithdrawDetails,
+ amount: 'USD:2',
})
-export const CompleteWithoutExchange = createExample(TestedComponent, {
+export const WithdrawWithoutFee = createExample(TestedComponent, {
details: {
- amount: 'USD:2',
- possibleExchanges: [],
- },
+ exchangeInfo: {
+ baseUrl: 'exchange.demo.taler.net'
+ } as ExchangeRecord,
+ withdrawFee: {
+ currency: 'USD',
+ fraction: 0,
+ value: 0
+ },
+ } as ExchangeWithdrawDetails,
+ amount: 'USD:2',
})