From 5d76573ac054c4204e95a26dc286eb0af1f2d10d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 3 Jul 2023 12:42:44 -0300 Subject: #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 --- packages/taler-wallet-core/src/wallet.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'packages/taler-wallet-core/src/wallet.ts') 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( 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); -- cgit v1.2.3