diff options
Diffstat (limited to 'src/headless')
-rw-r--r-- | src/headless/helpers.ts | 7 | ||||
-rw-r--r-- | src/headless/taler-wallet-cli.ts | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/headless/helpers.ts b/src/headless/helpers.ts index 7a9cd2ca7..791bd6ab5 100644 --- a/src/headless/helpers.ts +++ b/src/headless/helpers.ts @@ -28,6 +28,7 @@ import Axios, { AxiosPromise, AxiosResponse } from "axios"; import { HttpRequestLibrary, HttpRequestOptions, + Headers, } from "../util/http"; import * as amounts from "../util/amounts"; import { Bank } from "./bank"; @@ -83,8 +84,12 @@ export class NodeHttpLib implements HttpRequestLibrary { } return responseJson; }; + const headers = new Headers(); + for (const hn of Object.keys(resp.headers)) { + headers.set(hn, resp.headers[hn]); + } return { - headers: resp.headers, + headers, status: resp.status, text: async () => resp.data, json: makeJson, diff --git a/src/headless/taler-wallet-cli.ts b/src/headless/taler-wallet-cli.ts index 4cec984d5..d2ace124d 100644 --- a/src/headless/taler-wallet-cli.ts +++ b/src/headless/taler-wallet-cli.ts @@ -230,8 +230,8 @@ walletCli break; case TalerUriType.TalerWithdraw: { - const withdrawInfo = await wallet.getWithdrawalInfo(uri); - const selectedExchange = withdrawInfo.suggestedExchange; + const withdrawInfo = await wallet.getWithdrawDetailsForUri(uri); + const selectedExchange = withdrawInfo.bankWithdrawDetails.suggestedExchange; if (!selectedExchange) { console.error("no suggested exchange!"); process.exit(1); |