summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wxApi.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-08-21 20:56:25 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-08-21 20:56:25 +0530
commit1548086f50a7e33f17c5a5218fa0fc3383a8a2d5 (patch)
treeb37efb0c5b5e9bb40fdf131c68f2529bca1a9625 /packages/taler-wallet-webextension/src/wxApi.ts
parent8d72b93a174ed3fbfa52b6fb67976fdfcbd40efc (diff)
downloadwallet-core-1548086f50a7e33f17c5a5218fa0fc3383a8a2d5.tar.gz
wallet-core-1548086f50a7e33f17c5a5218fa0fc3383a8a2d5.tar.bz2
wallet-core-1548086f50a7e33f17c5a5218fa0fc3383a8a2d5.zip
make diagnostics, welcome page and permissions work again
Diffstat (limited to 'packages/taler-wallet-webextension/src/wxApi.ts')
-rw-r--r--packages/taler-wallet-webextension/src/wxApi.ts59
1 files changed, 5 insertions, 54 deletions
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
@@ -131,61 +131,12 @@ export function getTransactions(): Promise<TransactionsResponse> {
}
/**
- * Return coins to a bank account.
- */
-export function returnCoins(args: {
- amount: AmountJson;
- exchange: string;
- senderWire: string;
-}): Promise<void> {
- return callBackend("return-coins", args);
-}
-
-/**
- * Look up a purchase in the wallet database from
- * the contract terms hash.
- */
-export function getPurchaseDetails(
- proposalId: string,
-): Promise<PurchaseDetails> {
- return callBackend("get-purchase-details", { proposalId });
-}
-
-/**
- * Get the status of processing a tip.
- */
-export function getTipStatus(talerTipUri: string): Promise<TipStatus> {
- return callBackend("get-tip-status", { talerTipUri });
-}
-
-/**
- * Mark a tip as accepted by the user.
- */
-export function acceptTip(talerTipUri: string): Promise<void> {
- 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<void> {
- return callBackend("abort-failed-payment", { contractTermsHash });
-}
-
-/**
- * Abort a failed payment and try to get a refund.
- */
-export function benchmarkCrypto(repetitions: number): Promise<BenchmarkResult> {
- return callBackend("benchmark-crypto", { repetitions });
+ return callBackend("applyRefund", { talerRefundUri });
}
/**
@@ -212,7 +163,7 @@ export function acceptWithdrawal(
* Get diagnostics information
*/
export function getDiagnostics(): Promise<WalletDiagnostics> {
- return callBackend("get-diagnostics", {});
+ return callBackend("wxGetDiagnostics", {});
}
/**
@@ -221,14 +172,14 @@ export function getDiagnostics(): Promise<WalletDiagnostics> {
export function setExtendedPermissions(
value: boolean,
): Promise<ExtendedPermissionsResponse> {
- return callBackend("set-extended-permissions", { value });
+ return callBackend("wxSetExtendedPermissions", { value });
}
/**
* Get diagnostics information
*/
export function getExtendedPermissions(): Promise<ExtendedPermissionsResponse> {
- return callBackend("get-extended-permissions", {});
+ return callBackend("wxGetExtendedPermissions", {});
}
/**