diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations')
-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}`; } |