diff options
author | Kevin Serrano <kevin.serrano@consensys.net> | 2017-06-20 04:51:38 +0800 |
---|---|---|
committer | Kevin Serrano <kevin.serrano@consensys.net> | 2017-06-20 04:51:38 +0800 |
commit | 9da243f42d7f9a1bfc868b9637774c6fbad6af53 (patch) | |
tree | f37cc44c80a3c22f11b46c527dee66454ed70867 /app | |
parent | 7ec7e1226691474ea200ccf867f7a7d1f0c1086a (diff) | |
parent | 39c7ed230d61b04d147e45a55ac7af0576961968 (diff) | |
download | tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.gz tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.bz2 tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.lz tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.xz tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.tar.zst tangerine-wallet-browser-9da243f42d7f9a1bfc868b9637774c6fbad6af53.zip |
Merge branch 'AddTokenList' of github.com:MetaMask/metamask-plugin into AddTokenList
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/controllers/preferences.js | 8 | ||||
-rw-r--r-- | app/scripts/controllers/transactions.js | 2 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index 7212c7c43..aa8e05fcc 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -7,6 +7,7 @@ class PreferencesController { constructor (opts = {}) { const initState = extend({ frequentRpcList: [], + currentAccountTab: 'history', }, opts.initState) this.store = new ObservableStore(initState) } @@ -35,6 +36,13 @@ class PreferencesController { }) } + setCurrentAccountTab (currentAccountTab) { + return new Promise((resolve, reject) => { + this.store.updateState({ currentAccountTab }) + resolve() + }) + } + addToFrequentRpcList (_url) { const rpcList = this.getFrequentRpcList() const index = rpcList.findIndex((element) => { return element === _url }) diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index d9d9849b1..f6dea34e7 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -382,13 +382,13 @@ module.exports = class TransactionController extends EventEmitter { // - `'signed'` the tx is signed // - `'submitted'` the tx is sent to a server // - `'confirmed'` the tx has been included in a block. + // - `'failed'` the tx failed for some reason, included on tx data. _setTxStatus (txId, status) { var txMeta = this.getTx(txId) txMeta.status = status this.emit(`${txMeta.id}:${status}`, txId) if (status === 'submitted' || status === 'rejected') { this.emit(`${txMeta.id}:finished`, txMeta) - } this.updateTx(txMeta) this.emit('updateBadge') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index de9a15924..f33da5213 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -280,6 +280,7 @@ module.exports = class MetamaskController extends EventEmitter { // PreferencesController setSelectedAddress: nodeify(preferencesController.setSelectedAddress).bind(preferencesController), + setCurrentAccountTab: nodeify(preferencesController.setCurrentAccountTab).bind(preferencesController), setDefaultRpc: nodeify(this.setDefaultRpc).bind(this), setCustomRpc: nodeify(this.setCustomRpc).bind(this), |