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/wallet.ts | |
parent | c4f46cb9d2f755d15e84b639bc6f7bb2546874ce (diff) | |
download | wallet-core-7383b89cabbfdb8f2fbd6bb9e7b64d09385f7bea.tar.xz |
get rid of cyclic imports
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 3a3b4f6fd..6a7ee9de1 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -33,7 +33,6 @@ import { getDurationRemaining, isTimestampExpired, j2s, - PreparePayResultType, TalerErrorCode, Timestamp, timestampMin, @@ -72,7 +71,7 @@ import { processPurchasePay, } from "./operations/pay.js"; import { getPendingOperations } from "./operations/pending.js"; -import { processRecoupGroup } from "./operations/recoup.js"; +import { createRecoupGroup, processRecoupGroup } from "./operations/recoup.js"; import { autoRefresh, createRefreshGroup, @@ -93,6 +92,7 @@ import { ExchangeOperations, InternalWalletState, NotificationListener, + RecoupOperations, } from "./common.js"; import { runIntegrationTest, @@ -673,6 +673,7 @@ async function dispatchRequestInternal( switch (operation) { case "initWallet": { ws.initCalled = true; + await fillDefaults(ws); return {}; } case "withdrawTestkudos": { @@ -1046,6 +1047,11 @@ class InternalWalletStateImpl implements InternalWalletState { updateExchangeFromUrl, }; + recoupOps: RecoupOperations = { + createRecoupGroup: createRecoupGroup, + processRecoupGroup: processRecoupGroup, + }; + /** * Promises that are waiting for a particular resource. */ @@ -1091,6 +1097,14 @@ class InternalWalletStateImpl implements InternalWalletState { this.cryptoApi.stop(); } + async runUntilDone( + req: { + maxRetries?: number; + } = {}, + ): Promise<void> { + runUntilDone(this, req); + } + /** * Run an async function after acquiring a list of locks, identified * by string tokens. |