aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-peer.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer.ts17
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);