aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-peer.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-21 20:31:23 +0100
committerFlorian Dold <florian@dold.me>2023-02-21 20:31:23 +0100
commita3c7da975b6375f8c57154875642fb29a67e8731 (patch)
tree0d73dd9ad07f4c4c16309e25510fd809a280a61d /packages/taler-wallet-core/src/operations/pay-peer.ts
parent267714074995aab337b474dce2cb0236c2861a9c (diff)
downloadwallet-core-a3c7da975b6375f8c57154875642fb29a67e8731.tar.xz
wallet-core: fix peer-pull-credit long-polling and peer-pull-debit pending operation status
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts b/packages/taler-wallet-core/src/operations/pay-peer.ts
index bfb0dd589..8bde47df4 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer.ts
@@ -1155,7 +1155,7 @@ export async function acceptIncomingPeerPullPayment(
* Look up information about an incoming peer pull payment.
* Store the results in the wallet DB.
*/
-export async function preparePeerPullCredit(
+export async function preparePeerPullDebit(
ws: InternalWalletState,
req: PreparePeerPullDebitRequest,
): Promise<PreparePeerPullDebitResponse> {
@@ -1279,7 +1279,7 @@ export async function queryPurseForPeerPullCredit(
cancellationToken: CancellationToken,
): Promise<LongpollResult> {
const purseDepositUrl = new URL(
- `purses/${pullIni.pursePub}/merge`,
+ `purses/${pullIni.pursePub}/deposit`,
pullIni.exchangeBaseUrl,
);
purseDepositUrl.searchParams.set("timeout_ms", "30000");
@@ -1380,6 +1380,8 @@ export async function processPeerPullCredit(
};
}
+ logger.trace(`processing ${retryTag}, status=${pullIni.status}`);
+
switch (pullIni.status) {
case PeerPullPaymentInitiationStatus.PurseDeposited: {
// We implement this case so that the "retry" action on a peer-pull-credit transaction