diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-03-09 16:37:46 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-03-09 16:37:46 +0530 |
commit | 26d961ad633027f50ee402b9a7e7fa383c2b33c3 (patch) | |
tree | cfaa7a80d4c38980ddb62bd39ea61b3f87916688 /src/operations/refresh.ts | |
parent | bf1b350d4410cfc7c3e9ae3a717343c9ef19625a (diff) | |
download | wallet-core-26d961ad633027f50ee402b9a7e7fa383c2b33c3.tar.xz |
support exchange API version 7:0:0
Diffstat (limited to 'src/operations/refresh.ts')
-rw-r--r-- | src/operations/refresh.ts | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/operations/refresh.ts b/src/operations/refresh.ts index b53baf390..6dd16d61a 100644 --- a/src/operations/refresh.ts +++ b/src/operations/refresh.ts @@ -229,7 +229,10 @@ async function refreshMelt( return; } - const reqUrl = new URL("refresh/melt", refreshSession.exchangeBaseUrl); + const reqUrl = new URL( + `coins/${coin.coinPub}/melt`, + refreshSession.exchangeBaseUrl, + ); const meltReq = { coin_pub: coin.coinPub, confirm_sig: refreshSession.confirmSig, @@ -244,7 +247,10 @@ async function refreshMelt( 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)); + 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`); } @@ -344,7 +350,10 @@ async function refreshReveal( link_sigs: linkSigs, }; - const reqUrl = new URL("refresh/reveal", refreshSession.exchangeBaseUrl); + const reqUrl = new URL( + `refreshes/${refreshSession.hash}/reveal`, + refreshSession.exchangeBaseUrl, + ); logger.trace("reveal request:", req); let resp; @@ -523,7 +532,9 @@ async function processRefreshSession( refreshGroupId: string, coinIndex: number, ) { - logger.trace(`processing refresh session for coin ${coinIndex} of group ${refreshGroupId}`); + logger.trace( + `processing refresh session for coin ${coinIndex} of group ${refreshGroupId}`, + ); let refreshGroup = await ws.db.get(Stores.refreshGroups, refreshGroupId); if (!refreshGroup) { return; |