diff options
author | Florian Dold <florian@dold.me> | 2020-12-14 16:45:15 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2020-12-14 16:45:15 +0100 |
commit | f332d61fb68fbc394f31337ddeb7d1fc114772d0 (patch) | |
tree | eeb9e7dd527ab7efcaa7812f4440e8901185e9aa /packages/taler-wallet-core/src/operations/refund.ts | |
parent | c4b44a51097e67a357b490adf407f1a6afb0d8ee (diff) | |
download | wallet-core-f332d61fb68fbc394f31337ddeb7d1fc114772d0.tar.xz |
formatting pass
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refund.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/refund.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/refund.ts b/packages/taler-wallet-core/src/operations/refund.ts index e0d060376..36b21b232 100644 --- a/packages/taler-wallet-core/src/operations/refund.ts +++ b/packages/taler-wallet-core/src/operations/refund.ts @@ -286,7 +286,10 @@ async function storeFailedRefund( } if (contrib) { coin.currentAmount = Amounts.add(coin.currentAmount, contrib).amount; - coin.currentAmount = Amounts.sub(coin.currentAmount, denom.feeRefund).amount; + coin.currentAmount = Amounts.sub( + coin.currentAmount, + denom.feeRefund, + ).amount; } refreshCoinsMap[coin.coinPub] = { coinPub: coin.coinPub }; await tx.put(Stores.coins, coin); @@ -325,7 +328,8 @@ async function acceptRefunds( const isPermanentFailure = refundStatus.type === "failure" && - refundStatus.exchange_status >= 400 && refundStatus.exchange_status < 500 ; + refundStatus.exchange_status >= 400 && + refundStatus.exchange_status < 500; // Already failed. if (existingRefundInfo?.type === RefundState.Failed) { @@ -536,7 +540,7 @@ export async function applyRefund( fulfillmentMessage: purchase.contractData.fulfillmentMessage, summary_i18n: purchase.contractData.summaryI18n, fulfillmentMessage_i18n: purchase.contractData.fulfillmentMessageI18n, - } + }, }; } |