Use correct action to update and submit tx

feature/default_network_editable
Dan Finlay 8 years ago
parent 39c824f2f3
commit f908aaafbc
  1. 1
      app/scripts/metamask-controller.js
  2. 4
      ui/app/actions.js
  3. 2
      ui/app/conf-tx.js

@ -463,6 +463,7 @@ module.exports = class MetamaskController extends EventEmitter {
} }
updateAndApproveTx(txMeta, cb) { updateAndApproveTx(txMeta, cb) {
log.debug(`MetaMaskController - updateAndApproveTx: ${JSON.stringify(txMeta)}`)
const txManager = this.txManager const txManager = this.txManager
txManager.updateTx(txMeta) txManager.updateTx(txMeta)
txManager.approveTransaction(txMeta.id, cb) txManager.approveTransaction(txMeta.id, cb)

@ -399,7 +399,7 @@ function signTx (txData) {
} }
function sendTx (txData) { function sendTx (txData) {
log.info('actions: sendTx') log.info(`actions - sendTx: ${JSON.stringify(txData.txParams)}`)
return (dispatch) => { return (dispatch) => {
log.debug(`actions calling background.approveTransaction`) log.debug(`actions calling background.approveTransaction`)
background.approveTransaction(txData.id, (err) => { background.approveTransaction(txData.id, (err) => {
@ -413,7 +413,7 @@ function sendTx (txData) {
} }
function updateAndApproveTx (txData) { function updateAndApproveTx (txData) {
log.info('actions: updateAndApproveTx') log.info('actions: updateAndApproveTx: ' + JSON.stringify(txData))
return (dispatch) => { return (dispatch) => {
log.debug(`actions calling background.updateAndApproveTx`) log.debug(`actions calling background.updateAndApproveTx`)
background.updateAndApproveTransaction(txData, (err) => { background.updateAndApproveTransaction(txData, (err) => {

@ -175,7 +175,7 @@ ConfirmTxScreen.prototype.sendTransaction = function (txData, event) {
event.stopPropagation() event.stopPropagation()
const state = this.state || {} const state = this.state || {}
const txMeta = state.txData const txMeta = state.txData
this.props.dispatch(actions.sendTx(txMeta || txData)) this.props.dispatch(actions.updateAndApproveTx(txMeta || txData))
} }
ConfirmTxScreen.prototype.cancelTransaction = function (txData, event) { ConfirmTxScreen.prototype.cancelTransaction = function (txData, event) {

Loading…
Cancel
Save