diff options
author | Florian Dold <florian@dold.me> | 2023-02-21 21:02:36 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-02-21 21:02:36 +0100 |
commit | b648238c4120ed341c76818b4ffa223d0122af78 (patch) | |
tree | dff1c75182170cfeed76c8d926e919470f2c9d71 /packages/taler-wallet-core/src/operations/pay-peer.ts | |
parent | a3c7da975b6375f8c57154875642fb29a67e8731 (diff) | |
download | wallet-core-b648238c4120ed341c76818b4ffa223d0122af78.tar.xz |
harness: improve peer-pull integration test, check notificationsv0.9.3-dev.2
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay-peer.ts | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts b/packages/taler-wallet-core/src/operations/pay-peer.ts index 8bde47df4..541e96280 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer.ts @@ -72,6 +72,7 @@ import { codecOptional, codecForTimestamp, CancellationToken, + NotificationType, } from "@gnu-taler/taler-util"; import { SpendCoinDetails } from "../crypto/cryptoImplementation.js"; import { @@ -119,7 +120,10 @@ import { processWithdrawalGroup, } from "./withdraw.js"; import { PendingTaskType } from "../pending-types.js"; -import { stopLongpolling } from "./transactions.js"; +import { + constructTransactionIdentifier, + stopLongpolling, +} from "./transactions.js"; const logger = new Logger("operations/peer-to-peer.ts"); @@ -1507,6 +1511,14 @@ export async function processPeerPullCredit( await tx.peerPullPaymentInitiations.put(pi2); }); + ws.notify({ + type: NotificationType.PeerPullCreditReady, + transactionId: constructTransactionIdentifier({ + tag: TransactionType.PeerPullCredit, + pursePub: pullIni.pursePub, + }), + }); + return { type: OperationAttemptResultType.Finished, result: undefined, @@ -1626,9 +1638,6 @@ export async function initiatePeerPullPayment( const pursePair = await ws.cryptoApi.createEddsaKeypair({}); const mergePair = await ws.cryptoApi.createEddsaKeypair({}); - const instructedAmount = Amounts.parseOrThrow( - req.partialContractTerms.amount, - ); const contractTerms = req.partialContractTerms; const hContractTerms = ContractTermsUtil.hashContractTerms(contractTerms); |