summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/backup/import.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-11-27 20:56:58 +0100
committerFlorian Dold <florian@dold.me>2021-11-27 20:57:07 +0100
commit5c4c25516df9d65d29dc7f3f38b5a2a1a8e9e374 (patch)
tree4665e79a6033ab949de211fd9de8de8ca681c2e0 /packages/taler-wallet-core/src/operations/backup/import.ts
parent403de8170ef538ef74505859b1c04e3542cad9fb (diff)
downloadwallet-core-5c4c25516df9d65d29dc7f3f38b5a2a1a8e9e374.tar.gz
wallet-core-5c4c25516df9d65d29dc7f3f38b5a2a1a8e9e374.tar.bz2
wallet-core-5c4c25516df9d65d29dc7f3f38b5a2a1a8e9e374.zip
wallet: support both protocol versions
Diffstat (limited to 'packages/taler-wallet-core/src/operations/backup/import.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/backup/import.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/backup/import.ts b/packages/taler-wallet-core/src/operations/backup/import.ts
index 40fa4cdec..564d39797 100644
--- a/packages/taler-wallet-core/src/operations/backup/import.ts
+++ b/packages/taler-wallet-core/src/operations/backup/import.ts
@@ -27,6 +27,7 @@ import {
BackupRefundState,
RefreshReason,
BackupRefreshReason,
+ DenomKeyType,
} from "@gnu-taler/taler-util";
import {
WalletContractData,
@@ -331,7 +332,10 @@ export async function importBackup(
}
for (const backupDenomination of backupExchangeDetails.denominations) {
- if (backupDenomination.denom_pub.cipher !== 1) {
+ if (
+ backupDenomination.denom_pub.cipher !== DenomKeyType.Rsa &&
+ backupDenomination.denom_pub.cipher !== DenomKeyType.LegacyRsa
+ ) {
throw Error("unsupported cipher");
}
const denomPubHash =