aboutsummaryrefslogtreecommitdiff
path: root/pages/confirm-create-reserve.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-04-27 06:03:04 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-04-27 06:03:04 +0200
commitd0a4f9f934cea5bbb3da90ea13ccf91d9fb1c933 (patch)
tree4c54834cd27034b91a7dc521472c14c190321dec /pages/confirm-create-reserve.tsx
parentb8ac91dbf9a89c7dad0a255154cf1b025c85648a (diff)
downloadwallet-core-d0a4f9f934cea5bbb3da90ea13ccf91d9fb1c933.tar.xz
UI fixes
Diffstat (limited to 'pages/confirm-create-reserve.tsx')
-rw-r--r--pages/confirm-create-reserve.tsx18
1 files changed, 15 insertions, 3 deletions
diff --git a/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx
index 4b4e19363..2c959429f 100644
--- a/pages/confirm-create-reserve.tsx
+++ b/pages/confirm-create-reserve.tsx
@@ -250,9 +250,21 @@ function view(ctrl: Controller) {
function renderReserveCreationDetails(rci: ReserveCreationInfo) {
let denoms = rci.selectedDenoms;
+ let countByPub = {};
+ let uniq = [];
+
+ denoms.forEach((x: Denomination) => {
+ let c = countByPub[x.denom_pub] || 0;
+ if (c == 0) {
+ uniq.push(x);
+ }
+ c += 1;
+ countByPub[x.denom_pub] = c;
+ });
+
function row(denom: Denomination) {
return m("tr", [
- m("td", denom.pub_hash.substr(0, 5) + "..."),
+ m("td", countByPub[denom.denom_pub] + "x"),
m("td", amountToPretty(denom.value)),
m("td", amountToPretty(denom.fee_withdraw)),
m("td", amountToPretty(denom.fee_refresh)),
@@ -267,13 +279,13 @@ function renderReserveCreationDetails(rci: ReserveCreationInfo) {
m("p", `Overhead: ${overheadStr}`),
m("table", [
m("tr", [
- m("th", "Key Hash"),
+ m("th", "Count"),
m("th", "Value"),
m("th", "Withdraw Fee"),
m("th", "Refresh Fee"),
m("th", "Deposit Fee"),
]),
- denoms.map(row)
+ uniq.map(row)
])
];
}