diff options
| author | Florian Dold <florian@dold.me> | 2021-06-10 10:37:49 +0200 | 
|---|---|---|
| committer | Florian Dold <florian@dold.me> | 2021-06-10 10:37:49 +0200 | 
| commit | 7b7e3b4565169835ad04062d5c76ba655abd770a (patch) | |
| tree | a6fe6ade0852d85e91410d57f52c18cb6c547197 /packages/taler-wallet-core/src/util | |
| parent | 67e5d68b9309c6d35a92bb052879c41854b2ea73 (diff) | |
transaction fixes
Diffstat (limited to 'packages/taler-wallet-core/src/util')
| -rw-r--r-- | packages/taler-wallet-core/src/util/query.ts | 14 | 
1 files changed, 10 insertions, 4 deletions
| diff --git a/packages/taler-wallet-core/src/util/query.ts b/packages/taler-wallet-core/src/util/query.ts index ab5a1fc7a..cf3f791d5 100644 --- a/packages/taler-wallet-core/src/util/query.ts +++ b/packages/taler-wallet-core/src/util/query.ts @@ -454,8 +454,11 @@ function makeReadContext(      const indexes: { [s: string]: IndexReadOnlyAccessor<any> } = {};      const swi = storePick[storeAlias];      const storeName = swi.store.name; -    for (const indexName in storePick[storeAlias].indexMap) { -      indexes[indexName] = { +    for (const indexAlias in storePick[storeAlias].indexMap) { +      const indexDescriptor: IndexDescriptor = +        storePick[storeAlias].indexMap[indexAlias]; +      const indexName = indexDescriptor.name; +      indexes[indexAlias] = {          get(key) {            const req = tx.objectStore(storeName).index(indexName).get(key);            return requestToPromise(req); @@ -493,8 +496,11 @@ function makeWriteContext(      const indexes: { [s: string]: IndexReadWriteAccessor<any> } = {};      const swi = storePick[storeAlias];      const storeName = swi.store.name; -    for (const indexName in storePick[storeAlias].indexMap) { -      indexes[indexName] = { +    for (const indexAlias in storePick[storeAlias].indexMap) { +      const indexDescriptor: IndexDescriptor = +        storePick[storeAlias].indexMap[indexAlias]; +      const indexName = indexDescriptor.name; +      indexes[indexAlias] = {          get(key) {            const req = tx.objectStore(storeName).index(indexName).get(key);            return requestToPromise(req); | 
