Commit Graph

288 Commits

Author SHA1 Message Date
Dan Finlay 75177ce34c Make account tracking more reactive
We were doing a lot of conditional observation & updating.
Pulled out a bunch of that for generic observer/syncers.
2017-10-18 15:08:34 -07:00
Dan Finlay 9cc1e8a6d8 Refresh computed balances controller when restoring vault 2017-10-18 14:22:04 -07:00
Dan Finlay ea79eca8eb Add validation to balance constructor 2017-10-18 12:21:22 -07:00
kumavis dcf10f3d75 nonce-tracker - use blockTracker directly 2017-10-11 18:33:36 -07:00
kumavis 0f8d7dacb1 network-controller - use obj-proxy for providerProxy 2017-10-10 17:26:44 -07:00
kumavis 4d273d3cea lint fixes 2017-10-10 14:14:43 -07:00
kumavis efa92a7fc5 network controller - refactor to use eth-rpc-client 2017-10-10 14:13:12 -07:00
Dan Finlay 94513cae7b Provide method for tx tracker to refer to all txs 2017-10-06 12:50:33 -07:00
frankiebee ec9c528313 pending-tx - check time stamp instead of block number for resubmit 2017-10-05 11:07:22 -07:00
Kevin Serrano 15809894ff
Add indicator for specified gas price 2017-10-05 09:58:04 -07:00
Chi Kei Chan bd99bc2e88 Merge branch 'master' into NewUI-flat 2017-10-03 16:02:58 -07:00
Dan ac4868170f Enables remove token and ensures add/remove update the list without need for refresh. 2017-10-03 15:46:01 -07:00
frankiebee 833da191c3 transaction - provide notes for history 2017-10-02 13:41:29 -07:00
Dan Finlay d5b0d8af4f Version 3.10.8 - Fix Currency Conversion
In our conversion to the new Infura API, somehow we were sending upper-cased conversions to their lower-case sensitive API.

Fixes the first part of #2240
2017-09-29 20:57:15 -07:00
kumavis 7bdf73b1dd Merge pull request #2233 from MetaMask/remove-accountTracker-from-transactions
pending-tx - dont check the balance to rebrodcast
2017-09-29 17:36:49 -07:00
kumavis 1ad8a9a0ff network - make network controller internal network switching explicit 2017-09-29 17:10:34 -07:00
kumavis d6ea2fa425 network - convert localhost from custom rpc to network type 2017-09-29 16:35:58 -07:00
kumavis b88d11f86e network controller - small refactor 2017-09-29 16:09:38 -07:00
frankiebee ac80eaca1f pending-tx - dont check the balance to rebrodcast 2017-09-29 12:54:05 -07:00
kumavis 15b2823e54 Merge branch 'master' into new-currency-test 2017-09-27 16:04:51 -07:00
kumavis ecf909e140 Merge pull request #2194 from MetaMask/network-controller-refactor
Network controller refactor
2017-09-27 15:56:23 -07:00
kumavis 06b5dd2096 network controller - move _setProvider to bottom 2017-09-27 14:44:54 -07:00
kumavis f2d9b75e94 network controller - refactor to use _setProvider 2017-09-27 14:44:13 -07:00
Dan Finlay 96ebbde634 Fix Account Selection
Do not select accounts on restore, only on creation and deliberate selection.

