diff options
author | Florian Dold <florian@dold.me> | 2021-01-05 17:59:50 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-01-05 17:59:50 +0100 |
commit | c032931f22e4d1b44e2a3af52c705db147129024 (patch) | |
tree | 49da75982f72796724b6f03e8e513d85f0c11466 /packages/taler-wallet-core | |
parent | 981ef46267e0b1768b455307ab783874c3006262 (diff) | |
download | wallet-core-c032931f22e4d1b44e2a3af52c705db147129024.tar.xz |
get basic test cases to work with new exchange
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r-- | packages/taler-wallet-core/src/operations/versions.ts | 2 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/types/dbTypes.ts | 15 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/util/talerconfig.ts | 7 |
3 files changed, 16 insertions, 8 deletions
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<string> { const secNorm = section.toUpperCase(); const optNorm = option.toUpperCase(); |