diff options
Diffstat (limited to 'packages/taler-wallet-core/src/refresh.ts')
-rw-r--r-- | packages/taler-wallet-core/src/refresh.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/refresh.ts b/packages/taler-wallet-core/src/refresh.ts index df0ab25f9..09cd75bdd 100644 --- a/packages/taler-wallet-core/src/refresh.ts +++ b/packages/taler-wallet-core/src/refresh.ts @@ -54,6 +54,7 @@ import { TransactionState, TransactionType, URL, + WalletNotification, } from "@gnu-taler/taler-util"; import { readSuccessResponseJsonOrThrow, @@ -1254,6 +1255,7 @@ async function applyRefresh( export interface CreateRefreshGroupResult { refreshGroupId: string; + notifications: WalletNotification[]; } /** @@ -1310,6 +1312,8 @@ export async function createRefreshGroup( await tx.refreshGroups.put(refreshGroup); + const newTxState = computeRefreshTransactionState(refreshGroup); + logger.trace(`created refresh group ${refreshGroupId}`); const ctx = new RefreshTransactionContext(ws, refreshGroupId); @@ -1321,6 +1325,16 @@ export async function createRefreshGroup( return { refreshGroupId, + notifications: [ + { + type: NotificationType.TransactionStateTransition, + transactionId: ctx.transactionId, + oldTxState: { + major: TransactionMajorState.None, + }, + newTxState, + }, + ], }; } |