diff options
author | Florian Dold <florian@dold.me> | 2024-04-23 12:49:42 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-04-23 12:49:42 +0200 |
commit | 666b767766ef299bd58655c55ece6d4a82c3e947 (patch) | |
tree | ad55f617626d96fb656ff7ab4ccb71b7931ee7b9 /packages/taler-wallet-core/src/wallet.ts | |
parent | 0308290a128d29792225d7b2f4d2e22cb5d42f72 (diff) | |
download | wallet-core-666b767766ef299bd58655c55ece6d4a82c3e947.tar.xz |
wallet-core: support for withdrawals with forced reserve key
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index b59f52840..dd6ce96f4 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -145,6 +145,7 @@ import { parsePaytoUri, parseTalerUri, performanceNow, + safeStringifyException, sampleWalletCoreTransactions, setDangerousTimetravel, validateIban, @@ -909,6 +910,7 @@ async function dispatchRequestInternal( amount: Amounts.parseOrThrow(req.amount), exchangeBaseUrl: req.exchangeBaseUrl, restrictAge: req.restrictAge, + forceReservePriv: req.forceReservePriv, }); return res; } @@ -1432,6 +1434,10 @@ async function dispatchRequestInternal( await applyDevExperiment(wex, req.devExperimentUri); return {}; } + case WalletApiOperation.Shutdown: { + wex.ws.stop(); + return {}; + } case WalletApiOperation.GetVersion: { return getVersion(wex); } @@ -1700,10 +1706,6 @@ export class Wallet { return this.ws.addNotificationListener(f); } - stop(): void { - this.ws.stop(); - } - async handleCoreApiRequest( operation: string, id: string, @@ -1952,6 +1954,9 @@ export class InternalWalletState { this.stopped = true; this.timerGroup.stopCurrentAndFutureTimers(); this.cryptoDispatcher.stop(); + this.taskScheduler.shutdown().catch((e) => { + logger.warn(`shutdown failed: ${safeStringifyException(e)}`); + }); } /** |