summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-02-08 15:38:34 +0100
committerFlorian Dold <florian@dold.me>2021-02-08 15:38:34 +0100
commit5ff5a686e4f15dea839b18fda9275687557d23a7 (patch)
treeeb4579f451a70fae627b403e273e73033fa5e88c /packages/taler-wallet-core/src/operations
parent4452984a24334e3b7afb60e3db9dc12db02d65ba (diff)
downloadwallet-core-5ff5a686e4f15dea839b18fda9275687557d23a7.tar.gz
wallet-core-5ff5a686e4f15dea839b18fda9275687557d23a7.tar.bz2
wallet-core-5ff5a686e4f15dea839b18fda9275687557d23a7.zip
organize imports
Diffstat (limited to 'packages/taler-wallet-core/src/operations')
-rw-r--r--packages/taler-wallet-core/src/operations/recoup.ts32
-rw-r--r--packages/taler-wallet-core/src/operations/refresh.ts63
-rw-r--r--packages/taler-wallet-core/src/operations/withdraw.ts2
3 files changed, 46 insertions, 51 deletions
diff --git a/packages/taler-wallet-core/src/operations/recoup.ts b/packages/taler-wallet-core/src/operations/recoup.ts
index f6b29536b..a2c7cb6f5 100644
--- a/packages/taler-wallet-core/src/operations/recoup.ts
+++ b/packages/taler-wallet-core/src/operations/recoup.ts
@@ -24,33 +24,31 @@
/**
* Imports.
*/
-import { InternalWalletState } from "./state";
+import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto";
import {
- Stores,
- CoinStatus,
- CoinSourceType,
CoinRecord,
- WithdrawCoinSource,
+ CoinSourceType,
+ CoinStatus,
+ RecoupGroupRecord,
RefreshCoinSource,
ReserveRecordStatus,
- RecoupGroupRecord,
+ Stores,
+ WithdrawCoinSource,
} from "../types/dbTypes";
-
-import { codecForRecoupConfirmation } from "../types/talerTypes";
import { NotificationType } from "../types/notifications";
-import { getReserveRequestTimeout, processReserve } from "./reserves";
-
-import { Amounts } from "../util/amounts";
-import { createRefreshGroup, processRefreshGroup } from "./refresh";
+import { codecForRecoupConfirmation } from "../types/talerTypes";
import { RefreshReason, TalerErrorDetails } from "../types/walletTypes";
-import { Store, StoreParams, TransactionHandle } from "../util/query";
-import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto";
-import { getTimestampNow } from "../util/time";
-import { guardOperationException } from "./errors";
+import { Amounts } from "../util/amounts";
import { readSuccessResponseJsonOrThrow } from "../util/http";
-import { URL } from "../util/url";
import { Logger } from "../util/logging";
+import { TransactionHandle } from "../util/query";
import { initRetryInfo, updateRetryInfoTimeout } from "../util/retries";
+import { getTimestampNow } from "../util/time";
+import { URL } from "../util/url";
+import { guardOperationException } from "./errors";
+import { createRefreshGroup, processRefreshGroup } from "./refresh";
+import { getReserveRequestTimeout, processReserve } from "./reserves";
+import { InternalWalletState } from "./state";
const logger = new Logger("operations/recoup.ts");
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts
index a6c311f45..621e9a108 100644
--- a/packages/taler-wallet-core/src/operations/refresh.ts
+++ b/packages/taler-wallet-core/src/operations/refresh.ts
@@ -14,54 +14,51 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { Amounts, AmountJson } from "../util/amounts";
+import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto";
+import { RefreshNewDenomInfo } from "../types/cryptoTypes";
import {
- DenominationRecord,
- Stores,
- CoinStatus,
- RefreshPlanchet,
CoinRecord,
- RefreshSessionRecord,
- RefreshGroupRecord,
CoinSourceType,
+ CoinStatus,
+ DenominationRecord,
+ RefreshGroupRecord,
+ RefreshPlanchet,
+ Stores,
} from "../types/dbTypes";
-import { amountToPretty } from "../util/helpers";
-import { TransactionHandle } from "../util/query";
-import { InternalWalletState, EXCHANGE_COINS_LOCK } from "./state";
-import { Logger } from "../util/logging";
-import { selectWithdrawalDenominations, isWithdrawableDenom } from "./withdraw";
-import { updateExchangeFromUrl } from "./exchanges";
+import { NotificationType } from "../types/notifications";
+import {
+ codecForExchangeMeltResponse,
+ codecForExchangeRevealResponse,
+} from "../types/talerTypes";
import {
- TalerErrorDetails,
CoinPublicKey,
- RefreshReason,
RefreshGroupId,
+ RefreshReason,
+ TalerErrorDetails,
} from "../types/walletTypes";
-import { guardOperationException } from "./errors";
-import { NotificationType } from "../types/notifications";
-import { getRandomBytes, encodeCrock } from "../crypto/talerCrypto";
+import { AmountJson, Amounts } from "../util/amounts";
+import { amountToPretty } from "../util/helpers";
+import { readSuccessResponseJsonOrThrow } from "../util/http";
+import { checkDbInvariant } from "../util/invariants";
+import { Logger } from "../util/logging";
+import { TransactionHandle } from "../util/query";
+import { initRetryInfo, updateRetryInfoTimeout } from "../util/retries";
import {
- getTimestampNow,
Duration,
- Timestamp,
- isTimestampExpired,
durationFromSpec,
- timestampMin,
+ durationMul,
+ getTimestampNow,
+ isTimestampExpired,
+ Timestamp,
timestampAddDuration,
timestampDifference,
- durationMax,
- durationMul,
+ timestampMin,
} from "../util/time";
-import { readSuccessResponseJsonOrThrow } from "../util/http";
-import {
- codecForExchangeMeltResponse,
- codecForExchangeRevealResponse,
-} from "../types/talerTypes";
import { URL } from "../util/url";
-import { checkDbInvariant } from "../util/invariants";
-import { initRetryInfo, updateRetryInfoTimeout } from "../util/retries";
-import { WALLET_EXCHANGE_PROTOCOL_VERSION } from "./versions";
-import { RefreshNewDenomInfo } from "../types/cryptoTypes";
+import { guardOperationException } from "./errors";
+import { updateExchangeFromUrl } from "./exchanges";
+import { EXCHANGE_COINS_LOCK, InternalWalletState } from "./state";
+import { isWithdrawableDenom, selectWithdrawalDenominations } from "./withdraw";
const logger = new Logger("refresh.ts");
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
index 936b53954..f8748142f 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -31,11 +31,11 @@ import {
ExchangeWithdrawDetails,
TalerErrorDetails,
ExchangeListItem,
+ WithdrawUriInfoResponse,
} from "../types/walletTypes";
import {
codecForWithdrawOperationStatusResponse,
codecForWithdrawResponse,
- WithdrawUriInfoResponse,
WithdrawResponse,
codecForTalerConfigResponse,
} from "../types/talerTypes";