From 194eeea6aaf4ab401825aa07073b3e0a4f9d3c1b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 19 Feb 2024 20:07:37 +0100 Subject: restructure --- packages/taler-wallet-core/src/wallet.ts | 80 ++++++++++++++++---------------- 1 file changed, 39 insertions(+), 41 deletions(-) (limited to 'packages/taler-wallet-core/src/wallet.ts') diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 8b24fdc11..63b7ca4f2 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -51,6 +51,8 @@ import { TalerErrorCode, TalerUriAction, TestingWaitTransactionRequest, + TimerAPI, + TimerGroup, TransactionState, TransactionType, ValidateIbanResponse, @@ -132,32 +134,6 @@ import { validateIban, } from "@gnu-taler/taler-util"; import type { HttpRequestLibrary } from "@gnu-taler/taler-util/http"; -import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js"; -import { - CryptoDispatcher, - CryptoWorkerFactory, -} from "./crypto/workers/crypto-dispatcher.js"; -import { - CoinSourceType, - ConfigRecordKey, - DenominationRecord, - WalletDbReadOnlyTransaction, - WalletDbReadWriteTransaction, - WalletStoresV1, - clearDatabase, - exportDb, - importDb, - openStoredBackupsDatabase, - openTalerDatabase, -} from "./db.js"; -import { DevExperimentHttpLib, applyDevExperiment } from "./dev-experiments.js"; -import { - CancelFn, - InternalWalletState, - MerchantInfo, - NotificationListener, - RecoupOperations, -} from "./internal-wallet-state.js"; import { getUserAttentions, getUserAttentionsUnreadCount, @@ -176,12 +152,31 @@ import { setWalletDeviceId, } from "./backup/index.js"; import { getBalanceDetail, getBalances } from "./balance.js"; +import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js"; +import { + CryptoDispatcher, + CryptoWorkerFactory, +} from "./crypto/workers/crypto-dispatcher.js"; +import { + CoinSourceType, + ConfigRecordKey, + DenominationRecord, + WalletDbReadOnlyTransaction, + WalletDbReadWriteTransaction, + WalletStoresV1, + clearDatabase, + exportDb, + importDb, + openStoredBackupsDatabase, + openTalerDatabase, +} from "./db.js"; import { computeDepositTransactionStatus, createDepositGroup, generateDepositGroupTxId, prepareDepositGroup, } from "./deposits.js"; +import { DevExperimentHttpLib, applyDevExperiment } from "./dev-experiments.js"; import { acceptExchangeTermsOfService, addPresetExchangeEntry, @@ -193,6 +188,13 @@ import { listExchanges, lookupExchangeByUri, } from "./exchanges.js"; +import { + CancelFn, + InternalWalletState, + MerchantInfo, + NotificationListener, + RecoupOperations, +} from "./internal-wallet-state.js"; import { computePayMerchantTransactionState, computeRefundTransactionState, @@ -224,12 +226,11 @@ import { computePeerPushDebitTransactionState, initiatePeerPushDebit, } from "./pay-peer-push-debit.js"; +import { DbAccess } from "./query.js"; import { createRecoupGroup } from "./recoup.js"; -import { - computeRefreshTransactionState, - forceRefresh, -} from "./refresh.js"; +import { computeRefreshTransactionState, forceRefresh } from "./refresh.js"; import { computeRewardTransactionStatus } from "./reward.js"; +import { TaskScheduler } from "./shepherd.js"; import { runIntegrationTest, runIntegrationTest2, @@ -252,14 +253,6 @@ import { retryTransaction, suspendTransaction, } from "./transactions.js"; -import { - acceptWithdrawalFromUri, - computeWithdrawalTransactionStatus, - createManualWithdrawal, - getExchangeWithdrawalInfo, - getWithdrawalDetailsForUri, -} from "./withdraw.js"; -import { TaskScheduler } from "./shepherd.js"; import { assertUnreachable } from "./util/assertUnreachable.js"; import { convertDepositAmount, @@ -269,8 +262,6 @@ import { getMaxPeerPushAmount, } from "./util/instructedAmountConversion.js"; import { checkDbInvariant } from "./util/invariants.js"; -import { DbAccess } from "./query.js"; -import { TimerAPI, TimerGroup } from "./util/timer.js"; import { WALLET_BANK_CONVERSION_API_PROTOCOL_VERSION, WALLET_BANK_INTEGRATION_PROTOCOL_VERSION, @@ -286,6 +277,13 @@ import { WalletCoreApiClient, WalletCoreResponseType, } from "./wallet-api-types.js"; +import { + acceptWithdrawalFromUri, + computeWithdrawalTransactionStatus, + createManualWithdrawal, + getExchangeWithdrawalInfo, + getWithdrawalDetailsForUri, +} from "./withdraw.js"; const logger = new Logger("wallet.ts"); @@ -608,7 +606,7 @@ async function handlePrepareWithdrawExchange( /** * Response returned from the pending operations API. - * + * * @deprecated this is a placeholder for the response type of a deprecated wallet-core request. */ export interface PendingOperationsResponse { -- cgit v1.2.3