From ee56a38b0d752bfadca905f4dd363b7b1f73f58d Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Fri, 11 Nov 2016 05:09:43 -0500 Subject: [PATCH] Wallet page: Show placeholder text for dates on pending transactions --- js/page/wallet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/page/wallet.js b/js/page/wallet.js index 6f55d0876..7f5c536cc 100644 --- a/js/page/wallet.js +++ b/js/page/wallet.js @@ -179,7 +179,7 @@ var TransactionList = React.createClass({ { transactionItems.push({ id: txid, - date: new Date(parseInt(tx["timestamp"]) * 1000), + date: tx["timestamp"] ? (new Date(parseInt(tx["timestamp"]) * 1000)) : null, amount: condensedTransactions[txid] }); delete condensedTransactions[txid]; @@ -198,8 +198,8 @@ var TransactionList = React.createClass({ rows.push( { (item.amount > 0 ? '+' : '' ) + item.amount } - { item.date.toLocaleDateString() } - { item.date.toLocaleTimeString() } + { item.date ? item.date.toLocaleDateString() : (Transaction pending) } + { item.date ? item.date.toLocaleTimeString() : (Transaction pending) } {item.id.substr(0, 7)}