aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/transaction-list.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-04-20 09:21:28 +0800
committerDan Finlay <dan@danfinlay.com>2016-04-20 09:21:28 +0800
commitf79601ee58a07ec6275d4588845578795f550d84 (patch)
tree5ce3e35ec1cb6b97ae94c2de1d80bd39dbe3fa42 /ui/app/components/transaction-list.js
parentb8c57433ce0f6a50318671912b02082e12a0ecb0 (diff)
downloadtangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.gz
tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.tar.zst
tangerine-wallet-browser-f79601ee58a07ec6275d4588845578795f550d84.zip
Generate explorer link to match current blockchain
Diffstat (limited to 'ui/app/components/transaction-list.js')
-rw-r--r--ui/app/components/transaction-list.js42
1 files changed, 6 insertions, 36 deletions
diff --git a/ui/app/components/transaction-list.js b/ui/app/components/transaction-list.js
index e01c8c1f0..865ce5370 100644
--- a/ui/app/components/transaction-list.js
+++ b/ui/app/components/transaction-list.js
@@ -1,39 +1,9 @@
-/*
-transactions
-:
-Array[3]
-0
-:
-Object
-id
-:
-1461025348948185
-status
-:
-"confirmed"
-time
-:
-1461025348948
-txParams
-:
-Object
-data
-:
-"0x90b98a11000000000000000000000000c5b8dbac4c1d3f152cdeb400e2313f309c410acb00000000000000000000000000000000000000000000000000000000000003e8"
-from
-:
-"0xfdea65c8e26263f6d9a1b5de9555d2931a33b825"
-to
-:
-"0xcd1ca6275b45065c4db4ec024859f8fd9d8d44ba"
-__proto__
-:
-Object
-*/
const h = require('react-hyperscript')
const formatBalance = require('../util').formatBalance
+const addressSummary = require('../util').addressSummary
+const explorerLink = require('../../lib/explorer-link')
-module.exports = function(transactions) {
+module.exports = function(transactions, network) {
return h('details', [
h('summary', [
@@ -41,7 +11,7 @@ module.exports = function(transactions) {
]),
h('.flex-row.flex-space-around', [
- h('div.font-small','Transaction'),
+ h('div.font-small','To'),
h('div.font-small','Amount'),
]),
@@ -56,10 +26,10 @@ module.exports = function(transactions) {
return h('.tx.flex-row.flex-space-around', [
h('a.font-small',
{
- href: 'http://testnet.etherscan.io/tx/0xfc37bda95ce571bd0a393e8e7f6da394f1420a57b7d53f7c93821bff61f9b580',
+ href: explorerLink(transaction.hash, parseInt(network)),
target: '_blank',
},
- '0xfc37bda...b580'),
+ addressSummary(transaction.txParams.to)),
h('div.font-small', formatBalance(transaction.txParams.value))
])
})