diff options
author | Sebastian <sebasjm@gmail.com> | 2023-10-22 14:47:50 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-10-22 14:47:50 -0300 |
commit | 5e160a2d4d1d77c87600f28f806bc94c086267c7 (patch) | |
tree | ec8475a39d7aa4565b490e259d787b195fb98bb3 /packages/taler-wallet-core/src/util | |
parent | 2005273d1286819e68d3ea7a3290f8c357be5e40 (diff) | |
download | wallet-core-5e160a2d4d1d77c87600f28f806bc94c086267c7.tar.xz |
update the amountString definitionv0.9.3-dev.34
Diffstat (limited to 'packages/taler-wallet-core/src/util')
-rw-r--r-- | packages/taler-wallet-core/src/util/coinSelection.test.ts | 22 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/util/denominations.test.ts | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/packages/taler-wallet-core/src/util/coinSelection.test.ts b/packages/taler-wallet-core/src/util/coinSelection.test.ts index 81a656f8a..69c25a2fa 100644 --- a/packages/taler-wallet-core/src/util/coinSelection.test.ts +++ b/packages/taler-wallet-core/src/util/coinSelection.test.ts @@ -48,9 +48,9 @@ test("p2p: should select the coin", (t) => { const coins = testing_greedySelectPeer( createCandidates([ { - amount: "LOCAL:10", + amount: "LOCAL:10" as AmountString, numAvailable: 5, - depositFee: "LOCAL:0.1", + depositFee: "LOCAL:0.1" as AmountString, fromExchange: "http://exchange.localhost/", }, ]), @@ -86,9 +86,9 @@ test("p2p: should select 3 coins", (t) => { const coins = testing_greedySelectPeer( createCandidates([ { - amount: "LOCAL:10", + amount: "LOCAL:10" as AmountString, numAvailable: 5, - depositFee: "LOCAL:0.1", + depositFee: "LOCAL:0.1" as AmountString, fromExchange: "http://exchange.localhost/", }, ]), @@ -126,9 +126,9 @@ test("p2p: can't select since the instructed amount is too high", (t) => { const coins = testing_greedySelectPeer( createCandidates([ { - amount: "LOCAL:10", + amount: "LOCAL:10" as AmountString, numAvailable: 5, - depositFee: "LOCAL:0.1", + depositFee: "LOCAL:0.1" as AmountString, fromExchange: "http://exchange.localhost/", }, ]), @@ -176,9 +176,9 @@ test("pay: select one coin to pay with fee", (t) => { }, createCandidates([ { - amount: "LOCAL:10", + amount: "LOCAL:10" as AmountString, numAvailable: 5, - depositFee: "LOCAL:0.1", + depositFee: "LOCAL:0.1" as AmountString, fromExchange: "http://exchange.localhost/", }, ]), @@ -224,9 +224,9 @@ function createCandidates( denomPubHash: `hash${idx}`, value: r.amount, feeDeposit: r.depositFee, - feeRefresh: "LOCAL:0", - feeRefund: "LOCAL:0", - feeWithdraw: "LOCAL:0", + feeRefresh: "LOCAL:0" as AmountString, + feeRefund: "LOCAL:0" as AmountString, + feeWithdraw: "LOCAL:0" as AmountString, stampExpireDeposit: inTheDistantFuture, stampExpireLegal: inTheDistantFuture, stampExpireWithdraw: inTheDistantFuture, diff --git a/packages/taler-wallet-core/src/util/denominations.test.ts b/packages/taler-wallet-core/src/util/denominations.test.ts index 25dbda081..98af5d1a4 100644 --- a/packages/taler-wallet-core/src/util/denominations.test.ts +++ b/packages/taler-wallet-core/src/util/denominations.test.ts @@ -39,7 +39,7 @@ import test, { ExecutionContext } from "ava"; * Create some constants to be used as reference in the tests */ const VALUES: AmountString[] = Array.from({ length: 10 }).map( - (undef, t) => `USD:${t}`, + (undef, t) => `USD:${t}` as AmountString, ); const TIMESTAMPS = Array.from({ length: 20 }).map((undef, t_s) => ({ t_s })); const ABS_TIME = TIMESTAMPS.map((m) => AbsoluteTime.fromProtocolTimestamp(m)); |