From 1f1fc2c49ecbb5c6a0a1d925d5c02cf48f795b2f Mon Sep 17 00:00:00 2001 From: Dan Date: Tue, 19 Dec 2017 11:16:11 -0330 Subject: Canceled, edited transactions show edited amount. --- app/scripts/controllers/transactions.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/scripts/controllers/transactions.js') diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index ce709bd28..0d6b97d51 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -189,6 +189,11 @@ module.exports = class TransactionController extends EventEmitter { await this.approveTransaction(txMeta.id) } + async updateAndCancelTransaction (txMeta) { + this.txStateManager.updateTx(txMeta, 'confTx: user rejected transaction') + await this.cancelTransaction(txMeta.id) + } + async approveTransaction (txId) { let nonceLock try { -- cgit From bf4043c59bb67ea93599207d91cb7a4f4426e75f Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 20 Dec 2017 13:47:16 -0330 Subject: Adds updateTransaction to background and used it to update after editing in send-v2. --- app/scripts/controllers/transactions.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'app/scripts/controllers/transactions.js') diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 0d6b97d51..5b687f67a 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -184,16 +184,15 @@ module.exports = class TransactionController extends EventEmitter { return await this.txGasUtil.analyzeGasUsage(txMeta) } + async updateTransaction (txMeta) { + this.txStateManager.updateTx(txMeta, 'confTx: user updated transaction') + } + async updateAndApproveTransaction (txMeta) { this.txStateManager.updateTx(txMeta, 'confTx: user approved transaction') await this.approveTransaction(txMeta.id) } - async updateAndCancelTransaction (txMeta) { - this.txStateManager.updateTx(txMeta, 'confTx: user rejected transaction') - await this.cancelTransaction(txMeta.id) - } - async approveTransaction (txId) { let nonceLock try { -- cgit From e6fda855a556a6aa0325556b074612ff76925e5d Mon Sep 17 00:00:00 2001 From: Bruno Barbieri Date: Wed, 31 Jan 2018 03:33:15 -0500 Subject: added reset account feature --- app/scripts/controllers/transactions.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/scripts/controllers/transactions.js') diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 9c3618e60..7ca04caf1 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -152,6 +152,10 @@ module.exports = class TransactionController extends EventEmitter { } } + wipeTransactions(){ + this.txStateManager.wipeTransactions(); + } + // Adds a tx to the txlist addTx (txMeta) { this.txStateManager.addTx(txMeta) -- cgit From 03d17c75ae47806e9afa562cf664819b83a2b926 Mon Sep 17 00:00:00 2001 From: Bruno Barbieri Date: Wed, 31 Jan 2018 04:25:32 -0500 Subject: wipe only transactions for current account --- app/scripts/controllers/transactions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/scripts/controllers/transactions.js') diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index 7ca04caf1..a3670155a 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -152,8 +152,8 @@ module.exports = class TransactionController extends EventEmitter { } } - wipeTransactions(){ - this.txStateManager.wipeTransactions(); + wipeTransactions (address) { + this.txStateManager.wipeTransactions(address) } // Adds a tx to the txlist -- cgit From 57dc5a6e9b8ecc4414fe72397205d21cec13c5e1 Mon Sep 17 00:00:00 2001 From: Jeffrey Tong Date: Tue, 6 Mar 2018 20:37:26 -0800 Subject: fix typo in transaction.js --- app/scripts/controllers/transactions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/scripts/controllers/transactions.js') diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index ef5578d5a..9c2ca0dc8 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -3,7 +3,7 @@ const ObservableStore = require('obs-store') const ethUtil = require('ethereumjs-util') const Transaction = require('ethereumjs-tx') const EthQuery = require('ethjs-query') -const TransactionStateManger = require('../lib/tx-state-manager') +const TransactionStateManager = require('../lib/tx-state-manager') const TxGasUtil = require('../lib/tx-gas-utils') const PendingTransactionTracker = require('../lib/pending-tx-tracker') const createId = require('../lib/random-id') @@ -38,7 +38,7 @@ module.exports = class TransactionController extends EventEmitter { this.query = new EthQuery(this.provider) this.txGasUtil = new TxGasUtil(this.provider) - this.txStateManager = new TransactionStateManger({ + this.txStateManager = new TransactionStateManager({ initState: opts.initState, txHistoryLimit: opts.txHistoryLimit, getNetwork: this.getNetwork.bind(this), -- cgit