From c032931f22e4d1b44e2a3af52c705db147129024 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 5 Jan 2021 17:59:50 +0100 Subject: get basic test cases to work with new exchange --- packages/taler-wallet-core/src/operations/versions.ts | 2 +- packages/taler-wallet-core/src/types/dbTypes.ts | 15 ++++++++------- packages/taler-wallet-core/src/util/talerconfig.ts | 7 +++++++ 3 files changed, 16 insertions(+), 8 deletions(-) (limited to 'packages/taler-wallet-core/src') diff --git a/packages/taler-wallet-core/src/operations/versions.ts b/packages/taler-wallet-core/src/operations/versions.ts index 11ff8f528..b798871c2 100644 --- a/packages/taler-wallet-core/src/operations/versions.ts +++ b/packages/taler-wallet-core/src/operations/versions.ts @@ -19,7 +19,7 @@ * * Uses libtool's current:revision:age versioning. */ -export const WALLET_EXCHANGE_PROTOCOL_VERSION = "8:0:0"; +export const WALLET_EXCHANGE_PROTOCOL_VERSION = "9:0:0"; /** * Protocol version spoken with the merchant. diff --git a/packages/taler-wallet-core/src/types/dbTypes.ts b/packages/taler-wallet-core/src/types/dbTypes.ts index 2f9c0ec19..dcfdf3316 100644 --- a/packages/taler-wallet-core/src/types/dbTypes.ts +++ b/packages/taler-wallet-core/src/types/dbTypes.ts @@ -1206,7 +1206,7 @@ export interface PurchaseRecord { /** * Deposit permissions, available once the user has accepted the payment. - * + * * This value is cached and derived from payCoinSelection. */ coinDepositPermissions: CoinDepositPermission[] | undefined; @@ -1508,12 +1508,12 @@ class PurchasesStore extends Store<"purchases", PurchaseRecord> { "fulfillmentUrlIndex", string, PurchaseRecord - >(this, "fulfillmentUrlIndex", "contractData.fulfillmentUrl"); + >(this, "fulfillmentUrlIndex", "download.contractData.fulfillmentUrl"); orderIdIndex = new Index<"purchases", "orderIdIndex", string, PurchaseRecord>( this, "orderIdIndex", - ["contractData.merchantBaseUrl", "contractData.orderId"], + ["download.contractData.merchantBaseUrl", "download.contractData.orderId"], ); } @@ -1602,11 +1602,12 @@ class PlanchetsStore extends Store<"planchets", PlanchetRecord> { PlanchetRecord >(this, "withdrawalGroupIndex", "withdrawalGroupId"); - coinEvHashIndex = new Index<"planchets", "coinEvHashIndex", string, PlanchetRecord>( - this, + coinEvHashIndex = new Index< + "planchets", "coinEvHashIndex", - "coinEvHash", - ); + string, + PlanchetRecord + >(this, "coinEvHashIndex", "coinEvHash"); } /** diff --git a/packages/taler-wallet-core/src/util/talerconfig.ts b/packages/taler-wallet-core/src/util/talerconfig.ts index d121601c5..fa8c2d40f 100644 --- a/packages/taler-wallet-core/src/util/talerconfig.ts +++ b/packages/taler-wallet-core/src/util/talerconfig.ts @@ -213,6 +213,13 @@ export class Configuration { sec[option.toUpperCase()] = value; } + /** + * Get lower-cased section names. + */ + getSectionNames(): string[] { + return Object.keys(this.sectionMap).map((x) => x.toLowerCase()); + } + getString(section: string, option: string): ConfigValue { const secNorm = section.toUpperCase(); const optNorm = option.toUpperCase(); -- cgit v1.2.3