diff options
author | Sebastian <sebasjm@gmail.com> | 2023-07-03 12:43:47 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-07-03 12:43:47 -0300 |
commit | 545bf16cdfa824778c1450e64eaea236b9d81c49 (patch) | |
tree | 1cb94d8166a879e40ae237606658e0f4e7d4755b /packages/taler-wallet-webextension/src/cta/Payment | |
parent | 5d76573ac054c4204e95a26dc286eb0af1f2d10d (diff) | |
download | wallet-core-545bf16cdfa824778c1450e64eaea236b9d81c49.tar.xz |
fix #7741
show QR with nonce
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Payment')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Payment/stories.tsx | 20 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Payment/views.tsx | 4 |
2 files changed, 13 insertions, 11 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Payment/stories.tsx b/packages/taler-wallet-webextension/src/cta/Payment/stories.tsx index 6572d1fd3..f030fa219 100644 --- a/packages/taler-wallet-webextension/src/cta/Payment/stories.tsx +++ b/packages/taler-wallet-webextension/src/cta/Payment/stories.tsx @@ -61,7 +61,7 @@ export const NoEnoughBalanceAvailable = tests.createExample(BaseView, { feeGapEstimate: "USD:1", }, talerUri: "taler://pay/..", - noncePriv: "", + proposalId: "96YY92RQZGF3V7TJSPN4SF9549QX7BRF88Q5PYFCSBNQ0YK4RPK0", contractTerms: { merchant: { @@ -101,7 +101,7 @@ export const NoEnoughBalanceMaterial = tests.createExample(BaseView, { feeGapEstimate: "USD:1", }, talerUri: "taler://pay/..", - noncePriv: "", + proposalId: "96YY92RQZGF3V7TJSPN4SF9549QX7BRF88Q5PYFCSBNQ0YK4RPK0", contractTerms: { merchant: { @@ -141,7 +141,7 @@ export const NoEnoughBalanceAgeAcceptable = tests.createExample(BaseView, { feeGapEstimate: "USD:1", }, talerUri: "taler://pay/..", - noncePriv: "", + proposalId: "96YY92RQZGF3V7TJSPN4SF9549QX7BRF88Q5PYFCSBNQ0YK4RPK0", contractTerms: { merchant: { @@ -182,7 +182,7 @@ export const NoEnoughBalanceMerchantAcceptable = tests.createExample(BaseView, { feeGapEstimate: "USD:1", }, talerUri: "taler://pay/..", - noncePriv: "", + proposalId: "96YY92RQZGF3V7TJSPN4SF9549QX7BRF88Q5PYFCSBNQ0YK4RPK0", contractTerms: { merchant: { @@ -224,7 +224,7 @@ export const NoEnoughBalanceMerchantDepositable = tests.createExample( feeGapEstimate: "USD:1", }, talerUri: "taler://pay/..", - noncePriv: "", + proposalId: "96YY92RQZGF3V7TJSPN4SF9549QX7BRF88Q5PYFCSBNQ0YK4RPK0", contractTerms: { merchant: { @@ -265,7 +265,7 @@ export const NoEnoughBalanceFeeGap = tests.createExample(BaseView, { feeGapEstimate: "USD:1", }, talerUri: "taler://pay/..", - noncePriv: "", + proposalId: "96YY92RQZGF3V7TJSPN4SF9549QX7BRF88Q5PYFCSBNQ0YK4RPK0", contractTerms: { merchant: { @@ -302,7 +302,7 @@ export const PaymentPossible = tests.createExample(BaseView, { talerUri: "taler://pay/..", amountEffective: "USD:10", amountRaw: "USD:10", - noncePriv: "", + contractTerms: { nonce: "123213123", merchant: { @@ -342,7 +342,7 @@ export const PaymentPossibleWithFee = tests.createExample(BaseView, { talerUri: "taler://pay/..", amountEffective: "USD:10.20", amountRaw: "USD:10", - noncePriv: "", + contractTerms: { nonce: "123213123", merchant: { @@ -379,7 +379,7 @@ export const TicketWithAProductList = tests.createExample(BaseView, { talerUri: "taler://pay/..", amountEffective: "USD:10.20", amountRaw: "USD:10", - noncePriv: "", + contractTerms: { nonce: "123213123", merchant: { @@ -435,7 +435,7 @@ export const TicketWithShipping = tests.createExample(BaseView, { talerUri: "taler://pay/..", amountEffective: "USD:10.20", amountRaw: "USD:10", - noncePriv: "", + contractTerms: { nonce: "123213123", merchant: { diff --git a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx index b0911cb2f..0bdadef0e 100644 --- a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx +++ b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx @@ -47,7 +47,9 @@ export function BaseView(state: SupportedStates): VNode { const effective = "amountEffective" in state.payStatus - ? Amounts.parseOrThrow(state.payStatus.amountEffective) + ? state.payStatus.amountEffective + ? Amounts.parseOrThrow(state.payStatus.amountEffective) + : Amounts.zeroOfCurrency(state.amount.currency) : state.amount; return ( |