diff options
author | Florian Dold <florian@dold.me> | 2022-11-11 20:52:45 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-11-11 20:52:53 +0100 |
commit | 233a354b4728b5efc76d19a530ad85a3a3e2a3d2 (patch) | |
tree | 7e426da749ba8f97bc8a5f4767f31fbc254675a9 /packages/taler-wallet-core/src/operations/testing.ts | |
parent | 22290020fba91253c9885eb9fa193a0dd98fa72f (diff) | |
download | wallet-core-233a354b4728b5efc76d19a530ad85a3a3e2a3d2.tar.xz |
fixes and polyfills for quickjs
Diffstat (limited to 'packages/taler-wallet-core/src/operations/testing.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/testing.ts | 5 |
1 files changed, 4 insertions, 1 deletions
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}`; } |