diff options
author | Florian Dold <florian@dold.me> | 2022-11-02 17:42:14 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-11-02 18:23:17 +0100 |
commit | d50294f76e0aa357d690a933bb6d696a2f6aef1b (patch) | |
tree | abe961337c5df1614b5095bce6c5b09e761cda2c /packages/taler-wallet-core/src/operations/exchanges.ts | |
parent | 6c3ef31d9a7ba44829e779afed0af9be3ab23723 (diff) | |
download | wallet-core-d50294f76e0aa357d690a933bb6d696a2f6aef1b.tar.xz |
wallet-core: DB FIXMEs (amount format)
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/exchanges.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts index 23ff1479e..b6e2a9d73 100644 --- a/packages/taler-wallet-core/src/operations/exchanges.ts +++ b/packages/taler-wallet-core/src/operations/exchanges.ts @@ -98,10 +98,10 @@ function denominationRecordFromKeys( exchangeBaseUrl, exchangeMasterPub, fees: { - feeDeposit: Amounts.parseOrThrow(denomIn.fee_deposit), - feeRefresh: Amounts.parseOrThrow(denomIn.fee_refresh), - feeRefund: Amounts.parseOrThrow(denomIn.fee_refund), - feeWithdraw: Amounts.parseOrThrow(denomIn.fee_withdraw), + feeDeposit: Amounts.stringify(denomIn.fee_deposit), + feeRefresh: Amounts.stringify(denomIn.fee_refresh), + feeRefund: Amounts.stringify(denomIn.fee_refund), + feeWithdraw: Amounts.stringify(denomIn.fee_withdraw), }, isOffered: true, isRevoked: false, @@ -267,11 +267,11 @@ async function validateWireInfo( const startStamp = x.start_date; const endStamp = x.end_date; const fee: WireFee = { - closingFee: Amounts.parseOrThrow(x.closing_fee), + closingFee: Amounts.stringify(x.closing_fee), endStamp, sig: x.sig, startStamp, - wireFee: Amounts.parseOrThrow(x.wire_fee), + wireFee: Amounts.stringify(x.wire_fee), }; let isValid = false; if (ws.insecureTrustExchange) { @@ -321,9 +321,9 @@ async function validateGlobalFees( throw Error("exchange global fees signature invalid: " + gf.master_sig); } egf.push({ - accountFee: Amounts.parseOrThrow(gf.account_fee), - historyFee: Amounts.parseOrThrow(gf.history_fee), - purseFee: Amounts.parseOrThrow(gf.purse_fee), + accountFee: Amounts.stringify(gf.account_fee), + historyFee: Amounts.stringify(gf.history_fee), + purseFee: Amounts.stringify(gf.purse_fee), startDate: gf.start_date, endDate: gf.end_date, signature: gf.master_sig, |