aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/backup
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-06-14 16:08:58 +0200
committerFlorian Dold <florian@dold.me>2021-06-14 16:08:58 +0200
commit1cde390c23f2668a3777752632c48febd10a28ee (patch)
treed5efa59c867b8a92e32fde37da841c4c0b8154fd /packages/taler-wallet-core/src/operations/backup
parentbed86d96135d3f7faa34d9c1e377c8fb2b06abea (diff)
downloadwallet-core-1cde390c23f2668a3777752632c48febd10a28ee.tar.xz
fix up imports, no more esm in tests
Diffstat (limited to 'packages/taler-wallet-core/src/operations/backup')
-rw-r--r--packages/taler-wallet-core/src/operations/backup/export.ts9
-rw-r--r--packages/taler-wallet-core/src/operations/backup/import.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/backup/index.ts26
-rw-r--r--packages/taler-wallet-core/src/operations/backup/state.ts6
4 files changed, 22 insertions, 25 deletions
diff --git a/packages/taler-wallet-core/src/operations/backup/export.ts b/packages/taler-wallet-core/src/operations/backup/export.ts
index a62c26d68..4eab9d5ee 100644
--- a/packages/taler-wallet-core/src/operations/backup/export.ts
+++ b/packages/taler-wallet-core/src/operations/backup/export.ts
@@ -24,7 +24,7 @@
/**
* Imports.
*/
-import { hash } from "../../crypto/primitives/nacl-fast";
+import { hash } from "../../crypto/primitives/nacl-fast.js";
import {
WalletBackupContentV1,
BackupExchange,
@@ -49,11 +49,8 @@ import {
BackupRefreshSession,
BackupExchangeDetails,
} from "@gnu-taler/taler-util";
-import { InternalWalletState } from "../state";
-import {
- provideBackupState,
- getWalletBackupState,
-} from "./state";
+import { InternalWalletState } from "../state.js";
+import { provideBackupState, getWalletBackupState } from "./state";
import { Amounts, getTimestampNow } from "@gnu-taler/taler-util";
import {
CoinSourceType,
diff --git a/packages/taler-wallet-core/src/operations/backup/import.ts b/packages/taler-wallet-core/src/operations/backup/import.ts
index b29491948..1caa508ff 100644
--- a/packages/taler-wallet-core/src/operations/backup/import.ts
+++ b/packages/taler-wallet-core/src/operations/backup/import.ts
@@ -50,9 +50,9 @@ import { PayCoinSelection } from "../../util/coinSelection";
import { j2s } from "@gnu-taler/taler-util";
import { checkDbInvariant, checkLogicInvariant } from "../../util/invariants";
import { Logger } from "@gnu-taler/taler-util";
-import { initRetryInfo } from "../../util/retries";
-import { InternalWalletState } from "../state";
-import { provideBackupState } from "./state";
+import { initRetryInfo } from "../../util/retries.js";
+import { InternalWalletState } from "../state.js";
+import { provideBackupState } from "./state.js";
import { makeEventId, TombstoneTag } from "../transactions.js";
import { getExchangeDetails } from "../exchanges.js";
import { GetReadOnlyAccess, GetReadWriteAccess } from "../../util/query.js";
diff --git a/packages/taler-wallet-core/src/operations/backup/index.ts b/packages/taler-wallet-core/src/operations/backup/index.ts
index 86f1df541..00a76bd19 100644
--- a/packages/taler-wallet-core/src/operations/backup/index.ts
+++ b/packages/taler-wallet-core/src/operations/backup/index.ts
@@ -24,7 +24,7 @@
/**
* Imports.
*/
-import { InternalWalletState } from "../state";
+import { InternalWalletState } from "../state.js";
import {
AmountString,
BackupRecovery,
@@ -38,7 +38,7 @@ import {
WalletBackupConfState,
WALLET_BACKUP_STATE_KEY,
} from "../../db.js";
-import { checkDbInvariant, checkLogicInvariant } from "../../util/invariants";
+import { checkDbInvariant, checkLogicInvariant } from "../../util/invariants.js";
import {
bytesToString,
decodeCrock,
@@ -49,7 +49,7 @@ import {
hash,
rsaBlind,
stringToBytes,
-} from "../../crypto/talerCrypto";
+} from "../../crypto/talerCrypto.js";
import { canonicalizeBaseUrl, canonicalJson, j2s } from "@gnu-taler/taler-util";
import {
durationFromSpec,
@@ -57,7 +57,7 @@ import {
Timestamp,
timestampAddDuration,
} from "@gnu-taler/taler-util";
-import { URL } from "../../util/url";
+import { URL } from "../../util/url.js";
import {
buildCodecForObject,
Codec,
@@ -70,11 +70,11 @@ import {
HttpResponseStatus,
readSuccessResponseJsonOrThrow,
readTalerErrorResponse,
-} from "../../util/http";
+} from "../../util/http.js";
import { Logger } from "@gnu-taler/taler-util";
import { gunzipSync, gzipSync } from "fflate";
-import { kdf } from "../../crypto/primitives/kdf";
-import { initRetryInfo } from "../../util/retries";
+import { kdf } from "../../crypto/primitives/kdf.js";
+import { initRetryInfo } from "../../util/retries.js";
import {
ConfirmPayResultType,
PreparePayResultType,
@@ -82,12 +82,12 @@ import {
RecoveryMergeStrategy,
TalerErrorDetails,
} from "@gnu-taler/taler-util";
-import { CryptoApi } from "../../crypto/workers/cryptoApi";
-import { secretbox, secretbox_open } from "../../crypto/primitives/nacl-fast";
-import { checkPaymentByProposalId, confirmPay, preparePayForUri } from "../pay";
-import { exportBackup } from "./export";
-import { BackupCryptoPrecomputedData, importBackup } from "./import";
-import { provideBackupState, getWalletBackupState } from "./state";
+import { CryptoApi } from "../../crypto/workers/cryptoApi.js";
+import { secretbox, secretbox_open } from "../../crypto/primitives/nacl-fast.js";
+import { checkPaymentByProposalId, confirmPay, preparePayForUri } from "../pay.js";
+import { exportBackup } from "./export.js";
+import { BackupCryptoPrecomputedData, importBackup } from "./import.js";
+import { provideBackupState, getWalletBackupState } from "./state.js";
const logger = new Logger("operations/backup.ts");
diff --git a/packages/taler-wallet-core/src/operations/backup/state.ts b/packages/taler-wallet-core/src/operations/backup/state.ts
index 1ab0c027e..bb540d5af 100644
--- a/packages/taler-wallet-core/src/operations/backup/state.ts
+++ b/packages/taler-wallet-core/src/operations/backup/state.ts
@@ -14,16 +14,16 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
+import { encodeCrock, getRandomBytes } from "../../crypto/talerCrypto.js";
import {
ConfigRecord,
WalletBackupConfState,
WalletStoresV1,
WALLET_BACKUP_STATE_KEY,
} from "../../db.js";
-import { getRandomBytes, encodeCrock } from "../../index.js";
-import { checkDbInvariant } from "../../util/invariants";
+import { checkDbInvariant } from "../../util/invariants.js";
import { GetReadOnlyAccess } from "../../util/query.js";
-import { InternalWalletState } from "../state";
+import { InternalWalletState } from "../state.js";
export async function provideBackupState(
ws: InternalWalletState,