From 1548086f50a7e33f17c5a5218fa0fc3383a8a2d5 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 21 Aug 2020 20:56:25 +0530 Subject: make diagnostics, welcome page and permissions work again --- packages/taler-wallet-webextension/src/wxApi.ts | 59 +++---------------------- 1 file changed, 5 insertions(+), 54 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wxApi.ts') diff --git a/packages/taler-wallet-webextension/src/wxApi.ts b/packages/taler-wallet-webextension/src/wxApi.ts index 455d0b8ae..947b63cea 100644 --- a/packages/taler-wallet-webextension/src/wxApi.ts +++ b/packages/taler-wallet-webextension/src/wxApi.ts @@ -130,62 +130,13 @@ export function getTransactions(): Promise { return callBackend("getTransactions", {}); } -/** - * Return coins to a bank account. - */ -export function returnCoins(args: { - amount: AmountJson; - exchange: string; - senderWire: string; -}): Promise { - return callBackend("return-coins", args); -} - -/** - * Look up a purchase in the wallet database from - * the contract terms hash. - */ -export function getPurchaseDetails( - proposalId: string, -): Promise { - return callBackend("get-purchase-details", { proposalId }); -} - -/** - * Get the status of processing a tip. - */ -export function getTipStatus(talerTipUri: string): Promise { - return callBackend("get-tip-status", { talerTipUri }); -} - -/** - * Mark a tip as accepted by the user. - */ -export function acceptTip(talerTipUri: string): Promise { - return callBackend("accept-tip", { talerTipUri }); -} - /** * Download a refund and accept it. */ export function applyRefund( - refundUrl: string, + talerRefundUri: string, ): Promise<{ contractTermsHash: string; proposalId: string }> { - return callBackend("accept-refund", { refundUrl }); -} - -/** - * Abort a failed payment and try to get a refund. - */ -export function abortFailedPayment(contractTermsHash: string): Promise { - return callBackend("abort-failed-payment", { contractTermsHash }); -} - -/** - * Abort a failed payment and try to get a refund. - */ -export function benchmarkCrypto(repetitions: number): Promise { - return callBackend("benchmark-crypto", { repetitions }); + return callBackend("applyRefund", { talerRefundUri }); } /** @@ -212,7 +163,7 @@ export function acceptWithdrawal( * Get diagnostics information */ export function getDiagnostics(): Promise { - return callBackend("get-diagnostics", {}); + return callBackend("wxGetDiagnostics", {}); } /** @@ -221,14 +172,14 @@ export function getDiagnostics(): Promise { export function setExtendedPermissions( value: boolean, ): Promise { - return callBackend("set-extended-permissions", { value }); + return callBackend("wxSetExtendedPermissions", { value }); } /** * Get diagnostics information */ export function getExtendedPermissions(): Promise { - return callBackend("get-extended-permissions", {}); + return callBackend("wxGetExtendedPermissions", {}); } /** -- cgit v1.2.3