diff options
author | Sebastian <sebasjm@gmail.com> | 2023-07-03 12:42:44 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-07-03 12:42:44 -0300 |
commit | 5d76573ac054c4204e95a26dc286eb0af1f2d10d (patch) | |
tree | 602e90b51b1f5989776bc0b727b7956a3432c676 /packages/taler-wallet-core/src/wallet.ts | |
parent | f47b5bd783def7481233f94275e333365d50b08b (diff) | |
download | wallet-core-5d76573ac054c4204e95a26dc286eb0af1f2d10d.tar.xz |
#7741 share payment
save shared state in backup
if purchase is shared check before making the payment of before claim the order
already confirmed order can return without effective if coin selection was not made
sharePayment operation
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 11030af2b..ca86cbb14 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -117,6 +117,7 @@ import { parsePaytoUri, sampleWalletCoreTransactions, validateIban, + codecForSharePaymentRequest, } from "@gnu-taler/taler-util"; import { HttpRequestLibrary, @@ -203,6 +204,7 @@ import { getContractTermsDetails, preparePayForUri, processPurchase, + sharePayment, startQueryRefund, startRefundQueryForUri, } from "./operations/pay-merchant.js"; @@ -1207,6 +1209,11 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>( await runPending(ws); return {}; } + case WalletApiOperation.SharePayment: { + const req = codecForSharePaymentRequest().decode(payload); + return await sharePayment(ws, req.merchantBaseUrl, req.orderId); + } + case WalletApiOperation.PreparePayForUri: { const req = codecForPreparePayRequest().decode(payload); return await preparePayForUri(ws, req.talerPayUri); |