From c35b3be7957a90bd1e861c0502736aa1eb7acfbf Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 31 Aug 2019 13:27:12 +0200 Subject: refund view --- src/webex/wxApi.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/webex/wxApi.ts') diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts index d2e8c94f1..7e4d17e37 100644 --- a/src/webex/wxApi.ts +++ b/src/webex/wxApi.ts @@ -41,6 +41,7 @@ import { SenderWireInfos, TipStatus, WalletBalance, + PurchaseDetails, } from "../walletTypes"; import { @@ -91,7 +92,7 @@ async function callBackend( return new Promise((resolve, reject) => { chrome.runtime.sendMessage({ type, detail }, (resp) => { if (typeof resp === "object" && resp && resp.error) { - const e = new WalletApiError(resp.message, resp); + const e = new WalletApiError(resp.error.message, resp.error); reject(e); } else { resolve(resp); @@ -318,8 +319,8 @@ export function getReport(reportUid: string): Promise { * Look up a purchase in the wallet database from * the contract terms hash. */ -export function getPurchase(contractTermsHash: string): Promise { - return callBackend("get-purchase", { contractTermsHash }); +export function getPurchaseDetails(contractTermsHash: string): Promise { + return callBackend("get-purchase-details", { contractTermsHash }); } @@ -356,7 +357,7 @@ export function downloadProposal(url: string): Promise { /** * Download a refund and accept it. */ -export function acceptRefund(refundUrl: string): Promise { +export function applyRefund(refundUrl: string): Promise { return callBackend("accept-refund", { refundUrl }); } -- cgit v1.2.3