diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/idb-bridge/package.json | 2 | ||||
-rw-r--r-- | packages/idb-bridge/src/MemoryBackend.ts | 1 | ||||
-rw-r--r-- | packages/idb-bridge/src/util/structuredClone.ts | 4 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts | 4 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay.ts | 5 |
5 files changed, 6 insertions, 10 deletions
diff --git a/packages/idb-bridge/package.json b/packages/idb-bridge/package.json index 52bc872da..f3ed0888f 100644 --- a/packages/idb-bridge/package.json +++ b/packages/idb-bridge/package.json @@ -19,6 +19,7 @@ "@rollup/plugin-commonjs": "^17.1.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^11.2.0", + "@types/lodash": "^4.14.178", "@types/node": "^14.14.22", "ava": "^3.15.0", "esm": "^3.2.25", @@ -28,6 +29,7 @@ "typescript": "^4.1.3" }, "dependencies": { + "lodash": "^4.17.21", "tslib": "^2.1.0" }, "ava": { diff --git a/packages/idb-bridge/src/MemoryBackend.ts b/packages/idb-bridge/src/MemoryBackend.ts index 9233e8d88..41d0d7fbb 100644 --- a/packages/idb-bridge/src/MemoryBackend.ts +++ b/packages/idb-bridge/src/MemoryBackend.ts @@ -1070,6 +1070,7 @@ export class MemoryBackend implements Backend { btx: DatabaseTransaction, req: RecordGetRequest, ): Promise<RecordGetResponse> { + console.log(`getRecords ${req.objectStoreName}`); if (this.enableTracing) { console.log(`TRACING: getRecords`); console.log("query", req); diff --git a/packages/idb-bridge/src/util/structuredClone.ts b/packages/idb-bridge/src/util/structuredClone.ts index 181e9ca0e..b6b537433 100644 --- a/packages/idb-bridge/src/util/structuredClone.ts +++ b/packages/idb-bridge/src/util/structuredClone.ts @@ -14,6 +14,8 @@ permissions and limitations under the License. */ +import cloneDeep from "lodash/cloneDeep"; + const { toString: toStr } = {}; const hasOwn = {}.hasOwnProperty; const getProto = Object.getPrototypeOf; @@ -260,5 +262,5 @@ export function structuredRevive(val: any): any { * Structured clone for IndexedDB. */ export function structuredClone(val: any): any { - return structuredRevive(structuredEncapsulate(val)); + return cloneDeep(val); } diff --git a/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts b/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts index b5569fadd..04bc2d9bc 100644 --- a/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts +++ b/packages/taler-wallet-core/src/crypto/workers/cryptoImplementation.ts @@ -270,7 +270,6 @@ export class CryptoImplementation { const coinPriv = decodeCrock(coin.coinPriv); const coinSig = eddsaSign(p, coinPriv); if (coin.denomPub.cipher === DenomKeyType.LegacyRsa) { - logger.info("creating legacy recoup request"); const paybackRequest: RecoupRequest = { coin_blind_key_secret: coin.blindingKey, coin_pub: coin.coinPub, @@ -281,7 +280,6 @@ export class CryptoImplementation { }; return paybackRequest; } else { - logger.info("creating v10 recoup request"); const paybackRequest: RecoupRequest = { coin_blind_key_secret: coin.blindingKey, coin_pub: coin.coinPub, @@ -453,7 +451,6 @@ export class CryptoImplementation { const hExt = new Uint8Array(64); let d: Uint8Array; if (depositInfo.denomKeyType === DenomKeyType.Rsa) { - logger.warn("signing v10 deposit permission"); d = buildSigPS(TalerSignaturePurpose.WALLET_COIN_DEPOSIT) .put(decodeCrock(depositInfo.contractTermsHash)) .put(hExt) @@ -466,7 +463,6 @@ export class CryptoImplementation { .put(decodeCrock(depositInfo.merchantPub)) .build(); } else if (depositInfo.denomKeyType === DenomKeyType.LegacyRsa) { - logger.warn("signing legacy deposit permission"); d = buildSigPS(TalerSignaturePurpose.WALLET_COIN_DEPOSIT) .put(decodeCrock(depositInfo.contractTermsHash)) .put(decodeCrock(depositInfo.wireInfoHash)) diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts index 5aa234963..63ccc6531 100644 --- a/packages/taler-wallet-core/src/operations/pay.ts +++ b/packages/taler-wallet-core/src/operations/pay.ts @@ -1658,11 +1658,6 @@ export async function confirmPay( throw Error("proposal is in invalid state"); } - const merchantInfo = await ws.merchantOps.getMerchantInfo( - ws, - d.contractData.merchantBaseUrl, - ); - const existingPurchase = await ws.db .mktx((x) => ({ purchases: x.purchases })) .runReadWrite(async (tx) => { |