diff options
author | tg(x) <*@tg-x.net> | 2016-10-05 00:02:10 +0200 |
---|---|---|
committer | tg(x) <*@tg-x.net> | 2016-10-05 00:02:10 +0200 |
commit | ec62d29c90958aa8d41474ed2fe5a179d6fafed7 (patch) | |
tree | 367cc55bc6772cf194ed6c4778cd344d581d3d7c /pages/confirm-create-reserve.tsx | |
parent | fda241d74d5c1c39203b64da676c684d4dc9d800 (diff) | |
parent | d3ccf4103900b8d990b1970d135695b938d94eae (diff) |
Merge branch 'master' of taler.net:/var/git/wallet-webex
Diffstat (limited to 'pages/confirm-create-reserve.tsx')
-rw-r--r-- | pages/confirm-create-reserve.tsx | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx index 0a509118d..8e8067052 100644 --- a/pages/confirm-create-reserve.tsx +++ b/pages/confirm-create-reserve.tsx @@ -214,6 +214,10 @@ function viewSimple(ctrl: Controller) { }, "advanced options"); } else if (ctrl.reserveCreationInfo != undefined) { + let totalCost = Amounts.add(ctrl.reserveCreationInfo.overhead, + ctrl.reserveCreationInfo.withdrawFee).amount; + yield m("p", `Withdraw fees: ${amountToPretty(totalCost)}`); + yield m("button.accept", { onclick: () => ctrl.confirmReserve(ctrl.reserveCreationInfo!, ctrl.url(), @@ -228,9 +232,6 @@ function viewSimple(ctrl: Controller) { ctrl.complexViewRequested = true; } }, "advanced options"); - let totalCost = Amounts.add(ctrl.reserveCreationInfo.overhead, - ctrl.reserveCreationInfo.withdrawFee).amount; - yield m("p", `Withdraw cost: ${amountToPretty(totalCost)}`); } else { yield m("p", "Please wait ..."); } @@ -242,6 +243,12 @@ function viewSimple(ctrl: Controller) { function viewComplex(ctrl: Controller) { function *f() { + if (ctrl.reserveCreationInfo) { + let totalCost = Amounts.add(ctrl.reserveCreationInfo.overhead, + ctrl.reserveCreationInfo.withdrawFee).amount; + yield m("p", `Withdraw fees: ${amountToPretty(totalCost)}`); + } + yield m("button.accept", { onclick: () => ctrl.confirmReserve(ctrl.reserveCreationInfo!, ctrl.url(), @@ -277,9 +284,6 @@ function viewComplex(ctrl: Controller) { } if (ctrl.reserveCreationInfo) { - let totalCost = Amounts.add(ctrl.reserveCreationInfo.overhead, - ctrl.reserveCreationInfo.withdrawFee).amount; - yield m("p", `Withdraw cost: ${amountToPretty(totalCost)}`); if (ctrl.detailCollapsed()) { yield m("button.linky", { onclick: () => { @@ -328,8 +332,8 @@ function renderReserveCreationDetails(rci: ReserveCreationInfo) { let withdrawFeeStr = amountToPretty(rci.withdrawFee); let overheadStr = amountToPretty(rci.overhead); return [ - m("p", `Fee for withdrawal: ${withdrawFeeStr}`), - m("p", `Overhead: ${overheadStr}`), + m("p", `Withdrawal fees: ${withdrawFeeStr}`), + m("p", `Rounding loss: ${overheadStr}`), m("table", [ m("tr", [ m("th", "Count"), |