diff options
Diffstat (limited to 'packages/taler-wallet-core/src')
9 files changed, 45 insertions, 11 deletions
diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts index de413a514..057450b78 100644 --- a/packages/taler-wallet-core/src/operations/deposits.ts +++ b/packages/taler-wallet-core/src/operations/deposits.ts @@ -1449,6 +1449,7 @@ export async function createDepositGroup( ws.notify({ type: NotificationType.BalanceChange, + hintTransactionId: transactionId, }); return { diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts index b3ea5b3fe..2d364a866 100644 --- a/packages/taler-wallet-core/src/operations/pay-merchant.ts +++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts @@ -933,7 +933,13 @@ async function handleInsufficientFunds( }); }); - ws.notify({ type: NotificationType.BalanceChange }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: constructTransactionIdentifier({ + tag: TransactionType.Payment, + proposalId, + }), + }); } async function unblockBackup( @@ -1482,7 +1488,10 @@ export async function confirmPay( }); notifyTransition(ws, transactionId, transitionInfo); - ws.notify({ type: NotificationType.BalanceChange }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: transactionId, + }); return runPayForConfirmPay(ws, proposalId); } diff --git a/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts b/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts index f8ab07b10..ec482b2dd 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer-pull-credit.ts @@ -833,7 +833,10 @@ export async function initiatePeerPullPayment( }); // The pending-incoming balance has changed. - ws.notify({ type: NotificationType.BalanceChange }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: transactionId, + }); notifyTransition(ws, transactionId, transitionInfo); diff --git a/packages/taler-wallet-core/src/operations/pay-peer-pull-debit.ts b/packages/taler-wallet-core/src/operations/pay-peer-pull-debit.ts index cf5fc355d..72e9e2e4a 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer-pull-debit.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer-pull-debit.ts @@ -460,13 +460,16 @@ export async function confirmPeerPullDebit( return pi; }); - ws.notify({ type: NotificationType.BalanceChange }); - const transactionId = constructTransactionIdentifier({ tag: TransactionType.PeerPullDebit, peerPullDebitId, }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: transactionId, + }); + return { transactionId, }; diff --git a/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts b/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts index 1174ccc8e..78263c4c3 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer-push-credit.ts @@ -234,7 +234,10 @@ export async function preparePeerPushCredit( notifyTransition(ws, transactionId, transitionInfo); - ws.notify({ type: NotificationType.BalanceChange }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: transactionId, + }); return { amount: purseStatus.balance, diff --git a/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts b/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts index 534114ed8..3eed52b91 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts @@ -696,7 +696,10 @@ export async function initiatePeerPushDebit( }; }); notifyTransition(ws, transactionId, transitionInfo); - ws.notify({ type: NotificationType.BalanceChange }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: transactionId, + }); return { contractPriv: contractKeyPair.priv, diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index e5bc3277d..c58f03e05 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -295,7 +295,10 @@ async function provideRefreshSession( const newTxState = computeRefreshTransactionState(rg); return { oldTxState, newTxState }; }); - ws.notify({ type: NotificationType.BalanceChange }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: transactionId, + }); notifyTransition(ws, transactionId, transitionInfo); return; } @@ -509,7 +512,10 @@ async function refreshMelt( newTxState, }; }); - ws.notify({ type: NotificationType.BalanceChange }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: transactionId, + }); notifyTransition(ws, transactionId, transitionInfo); return; } diff --git a/packages/taler-wallet-core/src/operations/reward.ts b/packages/taler-wallet-core/src/operations/reward.ts index 90320d7cb..a1bf13ec4 100644 --- a/packages/taler-wallet-core/src/operations/reward.ts +++ b/packages/taler-wallet-core/src/operations/reward.ts @@ -429,7 +429,10 @@ export async function processTip( return { oldTxState, newTxState }; }); notifyTransition(ws, transactionId, transitionInfo); - ws.notify({ type: NotificationType.BalanceChange }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: transactionId, + }); return TaskRunResult.finished(); } diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index e7ba6d820..8a718dd49 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -1642,7 +1642,10 @@ async function processWithdrawalGroupPendingReady( } notifyTransition(ws, transactionId, res.transitionInfo); - ws.notify({ type: NotificationType.BalanceChange }); + ws.notify({ + type: NotificationType.BalanceChange, + hintTransactionId: transactionId, + }); if (numPlanchetErrors > 0) { return { |