diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-12-11 17:46:06 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-12-11 17:46:06 +0100 |
commit | c87a0d55145f140b1f104437ecdd1a1ca1040186 (patch) | |
tree | a7ffa0c89520a573360d6fd4a65bf7727888a1c4 /src/webex | |
parent | 2f441cd1b9e069a0976750b075d36de1f051a0e3 (diff) | |
download | wallet-core-c87a0d55145f140b1f104437ecdd1a1ca1040186.tar.xz |
show next url to go after tipping
Diffstat (limited to 'src/webex')
-rw-r--r-- | src/webex/notify.ts | 2 | ||||
-rw-r--r-- | src/webex/pages/tip.tsx | 2 | ||||
-rw-r--r-- | src/webex/wxApi.ts | 4 | ||||
-rw-r--r-- | src/webex/wxBackend.ts | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/webex/notify.ts b/src/webex/notify.ts index 1da8af1cd..05883e8bb 100644 --- a/src/webex/notify.ts +++ b/src/webex/notify.ts @@ -272,7 +272,7 @@ function talerPay(msg: any): Promise<any> { const merchantDomain = new URI(document.location.href).origin(); let walletResp; try { - walletResp = await wxApi.getTipPlanchets(merchantDomain, tipToken.tip_id, tipToken.amount, deadlineSec, tipToken.exchange_url); + walletResp = await wxApi.getTipPlanchets(merchantDomain, tipToken.tip_id, tipToken.amount, deadlineSec, tipToken.exchange_url, tipToken.next_url); } catch (e) { wxApi.logAndDisplayError({ message: e.message, diff --git a/src/webex/pages/tip.tsx b/src/webex/pages/tip.tsx index 7f3a7c1fe..678c0dfdd 100644 --- a/src/webex/pages/tip.tsx +++ b/src/webex/pages/tip.tsx @@ -121,7 +121,7 @@ class TipDisplay extends React.Component<TipDisplayProps, TipDisplayState> { <h2>Tip Received!</h2> <p>You received a tip of <strong>{renderAmount(ts.tip.amount)}</strong> from <strong>{this.props.merchantDomain}</strong>.</p> {ts.tip.accepted - ? <p>You've accepted this tip!</p> + ? <p>You've accepted this tip! <a href={ts.tip.nextUrl}>Go back to merchant</a></p> : this.renderButtons() } {this.renderExchangeInfo(ts)} diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts index e362fc34a..61a45c024 100644 --- a/src/webex/wxApi.ts +++ b/src/webex/wxApi.ts @@ -366,8 +366,8 @@ 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): Promise<TipPlanchetDetail[]> { - return callBackend("get-tip-planchets", { merchantDomain, tipId, amount, deadline, exchangeUrl }); +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 }); } export function getTipStatus(merchantDomain: string, tipId: string): Promise<TipStatus> { diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts index fd5df7e47..a7757c68e 100644 --- a/src/webex/wxBackend.ts +++ b/src/webex/wxBackend.ts @@ -335,7 +335,7 @@ function handleMessage(sender: MessageSender, } case "get-tip-planchets": { const req = GetTipPlanchetsRequest.checked(detail); - return needsWallet().getTipPlanchets(req.merchantDomain, req.tipId, req.amount, req.deadline, req.exchangeUrl); + return needsWallet().getTipPlanchets(req.merchantDomain, req.tipId, req.amount, req.deadline, req.exchangeUrl, req.nextUrl); } default: // Exhaustiveness check. |