summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/tip.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-03-17 17:56:37 +0100
committerFlorian Dold <florian@dold.me>2021-03-17 17:56:37 +0100
commit07cdfb2e4ec761021477271776b81f33af0e731d (patch)
treecb62b1d1a04e1e64b8ee47e78196e858727d2c0a /packages/taler-wallet-core/src/operations/tip.ts
parent42a4d666f42ce94274995bfdae644444ff5f6d53 (diff)
downloadwallet-core-07cdfb2e4ec761021477271776b81f33af0e731d.tar.gz
wallet-core-07cdfb2e4ec761021477271776b81f33af0e731d.tar.bz2
wallet-core-07cdfb2e4ec761021477271776b81f33af0e731d.zip
towards wallet-core / util split
Diffstat (limited to 'packages/taler-wallet-core/src/operations/tip.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/tip.ts57
1 files changed, 31 insertions, 26 deletions
diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts
index 9242d70d5..5ea92912b 100644
--- a/packages/taler-wallet-core/src/operations/tip.ts
+++ b/packages/taler-wallet-core/src/operations/tip.ts
@@ -14,45 +14,50 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { InternalWalletState } from "./state";
-import { parseTipUri } from "../util/taleruri";
-import { PrepareTipResult, TalerErrorDetails } from "../types/walletTypes";
+/**
+ * Imports.
+ */
import {
- TipPlanchetDetail,
+ PrepareTipResult,
+ parseTipUri,
codecForTipPickupGetResponse,
+ Amounts,
+ getTimestampNow,
+ TalerErrorDetails,
+ NotificationType,
+ TipPlanchetDetail,
+ TalerErrorCode,
codecForTipResponse,
-} from "../types/talerTypes";
-import * as Amounts from "../util/amounts";
+} from "@gnu-taler/taler-util";
+import { DerivedTipPlanchet } from "../crypto/cryptoTypes.js";
import {
Stores,
+ DenominationRecord,
CoinRecord,
CoinSourceType,
CoinStatus,
- DenominationRecord,
-} from "../types/dbTypes";
+} from "../db.js";
+import {
+ Logger,
+ URL,
+ readSuccessResponseJsonOrThrow,
+ encodeCrock,
+ getRandomBytes,
+ getHttpResponseErrorDetails,
+} from "../index.js";
+import { j2s } from "../util/helpers.js";
+import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js";
+import { initRetryInfo, updateRetryInfoTimeout } from "../util/retries.js";
+import { guardOperationException, makeErrorDetails } from "./errors.js";
+import { updateExchangeFromUrl } from "./exchanges.js";
+import { InternalWalletState } from "./state";
import {
getExchangeWithdrawalInfo,
- denomSelectionInfoToState,
updateWithdrawalDenoms,
getCandidateWithdrawalDenoms,
selectWithdrawalDenominations,
-} from "./withdraw";
-import { updateExchangeFromUrl } from "./exchanges";
-import { getRandomBytes, encodeCrock } from "../crypto/talerCrypto";
-import { guardOperationException, makeErrorDetails } from "./errors";
-import { NotificationType } from "../types/notifications";
-import { getTimestampNow } from "../util/time";
-import {
- getHttpResponseErrorDetails,
- readSuccessResponseJsonOrThrow,
-} from "../util/http";
-import { URL } from "../util/url";
-import { Logger } from "../util/logging";
-import { checkDbInvariant, checkLogicInvariant } from "../util/invariants";
-import { TalerErrorCode } from "../TalerErrorCode";
-import { initRetryInfo, updateRetryInfoTimeout } from "../util/retries";
-import { j2s } from "../util/helpers";
-import { DerivedTipPlanchet } from "../types/cryptoTypes";
+ denomSelectionInfoToState,
+} from "./withdraw.js";
const logger = new Logger("operations/tip.ts");