aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-12-07 11:20:11 +0800
committerDan Finlay <dan@danfinlay.com>2017-12-07 11:20:58 +0800
commit6ff580584a74c6d85f54ce7cfc500db822904957 (patch)
tree9352690d0f68bb33ab0bb409a97c29905bf20150 /ui
parenta78cc013d199547ba865a0d1c2fec9a328ce7e0b (diff)
downloadtangerine-wallet-browser-6ff580584a74c6d85f54ce7cfc500db822904957.tar
tangerine-wallet-browser-6ff580584a74c6d85f54ce7cfc500db822904957.tar.gz
tangerine-wallet-browser-6ff580584a74c6d85f54ce7cfc500db822904957.tar.bz2
tangerine-wallet-browser-6ff580584a74c6d85f54ce7cfc500db822904957.tar.lz
tangerine-wallet-browser-6ff580584a74c6d85f54ce7cfc500db822904957.tar.xz
tangerine-wallet-browser-6ff580584a74c6d85f54ce7cfc500db822904957.tar.zst
tangerine-wallet-browser-6ff580584a74c6d85f54ce7cfc500db822904957.zip
Add retry background method and action
Diffstat (limited to 'ui')
-rw-r--r--ui/app/actions.js6
-rw-r--r--ui/app/components/transaction-list-item.js10
2 files changed, 15 insertions, 1 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 04fd35b20..2ab68b62d 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -168,6 +168,7 @@ var actions = {
callBackgroundThenUpdate,
forceUpdateMetamaskState,
+ retryTransaction,
}
module.exports = actions
@@ -759,6 +760,11 @@ function markAccountsFound () {
return callBackgroundThenUpdate(background.markAccountsFound)
}
+function retryTransaction () {
+ log.debug(`background.retryTransaction`)
+ return callBackgroundThenUpdate(background.retryTransaction)
+}
+
//
// config
//
diff --git a/ui/app/components/transaction-list-item.js b/ui/app/components/transaction-list-item.js
index 891d5e227..ddef4a4ae 100644
--- a/ui/app/components/transaction-list-item.js
+++ b/ui/app/components/transaction-list-item.js
@@ -9,6 +9,7 @@ const CopyButton = require('./copyButton')
const vreme = new (require('vreme'))()
const Tooltip = require('./tooltip')
const numberToBN = require('number-to-bn')
+const actions = require('../actions')
const TransactionIcon = require('./transaction-list-item-icon')
const ShiftListItem = require('./shift-list-item')
@@ -21,6 +22,7 @@ function TransactionListItem () {
TransactionListItem.prototype.render = function () {
const { transaction, network, conversionRate, currentCurrency } = this.props
+ const { status } = transaction
if (transaction.key === 'shapeshift') {
if (network === '1') return h(ShiftListItem, transaction)
}
@@ -32,7 +34,7 @@ TransactionListItem.prototype.render = function () {
var isMsg = ('msgParams' in transaction)
var isTx = ('txParams' in transaction)
- var isPending = transaction.status === 'unapproved'
+ var isPending = status === 'unapproved'
let txParams
if (isTx) {
txParams = transaction.txParams
@@ -97,10 +99,16 @@ TransactionListItem.prototype.render = function () {
showFiat: false,
style: {fontSize: '15px'},
}) : h('.flex-column'),
+
])
)
}
+TransactionListItem.prototype.resubmit = function () {
+ const { transaction } = this.props
+ this.props.dispatch(actions.resubmitTx(transaction.id))
+}
+
function domainField (txParams) {
return h('div', {
style: {