diff options
author | Sebastian <sebasjm@gmail.com> | 2021-09-27 13:06:50 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-09-27 13:06:50 -0300 |
commit | b1bf3538e62a3cc22a436cfc5041c07a2c5e32e9 (patch) | |
tree | 418d1f85392fd047888749c3dfec6657187b7eb9 /packages/taler-wallet-webextension/src/cta/Pay.stories.tsx | |
parent | 8cde98947ba1a6d8c7928578b053786c4e5db17f (diff) | |
download | wallet-core-b1bf3538e62a3cc22a436cfc5041c07a2c5e32e9.tar.xz |
some ui fixing from belen comments
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Pay.stories.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Pay.stories.tsx | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Pay.stories.tsx b/packages/taler-wallet-webextension/src/cta/Pay.stories.tsx index 3ca30ccb2..622e7950f 100644 --- a/packages/taler-wallet-webextension/src/cta/Pay.stories.tsx +++ b/packages/taler-wallet-webextension/src/cta/Pay.stories.tsx @@ -30,7 +30,7 @@ export default { }, }; -export const InsufficientBalance = createExample(TestedComponent, { +export const NoBalance = createExample(TestedComponent, { payStatus: { status: PreparePayResultType.InsufficientBalance, noncePriv: '', @@ -46,6 +46,27 @@ export const InsufficientBalance = createExample(TestedComponent, { } }); +export const NoEnoughBalance = createExample(TestedComponent, { + payStatus: { + status: PreparePayResultType.InsufficientBalance, + noncePriv: '', + proposalId: "proposal1234", + contractTerms: { + merchant: { + name: 'someone' + }, + summary: 'some beers', + amount: 'USD:10', + } as Partial<ContractTerms> as any, + amountRaw: 'USD:10', + }, + balance: { + currency: 'USD', + fraction: 40000000, + value: 9 + } +}); + export const PaymentPossible = createExample(TestedComponent, { uri: 'taler://pay/merchant-backend.taler/2021.242-01G2X4275RBWG/?c=66BE594PDZR24744J6EQK52XM0', payStatus: { @@ -66,6 +87,26 @@ export const PaymentPossible = createExample(TestedComponent, { } }); +export const PaymentPossibleWithFee = createExample(TestedComponent, { + uri: 'taler://pay/merchant-backend.taler/2021.242-01G2X4275RBWG/?c=66BE594PDZR24744J6EQK52XM0', + payStatus: { + status: PreparePayResultType.PaymentPossible, + amountEffective: 'USD:10.20', + amountRaw: 'USD:10', + noncePriv: '', + contractTerms: { + nonce: '123213123', + merchant: { + name: 'someone' + }, + amount: 'USD:10', + summary: 'some beers', + } as Partial<ContractTerms> as any, + contractTermsHash: '123456', + proposalId: 'proposal1234' + } +}); + export const AlreadyConfirmedWithFullfilment = createExample(TestedComponent, { payStatus: { status: PreparePayResultType.AlreadyConfirmed, @@ -102,3 +143,22 @@ export const AlreadyConfirmedWithoutFullfilment = createExample(TestedComponent, paid: false, } }); + +export const AlreadyPaid = createExample(TestedComponent, { + payStatus: { + status: PreparePayResultType.AlreadyConfirmed, + amountEffective: 'USD:10', + amountRaw: 'USD:10', + contractTerms: { + merchant: { + name: 'someone' + }, + fulfillment_message: 'congratulations! you are looking at the fulfillment message! ', + summary: 'some beers', + amount: 'USD:10', + } as Partial<ContractTerms> as any, + contractTermsHash: '123456', + proposalId: 'proposal1234', + paid: true, + } +}); |