diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-06-23 08:28:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 08:28:10 +0800 |
commit | f022c7c714e17faf9558839116ba90ca8082e6b1 (patch) | |
tree | 7cab7a825004343b6f7d3aa909eef71d31391fc6 /app | |
parent | 2a429253994a0df2aae27234a7ac11c870bdc713 (diff) | |
parent | c0c588053a29a4406ef30de8628065429ff99595 (diff) | |
download | tangerine-wallet-browser-f022c7c714e17faf9558839116ba90ca8082e6b1.tar tangerine-wallet-browser-f022c7c714e17faf9558839116ba90ca8082e6b1.tar.gz tangerine-wallet-browser-f022c7c714e17faf9558839116ba90ca8082e6b1.tar.bz2 tangerine-wallet-browser-f022c7c714e17faf9558839116ba90ca8082e6b1.tar.lz tangerine-wallet-browser-f022c7c714e17faf9558839116ba90ca8082e6b1.tar.xz tangerine-wallet-browser-f022c7c714e17faf9558839116ba90ca8082e6b1.tar.zst tangerine-wallet-browser-f022c7c714e17faf9558839116ba90ca8082e6b1.zip |
Merge pull request #1603 from MetaMask/AddTokenList
Add popular token list
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), |