diff options
author | Florian Dold <florian@dold.me> | 2021-06-22 12:18:12 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-06-22 12:18:12 +0200 |
commit | 7383b89cabbfdb8f2fbd6bb9e7b64d09385f7bea (patch) | |
tree | 7700b10f5dad217c0d16b5ac8182cd3af0127abb /packages/taler-wallet-core/src/operations/exchanges.ts | |
parent | c4f46cb9d2f755d15e84b639bc6f7bb2546874ce (diff) | |
download | wallet-core-7383b89cabbfdb8f2fbd6bb9e7b64d09385f7bea.tar.xz |
get rid of cyclic imports
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/exchanges.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts index 85455cf9c..a04769929 100644 --- a/packages/taler-wallet-core/src/operations/exchanges.ts +++ b/packages/taler-wallet-core/src/operations/exchanges.ts @@ -65,7 +65,6 @@ import { makeErrorDetails, OperationFailedError, } from "../errors.js"; -import { createRecoupGroup, processRecoupGroup } from "./recoup.js"; import { InternalWalletState, TrustInfo } from "../common.js"; import { WALLET_CACHE_BREAKER_CLIENT_VERSION, @@ -556,7 +555,11 @@ async function updateExchangeFromUrlImpl( } if (newlyRevokedCoinPubs.length != 0) { logger.trace("recouping coins", newlyRevokedCoinPubs); - recoupGroupId = await createRecoupGroup(ws, tx, newlyRevokedCoinPubs); + recoupGroupId = await ws.recoupOps.createRecoupGroup( + ws, + tx, + newlyRevokedCoinPubs, + ); } return { exchange: r, @@ -567,7 +570,7 @@ async function updateExchangeFromUrlImpl( if (recoupGroupId) { // Asynchronously start recoup. This doesn't need to finish // for the exchange update to be considered finished. - processRecoupGroup(ws, recoupGroupId).catch((e) => { + ws.recoupOps.processRecoupGroup(ws, recoupGroupId).catch((e) => { logger.error("error while recouping coins:", e); }); } |