summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-06-02 13:56:29 +0200
committerFlorian Dold <florian@dold.me>2021-06-02 13:56:29 +0200
commit5e6cc41b7a8b41aec30a81b787e5e4b5ed60661a (patch)
tree45614dac0fa24a4c3de873226a1c2ffbb14c840f /packages/taler-wallet-core/src/operations
parent02f1d4b08116c24f0af1f32cb6d82be292fa6d10 (diff)
downloadwallet-core-5e6cc41b7a8b41aec30a81b787e5e4b5ed60661a.tar.gz
wallet-core-5e6cc41b7a8b41aec30a81b787e5e4b5ed60661a.tar.bz2
wallet-core-5e6cc41b7a8b41aec30a81b787e5e4b5ed60661a.zip
fix issues with circular imports
Parts of this commit are from a patch by sebasjm. The circular imports caused an issue with webpack. While we don't use webpack in the wallet, the wallet should still be importable by webpack. Some packages were importing their dependencies via "index.js", which re-exports public exports of the package. This resulted in circular dependencies which were resolved correctly by rollup, but not by webpack.
Diffstat (limited to 'packages/taler-wallet-core/src/operations')
-rw-r--r--packages/taler-wallet-core/src/operations/currencies.ts2
-rw-r--r--packages/taler-wallet-core/src/operations/reserves.ts15
2 files changed, 6 insertions, 11 deletions
diff --git a/packages/taler-wallet-core/src/operations/currencies.ts b/packages/taler-wallet-core/src/operations/currencies.ts
index 5371d4a54..8fd5c62c6 100644
--- a/packages/taler-wallet-core/src/operations/currencies.ts
+++ b/packages/taler-wallet-core/src/operations/currencies.ts
@@ -18,7 +18,7 @@
* Imports.
*/
import { ExchangeRecord, Stores } from "../db.js";
-import { Logger } from "../index.js";
+import { Logger } from "../util/logging";
import { getExchangeDetails } from "./exchanges.js";
import { InternalWalletState } from "./state.js";
diff --git a/packages/taler-wallet-core/src/operations/reserves.ts b/packages/taler-wallet-core/src/operations/reserves.ts
index d06ce31ed..885865af7 100644
--- a/packages/taler-wallet-core/src/operations/reserves.ts
+++ b/packages/taler-wallet-core/src/operations/reserves.ts
@@ -40,16 +40,6 @@ import {
ReserveRecord,
WithdrawalGroupRecord,
} from "../db.js";
-import {
- Logger,
- encodeCrock,
- getRandomBytes,
- readSuccessResponseJsonOrThrow,
- URL,
- readSuccessResponseJsonOrErrorCode,
- throwUnexpectedRequestError,
- TransactionHandle,
-} from "../index.js";
import { assertUnreachable } from "../util/assertUnreachable.js";
import { canonicalizeBaseUrl } from "@gnu-taler/taler-util";
import {
@@ -73,6 +63,11 @@ import {
getBankWithdrawalInfo,
} from "./withdraw.js";
import { getExchangeTrust } from "./currencies.js";
+import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto.js";
+import { Logger } from "../util/logging.js";
+import { readSuccessResponseJsonOrErrorCode, readSuccessResponseJsonOrThrow, throwUnexpectedRequestError } from "../util/http.js";
+import { URL } from "../util/url.js";
+import { TransactionHandle } from "../util/query.js";
const logger = new Logger("reserves.ts");