From d5bba630a35fff72b11273fb5e62c2208f9e1f5b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Aug 2017 04:16:12 +0200 Subject: implement returning coins to user's account --- src/webex/wxApi.ts | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/webex/wxApi.ts') diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts index 9d8ba4d1d..1371e27e4 100644 --- a/src/webex/wxApi.ts +++ b/src/webex/wxApi.ts @@ -31,9 +31,11 @@ import { DenominationRecord, ExchangeRecord, PreCoinRecord, + QueryPaymentResult, ReserveCreationInfo, ReserveRecord, - QueryPaymentResult, + SenderWireInfos, + WalletBalance, } from "../types"; import { MessageType, MessageMap } from "./messages"; @@ -296,3 +298,26 @@ export function createReserve(args: { amount: AmountJson, exchange: string, send export function resetDb(): Promise { return callBackend("reset-db", { }); } + +/** + * Get balances for all currencies/exchanges. + */ +export function getBalance(): Promise { + return callBackend("balances", { }); +} + + +/** + * Get possible sender wire infos for getting money + * wired from an exchange. + */ +export function getSenderWireInfos(): Promise { + return callBackend("get-sender-wire-infos", { }); +} + +/** + * Return coins to a bank account. + */ +export function returnCoins(args: { amount: AmountJson, exchange: string, senderWire: object }): Promise { + return callBackend("return-coins", args); +} -- cgit v1.2.3