diff options
author | Florian Dold <florian@dold.me> | 2023-02-17 02:25:46 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-02-17 02:25:46 +0100 |
commit | 8b83f729d7394837a3be231bbeeea44f6a01e9a1 (patch) | |
tree | 5c564c2755f7e186d2ec1624600730f80a83d913 /packages/taler-wallet-core/src/operations | |
parent | 99f27aaecd78f3f513f1cc203c37ccab4f2db89a (diff) | |
download | wallet-core-8b83f729d7394837a3be231bbeeea44f6a01e9a1.tar.xz |
-comments
Diffstat (limited to 'packages/taler-wallet-core/src/operations')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay-peer.ts | 2 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/operations/transactions.ts | 23 |
2 files changed, 17 insertions, 8 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts b/packages/taler-wallet-core/src/operations/pay-peer.ts index dd5ea13c9..c1cacead9 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer.ts @@ -1222,3 +1222,5 @@ export async function initiatePeerPullPayment( ), }; } + + diff --git a/packages/taler-wallet-core/src/operations/transactions.ts b/packages/taler-wallet-core/src/operations/transactions.ts index 0dbbc56c1..d2a7e9d41 100644 --- a/packages/taler-wallet-core/src/operations/transactions.ts +++ b/packages/taler-wallet-core/src/operations/transactions.ts @@ -1361,13 +1361,20 @@ export async function abortTransaction( ): Promise<void> { const { type, args: rest } = parseId("txn", transactionId); - if (type === TransactionType.Payment) { - const proposalId = rest[0]; - await abortPay(ws, proposalId, forceImmediateAbort); - } else { - const unknownTxType: any = type; - throw Error( - `can't abort a '${unknownTxType}' transaction: not yet implemented`, - ); + switch (type) { + case TransactionType.Payment: { + const proposalId = rest[0]; + await abortPay(ws, proposalId, forceImmediateAbort); + break; + } + case TransactionType.PeerPushDebit: { + break; + } + default: { + const unknownTxType: any = type; + throw Error( + `can't abort a '${unknownTxType}' transaction: not yet implemented`, + ); + } } } |