diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations/withdraw.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/withdraw.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index e6c233e2b..9dfd72678 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -1839,6 +1839,7 @@ export async function internalCreateWithdrawalGroup( reserveStatus: WithdrawalGroupStatus; amount: AmountJson; exchangeBaseUrl: string; + forcedWithdrawalGroupId?: string; forcedDenomSel?: ForcedDenomSel; reserveKeyPair?: EddsaKeypair; restrictAge?: number; @@ -1850,9 +1851,16 @@ export async function internalCreateWithdrawalGroup( const now = AbsoluteTime.toTimestamp(AbsoluteTime.now()); const secretSeed = encodeCrock(getRandomBytes(32)); const canonExchange = canonicalizeBaseUrl(args.exchangeBaseUrl); - const withdrawalGroupId = encodeCrock(getRandomBytes(32)); const amount = args.amount; + let withdrawalGroupId; + + if (args.forcedWithdrawalGroupId) { + withdrawalGroupId = args.forcedWithdrawalGroupId; + } else { + withdrawalGroupId = encodeCrock(getRandomBytes(32)); + } + await updateWithdrawalDenoms(ws, canonExchange); const denoms = await getCandidateWithdrawalDenoms(ws, canonExchange); |