summaryrefslogtreecommitdiff
path: root/src/webex/wxApi.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/webex/wxApi.ts')
-rw-r--r--src/webex/wxApi.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts
index 4f7500368..feabc7819 100644
--- a/src/webex/wxApi.ts
+++ b/src/webex/wxApi.ts
@@ -79,6 +79,8 @@ export interface UpgradeResponse {
export class WalletApiError extends Error {
constructor(message: string, public detail: any) {
super(message);
+ // restore prototype chain
+ Object.setPrototypeOf(this, new.target.prototype);
}
}
@@ -401,3 +403,24 @@ export function abortFailedPayment(contractTermsHash: string) {
export function benchmarkCrypto(repetitions: number): Promise<BenchmarkResult> {
return callBackend("benchmark-crypto", { repetitions });
}
+
+/**
+ * Get details about a withdraw operation.
+ */
+export function getWithdrawDetails(talerWithdrawUri: string, maybeSelectedExchange: string | undefined) {
+ return callBackend("get-withdraw-details", { talerWithdrawUri, maybeSelectedExchange });
+}
+
+/**
+ * Get details about a pay operation.
+ */
+export function preparePay(talerPayUri: string) {
+ return callBackend("prepare-pay", { talerPayUri });
+}
+
+/**
+ * Get details about a withdraw operation.
+ */
+export function acceptWithdrawal(talerWithdrawUri: string, selectedExchange: string) {
+ return callBackend("accept-withdrawal", { talerWithdrawUri, selectedExchange });
+} \ No newline at end of file