From 233a354b4728b5efc76d19a530ad85a3a3e2a3d2 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 11 Nov 2022 20:52:45 +0100 Subject: fixes and polyfills for quickjs --- packages/taler-wallet-core/src/operations/testing.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'packages/taler-wallet-core/src/operations/testing.ts') diff --git a/packages/taler-wallet-core/src/operations/testing.ts b/packages/taler-wallet-core/src/operations/testing.ts index 9a11af8bb..50454a920 100644 --- a/packages/taler-wallet-core/src/operations/testing.ts +++ b/packages/taler-wallet-core/src/operations/testing.ts @@ -18,8 +18,10 @@ * Imports. */ import { + base64FromArrayBuffer, ConfirmPayResultType, Logger, + stringToBytes, TestPayResult, WithdrawTestBalanceRequest, } from "@gnu-taler/taler-util"; @@ -78,10 +80,11 @@ function makeId(length: number): string { /** * Helper function to generate the "Authorization" HTTP header. + * FIXME: redundant, put in taler-util */ function makeBasicAuthHeader(username: string, password: string): string { const auth = `${username}:${password}`; - const authEncoded: string = Buffer.from(auth).toString("base64"); + const authEncoded: string = base64FromArrayBuffer(stringToBytes(auth)); return `Basic ${authEncoded}`; } -- cgit v1.2.3