summaryrefslogtreecommitdiff
path: root/src/operations/refresh.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-01-17 22:25:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2020-01-17 22:25:33 +0100
commit9ad8c69782b69e2565bf6cdcb8cca555fced1292 (patch)
treecf5d377beb6b0df21d47c5b10e7aeb138a57f7d8 /src/operations/refresh.ts
parent4dfe451b8a69933fd8c849fd2186a552b2f64b2a (diff)
downloadwallet-core-9ad8c69782b69e2565bf6cdcb8cca555fced1292.tar.gz
wallet-core-9ad8c69782b69e2565bf6cdcb8cca555fced1292.tar.bz2
wallet-core-9ad8c69782b69e2565bf6cdcb8cca555fced1292.zip
fix amount format (how did this ever work before?)
Diffstat (limited to 'src/operations/refresh.ts')
-rw-r--r--src/operations/refresh.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/operations/refresh.ts b/src/operations/refresh.ts
index 87d81cb2d..418ec0469 100644
--- a/src/operations/refresh.ts
+++ b/src/operations/refresh.ts
@@ -236,11 +236,18 @@ async function refreshMelt(
denom_pub_hash: coin.denomPubHash,
denom_sig: coin.denomSig,
rc: refreshSession.hash,
- value_with_fee: refreshSession.amountRefreshInput,
+ value_with_fee: Amounts.toString(refreshSession.amountRefreshInput),
};
logger.trace("melt request:", meltReq);
const resp = await ws.http.postJson(reqUrl.href, meltReq);
if (resp.status !== 200) {
+ console.log(`got status ${resp.status} for refresh/melt`);
+ try {
+ const respJson = await resp.json();
+ console.log(`body of refresh/melt error response:`, JSON.stringify(respJson, undefined, 2));
+ } catch (e) {
+ console.log(`body of refresh/melt error response is not JSON`);
+ }
throw Error(`unexpected status code ${resp.status} for refresh/melt`);
}