Fixes #2164
2017-09-27 14:43:34 -07:00
kumavis c781e11c7a network - remove getter/setter 2017-09-27 14:10:58 -07:00
kumavis 5bbea78306 Merge pull request #2035 from MetaMask/transactionControllerRefractorPt3
Transaction controller refractor pt3
2017-09-27 13:57:04 -07:00
Dan Finlay 1983e161c6 Fix accountTracker store references 2017-09-27 12:29:09 -07:00
Dan Finlay e72083f6e8 Merge branch 'master' into filter-fixes-moar 2017-09-27 10:57:02 -07:00
frankiebee 0a94ec41d3 pending-tx - move incrementing of the retryCount on the txMeta outside pending-tx-tracker 2017-09-26 22:42:59 -07:00
frankiebee 508696f71d transactions: reveal #getFilteredTxList from txStateManage and fix accountTracker.store reference 2017-09-26 18:12:53 -07:00
frankiebee 80c98b1653 transactions: make evnt names pretty and eaiser to read 2017-09-26 16:55:11 -07:00
frankiebee 9fd5458112 transactions: lint fixes and reveal status-update event for balance controller 2017-09-26 16:54:04 -07:00
frankiebee 8ab23c713d Merge branch 'master' into transactionControllerRefractorPt3 2017-09-26 16:24:43 -07:00
Dan Finlay 2eca5455c0 Move obs store into account-tracker instead of inheriting 2017-09-26 14:15:16 -07:00
frankiebee 9d1cb0f76d network contoller - clean up unused code 2017-09-26 13:56:09 -07:00
frankiebee 2ed8d579da listen for the blocke event on the block tracker instead of rawBlock on the provider 2017-09-26 13:38:27 -07:00
frankiebee b654eb9b1f wrap block tracker in events proxy 2017-09-26 13:38:27 -07:00
Dan Finlay 674aac83ce Make blockTracker an independent param 2017-09-25 14:39:54 -07:00
Dan Finlay 8cd7329c91 Implemented feedback 2017-09-25 14:36:49 -07:00
Dan Finlay 40f1d08684 Made some requested changes 2017-09-25 11:42:08 -07:00
Dan Finlay f01b0a818b Fix account-tracker references 2017-09-22 14:13:56 -07:00
Dan Finlay 11c8c07bfc Refactor eth-store into account-tracker
EthStore was only being used for tracking account balances and nonces now, so I removed its block-tracking duties, renamed it account-tracker, and removed it as a dependency from `KeyringController`, so that KRC can go live on without a hard dep on it.
2017-09-22 13:59:25 -07:00
Kevin Serrano bd8428e9ed
Comply with current currency API and add additional styling. 2017-09-18 16:09:01 -07:00
Dan Finlay a01921758b Add computed balance to account detail view 2017-09-13 15:06:04 -07:00
Dan Finlay 86cd4e4fed Got pending balance updating correctly 2017-09-13 14:28:51 -07:00
frankiebee 77a48fb0b1 ensure that values written to txParams are hex strings 2017-09-13 14:27:27 -07:00
Dan Finlay e4d7fb2447 Add state-labeled events to allow subscribing to any transaction's state change 2017-09-13 11:39:39 -07:00
Dan Finlay 53a467cd1e Some progress 2017-09-12 15:06:19 -07:00
frankiebee 9e0c0745ab linting && format fixing 2017-09-12 12:19:26 -07:00
frankiebee 3ad67d1b14 match other controller patterns 2017-09-12 09:59:59 -07:00
frankiebee 9b9df41724 more tests and craete a getPendingTransactions function 2017-09-08 14:24:40 -07:00
frankiebee 50075c6df5 fix messy merge 2017-09-07 00:55:21 -07:00
frankiebee a73aecc796 fix merge and errors disaperaing on update 2017-09-06 14:01:07 -07:00
frankiebee 6c83ba762e Merge branch 'master' into transactionControllerRefractorPt3 2017-09-06 13:45:03 -07:00
frankiebee 15c12ca4bb add better comments 2017-09-05 21:50:36 -07:00
Kevin Serrano 056276af02
integrate infura currency 2017-08-29 16:36:05 -07:00
Dan Finlay 0ad310e096 Fail transactions after a day of retries 2017-08-23 22:29:08 -07:00
Dan Finlay b3b62d97a3 Merge branch 'master' into useLocalNonce 2017-08-23 11:12:46 -07:00
frankiebee fbba3a1ac8 Merge branch 'master' into transactionControllerRefractorPt3 2017-08-21 11:35:22 -07:00
frankiebee 7ea83b6bae Create TxStateManager 2017-08-21 10:29:10 -07:00
frankiebee e9712a13ec Create tests for TxStateManager 2017-08-18 14:11:18 -07:00
frankiebee a5a32f3d57 use "localNonce" when the network returns a nonce that is lower then a known confirmed tx 2017-08-18 13:54:16 -07:00
kumavis 1af797b1b3 tx controller - tx state history various small fixes 2017-08-14 19:15:36 -07:00
kumavis fdffb6fedc introduce tx-state-history-helper and diff-based history 2017-08-14 18:46:04 -07:00
kumavis 25f9746dab tx controller - fix error serialization 2017-08-08 21:09:28 -07:00
kumavis 5e6962342d tx controller - fix getBalance fn 2017-08-08 21:08:30 -07:00
frankiebee 9c9165e930 filter by network for pending txs 2017-08-08 21:54:26 -04:00
frankiebee 5bb84f6e21 fix getPendingTransactions function for pendingTxTracker 2017-08-08 21:49:48 -04:00
frankiebee a13643bdb5 fix class names 2017-08-08 18:30:49 -04:00
frankiebee 3a2190ec3c fix the bind on pending tx watchers 2017-08-07 16:58:38 -04:00
frankiebee f3b42f1e33 Merge branch 'master' into transactionControllerRefractor 2017-08-07 16:24:58 -04:00
frankiebee a54c26382e remove unnecessary if statment for error message 2017-08-07 14:40:07 -04:00
frankiebee fb9866b4e1 fix spelling 2017-08-07 14:37:20 -04:00
kumavis 1be8053cca blacklist - update phishing on boot and speed up polling to 4 min 2017-08-04 13:51:48 -07:00
frankiebee 08f49ab35f rename PendingTransactionUtils -> PendingTransactionWatchers 2017-08-04 14:50:34 -04:00
frankiebee 89a4fef1e4 Merge branch 'master' into transactionControllerRefractor 2017-08-04 14:45:22 -04:00
frankiebee 087cd9fb1a break out tx status pendding watchers 2017-08-04 14:41:35 -04:00
kumavis 34b1e80088 Merge branch 'master' of github.com:MetaMask/metamask-plugin into blacklist-refactor2 2017-08-03 14:28:48 -07:00
kumavis d4877cb4e2 blacklist - use module eth-phishing-detect 2017-08-03 14:25:02 -07:00
frankiebee dce593fd7b remove stack from txs 2017-08-03 15:39:55 -04:00
kumavis 8a9d0073b1 Merge pull request #1848 from MetaMask/transactionControllerRefractor
Transaction controller refractor part 1: promises for everyone and more tests!
2017-08-02 19:57:16 -07:00
frankiebee b471afcdb3 use error for #approveTransaction when setting failed 2017-08-02 19:24:34 -04:00
frankiebee b80c7e417b move newUnapprovedTransaction to transactions.js 2017-08-02 18:59:34 -04:00
kumavis 8c6f01b910 blacklist controller - breakout from metamask and infura controllers 2017-08-02 15:54:59 -07:00
frankiebee 25bc15ba17 lint fixes 2017-08-02 11:47:13 -04:00
frankiebee 25cffd21f8 Merge branch 'master' into transactionControllerRefractor 2017-08-02 11:41:29 -04:00
frankiebee 3a4726018e fix addTxDefaults 2017-08-02 11:35:35 -04:00
frankiebee 432f516ab0 make addUnapprovedTransaction async function and use promise based ethQuery 2017-08-02 10:26:25 -04:00
Dan Finlay f147b928b2 Merge branch 'master' into i1805-LiveBlacklistUpdating 2017-07-26 15:32:19 -07:00
Dan Finlay 3d8ebf2265 Begin implementing live-updating blacklist, not working yet 2017-07-26 12:27:16 -07:00
kumavis 35a128db1e nonce-tracker - hotfix for provider proxying 2017-07-26 11:37:00 -07:00
kumavis 7e2e4948a6 tx cont - dont recursively store history 2017-07-26 10:57:47 -07:00
kumavis de2cf4e9cd Merge branch 'master' of github.com:MetaMask/metamask-plugin into betterErrorsOnTx 2017-07-26 10:43:36 -07:00
kumavis 0ef90fb1f0 tx controller + nonce tracker - record nonce components on txMeta 2017-07-26 10:40:08 -07:00
frankiebee 30cbe74ba6 Merge branch 'betterErrorsOnTx' of https://github.com/MetaMask/metamask-extension into betterErrorsOnTx 2017-07-25 18:33:52 -04:00
frankiebee ba88f7b8dd fix typo 2017-07-25 18:29:02 -04:00
Frankie a929fb2387 Merge branch 'master' into betterErrorsOnTx 2017-07-25 18:26:41 -04:00
frankiebee b81f883150 fix stack wording 2017-07-25 18:23:26 -04:00
frankiebee 1df833bee8 use clone 2017-07-25 18:21:40 -04:00
frankiebee e0a626da3b remove line numbers 2017-07-25 18:02:21 -04:00
kumavis 4445ba1569 tx cont - add argument for provider constructor 2017-07-25 14:36:19 -07:00
kumavis 5b9a6bd367 tx cont - remove old cb from async fn 2017-07-25 13:16:46 -07:00
frankiebee ab01358a48 Add stack traces both in errors and as a way to track txMetas 2017-07-25 16:08:31 -04:00
kumavis 12d6f21627 transactions - block nonce-tracker while updating pending transactions 2017-07-18 15:27:15 -07:00
kumavis 67fdba5e42 transaction - promisify _checkPendingTxs 2017-07-18 14:00:43 -07:00
tmashuang bda52f7cba Infura Network response tests 2017-07-14 10:34:03 -07:00
Frankie 9d3207fb73 Merge pull request #1617 from MetaMask/nonce-tracker
transaction controller - use nonce-tracker
2017-07-13 15:48:50 -04:00
frankiebee 7eccf5905a make publishTransaction and signTransaction async methods 2017-07-13 15:25:43 -04:00
frankiebee 27cb02bc58 add "nonce too low" to the ignored errs list for tx retrys 2017-07-12 19:03:34 -07:00
frankiebee bd26ec46aa mv updateAndApproveTx to txController 2017-07-12 15:07:56 -07:00
frankiebee 971d25a8ab Merge branch 'master' into nonce-tracker 2017-07-11 12:41:03 -07:00
kumavis a1fd9bc6be Merge pull request #1762 from MetaMask/ImproveRetryLogic
Improve retry logic
2017-07-11 12:29:20 -07:00
Dan Finlay c7b9e3fb18 Improve insufficient balance checking in retry loop 2017-07-11 12:19:01 -07:00
frankiebee a670e54973 Merge branch 'nonce-tracker' of https://github.com/MetaMask/metamask-plugin into nonce-tracker 2017-07-11 12:18:44 -07:00
frankiebee c121ac21ec remove irrelevan code 2017-07-11 12:16:08 -07:00
frankiebee 611338c4e0 use .includes 2017-07-11 12:01:59 -07:00
Dan Finlay d97c6533b8 Remove local nonce error setting. 2017-07-11 12:00:17 -07:00
frankiebee 11d57adc5c add "Gateway timeout" to ignored errors when resubmiting and use .includes over .startsWith 2017-07-11 11:57:42 -07:00
kumavis c425ad4ec7 tx controller - resubmit - correctly set error on bad nonce/balance 2017-07-07 19:13:06 -07:00
kumavis c53aac398a tx controller - correctly set error message on resubmit error 2017-07-07 19:09:32 -07:00
kumavis 4fa999e4de tx controller - resubmit - recognize parity known hash message 2017-07-07 19:02:34 -07:00
kumavis d228f46254 Merge branch 'master' into nonce-tracker 2017-07-07 14:21:43 -07:00
frankiebee 092a9c9def fail transactions that fail in resubmit 2017-07-07 03:05:39 -07:00
kumavis 34e2f6650d tx controller - clean code 2017-07-07 01:50:48 -07:00
kumavis 8661989f51 tx controller - move comments 2017-07-07 01:37:45 -07:00
frankiebee 9955668409 add comment 2017-07-06 23:10:04 -07:00
frankiebee 11b744bb87 if an error happens during a tx publication set tx status to fail 2017-07-06 22:30:25 -07:00
Dan Finlay 07d4e4fe6f Fix failing test 2017-07-05 23:24:33 -07:00
Dan Finlay 3abceac55d Fail pending txs with low balance or invalid nonce 2017-07-05 22:43:31 -07:00
frankiebee 51ff6d74e8 clean up unused code from old noncelock 2017-07-05 12:07:34 -07:00
Thomas Huang ffd3773ef3 Merge pull request #1620 from MetaMask/i1616-AddTokenAdding
Add ability to add tokens to token list
2017-06-28 10:07:49 -07:00
Dan Finlay ddba2af415 Merge pull request #1509 from MetaMask/i1473-dappDefaultGasPrice
I1473 dapp default gas price
2017-06-27 21:00:08 -07:00
frankiebee 690685d20d nonce-tracker: only check transactions that are not supposed to be ignored 2017-06-27 16:46:33 -07:00
frankiebee 0ee4502d71 calculate nonce based on local pending txs w/o error state. 2017-06-27 15:26:04 -07:00
frankiebee db2836a1ae dont stop retrying brodcasting txs 2017-06-27 14:19:28 -07:00
frankiebee 847a4282a2 Merge branch 'master' into nonce-tracker 2017-06-27 13:10:56 -07:00
Thomas Huang 1977417017 Merge branch 'master' into i1473-dappDefaultGasPrice 2017-06-27 10:32:28 -07:00
Thomas Huang 8b5b2d8329 Merge pull request #1663 from MetaMask/infura-status
Add Infura Status Information to UI State
2017-06-26 12:06:23 -07:00
Kevin Serrano f9f0f6f9ef
Add infura network status to our UI state. 2017-06-22 12:32:34 -07:00
Kevin Serrano b7f8657ab5
Add infura network status to our UI state. 2017-06-22 12:32:08 -07:00
frankiebee 92df9965eb fix nonceTracker 2017-06-21 19:51:00 -07:00
Dan Finlay 41d992cca9 Merge branch 'AddTokenList' into i1616-AddTokenAdding 2017-06-19 19:03:49 -07:00
Thomas Huang 235cb1f2d7 Keeps dapp gas price if set 2017-06-19 17:50:06 -07:00
Kevin Serrano 9da243f42d
Merge branch 'AddTokenList' of github.com:MetaMask/metamask-plugin into AddTokenList 2017-06-19 13:51:38 -07:00
frankiebee 0d8c02db35 Merge branch 'master' into nonce-tracker 2017-06-16 17:07:12 -07:00
Frankie ac728189e1 Merge branch 'master' into i1567-FixInaccurateError 2017-06-16 16:46:13 -07:00
frankiebee 9c2ead3d52 put event back on the "blockTracker:/provider" 2017-06-16 16:43:38 -07:00
frankiebee 5f8e74e0aa put the block listeners back on the provider 2017-06-16 16:36:32 -07:00
Dan Finlay 48789f2a3d Add ability to add tokens to token list
Fiex #1616
2017-06-15 16:22:53 -07:00
frankiebee f76a555c09 Merge branch 'master' into i1567-FixInaccurateError 2017-06-15 14:28:10 -07:00