aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/tx-list.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2017-09-13 04:40:28 +0800
committerChi Kei Chan <chikeichan@gmail.com>2017-09-14 05:22:58 +0800
commit55d62190e3ec06b1b21ed3ba24b2f2a9bc137568 (patch)
treedc530ddb875efe1bc1c7e13858f8b22c25974606 /ui/app/components/tx-list.js
parent6fa1cd62258ba96d1a55bee140f2d1f10f091ed2 (diff)
downloadtangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.tar.gz
tangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.tar.zst
tangerine-wallet-browser-55d62190e3ec06b1b21ed3ba24b2f2a9bc137568.zip
Fixes the saving of transactions in send and display in tx-list with conversion utility.
Diffstat (limited to 'ui/app/components/tx-list.js')
-rw-r--r--ui/app/components/tx-list.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js
index a7d11203d..e3578646b 100644
--- a/ui/app/components/tx-list.js
+++ b/ui/app/components/tx-list.js
@@ -40,26 +40,26 @@ TxList.prototype.render = function () {
]),
]),
- this.renderTranstions(),
+ this.renderTransaction(),
])
}
-TxList.prototype.renderTranstions = function () {
- const { txsToRender } = this.props
+TxList.prototype.renderTransaction = function () {
+ const { txsToRender, conversionRate } = this.props
return txsToRender.length
- ? txsToRender.map((transaction) => this.renderTransactionListItem(transaction))
+ ? txsToRender.map((transaction) => this.renderTransactionListItem(transaction, conversionRate))
: [h('div.tx-list-item.tx-list-item--empty', [ 'No Transactions' ])]
}
// TODO: Consider moving TxListItem into a separate component
-TxList.prototype.renderTransactionListItem = function (transaction) {
+TxList.prototype.renderTransactionListItem = function (transaction, conversionRate) {
const props = {
dateString: formatDate(transaction.time),
address: transaction.txParams.to,
transactionStatus: transaction.status,
- transactionAmount: formatBalance(transaction.txParams.value, 6),
+ transactionAmount: transaction.txParams.value,
transActionId: transaction.id,
transactionHash: transaction.hash,
transactionNetworkId: transaction.metamaskNetworkId,
@@ -85,6 +85,7 @@ TxList.prototype.renderTransactionListItem = function (transaction) {
transactionAmount,
transactionHash,
className: '.tx-list-item.tx-list-clickable',
+ conversionRate,
}
if (transactionStatus === 'unapproved') {