diff options
author | Florian Dold <florian@dold.me> | 2023-04-05 18:19:14 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-04-05 18:19:14 +0200 |
commit | 3cf6d15eae299576eada8b501e5848ef29dad03c (patch) | |
tree | 67f9ba90f9ef96376168d522c5c1461b1d2259fd /packages/taler-wallet-core/src | |
parent | 451400b3a4a0d22a3b6f00cd7c66cec376bcb991 (diff) | |
download | wallet-core-3cf6d15eae299576eada8b501e5848ef29dad03c.tar.xz |
taler-harness: new test
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/dbless.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/dbless.ts b/packages/taler-wallet-core/src/dbless.ts index fe5eb6e3f..5dc13433a 100644 --- a/packages/taler-wallet-core/src/dbless.ts +++ b/packages/taler-wallet-core/src/dbless.ts @@ -229,17 +229,22 @@ export async function depositCoin(args: { coin: CoinInfo; amount: AmountString; depositPayto?: string; -}) { + merchantPub?: string; + contractTermsHash?: string; + // 16 bytes, crockford encoded + wireSalt?: string; +}): Promise<void> { const { coin, http, cryptoApi } = args; const depositPayto = args.depositPayto ?? "payto://x-taler-bank/localhost/foo"; - const wireSalt = encodeCrock(getRandomBytes(16)); + const wireSalt = args.wireSalt ?? encodeCrock(getRandomBytes(16)); const timestampNow = AbsoluteTime.toTimestamp(AbsoluteTime.now()); - const contractTermsHash = encodeCrock(getRandomBytes(64)); + const contractTermsHash = + args.contractTermsHash ?? encodeCrock(getRandomBytes(64)); const depositTimestamp = timestampNow; const refundDeadline = timestampNow; const wireTransferDeadline = timestampNow; - const merchantPub = encodeCrock(getRandomBytes(32)); + const merchantPub = args.merchantPub ?? encodeCrock(getRandomBytes(32)); const dp = await cryptoApi.signDepositPermission({ coinPriv: coin.coinPriv, coinPub: coin.coinPub, |