diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-03 14:42:06 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-03 14:42:06 +0100 |
commit | fd2cd9c383b07cd681c18137396deae025d98047 (patch) | |
tree | 05de454bb6fc0fcb95b66b6ef87bcd555e81b58c /src/webex/wxApi.ts | |
parent | eb689d60aca8fc80e27ea60c4e4d7e848b01bea9 (diff) | |
download | wallet-core-fd2cd9c383b07cd681c18137396deae025d98047.tar.xz |
fix lint issues and separate message types into multiple files
Diffstat (limited to 'src/webex/wxApi.ts')
-rw-r--r-- | src/webex/wxApi.ts | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts index 2575eec90..2f7a13c48 100644 --- a/src/webex/wxApi.ts +++ b/src/webex/wxApi.ts @@ -22,26 +22,31 @@ /** * Imports. */ +import { AmountJson } from "../amounts"; import { - AmountJson, - CheckPayResult, CoinRecord, - ConfirmPayResult, CurrencyRecord, DenominationRecord, ExchangeRecord, PreCoinRecord, PurchaseRecord, + ReserveRecord, +} from "../dbTypes"; +import { + CheckPayResult, + ConfirmPayResult, QueryPaymentResult, - RefundPermission, ReserveCreationInfo, - ReserveRecord, SenderWireInfos, - TipResponse, - TipPlanchetDetail, TipStatus, WalletBalance, -} from "../types"; +} from "../walletTypes"; + +import { + RefundPermission, + TipPlanchetDetail, + TipResponse, +} from "../talerTypes"; import { MessageMap, MessageType } from "./messages"; @@ -366,22 +371,39 @@ export function getFullRefundFees(args: { refundPermissions: RefundPermission[] /** * Get or generate planchets to give the merchant that wants to tip us. */ -export function getTipPlanchets(merchantDomain: string, tipId: string, amount: AmountJson, deadline: number, exchangeUrl: string, nextUrl: string): Promise<TipPlanchetDetail[]> { +export function getTipPlanchets(merchantDomain: string, + tipId: string, + amount: AmountJson, + deadline: number, + exchangeUrl: string, + nextUrl: string): Promise<TipPlanchetDetail[]> { return callBackend("get-tip-planchets", { merchantDomain, tipId, amount, deadline, exchangeUrl, nextUrl }); } +/** + * Get the status of processing a tip. + */ export function getTipStatus(merchantDomain: string, tipId: string): Promise<TipStatus> { return callBackend("get-tip-status", { merchantDomain, tipId }); } +/** + * Mark a tip as accepted by the user. + */ export function acceptTip(merchantDomain: string, tipId: string): Promise<TipStatus> { return callBackend("accept-tip", { merchantDomain, tipId }); } +/** + * Process a response from the merchant for a tip request. + */ export function processTipResponse(merchantDomain: string, tipId: string, tipResponse: TipResponse): Promise<void> { return callBackend("process-tip-response", { merchantDomain, tipId, tipResponse }); } +/** + * Clear notifications that the wallet shows to the user. + */ export function clearNotification(): Promise<void> { return callBackend("clear-notification", { }); } |