diff options
author | Sebastian <sebasjm@gmail.com> | 2023-02-20 11:32:34 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-02-20 11:32:34 -0300 |
commit | ff9c67c72d8939560f9b5619ae2210841acdf01c (patch) | |
tree | 1ce755823d013045afa43b3f99b5e4c608a77e9d /packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts | |
parent | 85c5c6d7c7304801fd223abea724fe67a56ff5fa (diff) | |
download | wallet-core-ff9c67c72d8939560f9b5619ae2210841acdf01c.tar.xz |
fix #7579
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts b/packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts index 0a781746f..986354bad 100644 --- a/packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts +++ b/packages/taler-wallet-webextension/src/cta/TransferPickup/state.ts @@ -62,12 +62,17 @@ export function useComponentState({ // }; // } - const { contractTerms, peerPushPaymentIncomingId } = hook.response; + const { + contractTerms, + peerPushPaymentIncomingId, + amountEffective, + amountRaw, + } = hook.response; - const amount: string = contractTerms?.amount; - const summary: string | undefined = contractTerms?.summary; - const expiration: TalerProtocolTimestamp | undefined = - contractTerms?.purse_expiration; + const effective = Amounts.parseOrThrow(amountEffective); + const raw = Amounts.parseOrThrow(amountRaw); + const summary: string = contractTerms.summary; + const expiration: TalerProtocolTimestamp = contractTerms.purse_expiration; async function accept(): Promise<void> { const resp = await api.wallet.call( @@ -80,7 +85,8 @@ export function useComponentState({ } return { status: "ready", - amount: Amounts.parseOrThrow(amount), + effective, + raw, error: undefined, accept: { onClick: pushAlertOnError(accept), |