summaryrefslogtreecommitdiff
path: root/src/headless
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-12-09 19:59:08 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-12-09 19:59:08 +0100
commit6415564b9259a4a6a2f6ec9cb934eab3d56a1677 (patch)
tree577372a635b5503c1ad81b2af8523a839e790bb7 /src/headless
parent99bccae9fe1588f711e7606dc3c6d7dd4a25675a (diff)
downloadwallet-core-6415564b9259a4a6a2f6ec9cb934eab3d56a1677.tar.gz
wallet-core-6415564b9259a4a6a2f6ec9cb934eab3d56a1677.tar.bz2
wallet-core-6415564b9259a4a6a2f6ec9cb934eab3d56a1677.zip
tos
Diffstat (limited to 'src/headless')
-rw-r--r--src/headless/helpers.ts7
-rw-r--r--src/headless/taler-wallet-cli.ts4
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);