aboutsummaryrefslogtreecommitdiff
path: root/src/webex/wxBackend.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-30 17:27:59 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-30 17:27:59 +0200
commit5ec344290efd937fa82c0704bc7c204a0bf14c78 (patch)
tree7d9594180bbc7b5fa2b4a8dbe24272e7a82301f3 /src/webex/wxBackend.ts
parentdefbf625bdef0f8a666b72b8ce99de5e01af6b91 (diff)
downloadwallet-core-5ec344290efd937fa82c0704bc7c204a0bf14c78.tar.xz
support for tipping protocol changes
Diffstat (limited to 'src/webex/wxBackend.ts')
-rw-r--r--src/webex/wxBackend.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index d31ea388d..5bff4fe0a 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -50,7 +50,6 @@ import * as wxApi from "./wxApi";
import URI = require("urijs");
import Port = chrome.runtime.Port;
import MessageSender = chrome.runtime.MessageSender;
-import { TipToken } from "../talerTypes";
import { BrowserCryptoWorkerFactory } from "../crypto/cryptoApi";
const NeedsWallet = Symbol("NeedsWallet");
@@ -182,7 +181,7 @@ function handleMessage(
return Promise.resolve({ error: "bad url" });
}
const amount = AmountJson.checked(detail.amount);
- return needsWallet().getReserveCreationInfo(detail.baseUrl, amount);
+ return needsWallet().getWithdrawDetailsForAmount(detail.baseUrl, amount);
}
case "get-history": {
// TODO: limit history length
@@ -295,12 +294,10 @@ function handleMessage(
case "accept-refund":
return needsWallet().acceptRefund(detail.refundUrl);
case "get-tip-status": {
- const tipToken = TipToken.checked(detail.tipToken);
- return needsWallet().getTipStatus(tipToken);
+ return needsWallet().getTipStatus(detail.talerTipUri);
}
case "accept-tip": {
- const tipToken = TipToken.checked(detail.tipToken);
- return needsWallet().acceptTip(tipToken);
+ return needsWallet().acceptTip(detail.talerTipUri);
}
case "clear-notification": {
return needsWallet().clearNotification();
@@ -340,7 +337,7 @@ function handleMessage(
return needsWallet().benchmarkCrypto(detail.repetitions);
}
case "get-withdraw-details": {
- return needsWallet().getWithdrawDetails(
+ return needsWallet().getWithdrawDetailsForUri(
detail.talerWithdrawUri,
detail.maybeSelectedExchange,
);