1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 11:01:41 +01:00
Commit Graph

662 Commits

Author SHA1 Message Date
Dan Finlay
fadc0617df Make tx calculations account for gas prices 2017-09-07 12:52:49 -07:00
Dan Finlay
c616581001 Remove logs 2017-09-07 12:47:52 -07:00
Dan Finlay
a95a3c7e4f Fix balance calc test 2017-09-07 12:47:27 -07:00
Dan Finlay
74c6de7d23 Add constructor comment 2017-09-07 12:45:00 -07:00
Dan Finlay
7b92268428 Fix valueFor test 2017-09-07 12:43:10 -07:00
Dan Finlay
4058574436 Add basic test for valueFor 2017-09-07 12:30:25 -07:00
Dan Finlay
b6e8791bc2 test not passing 2017-09-07 11:59:15 -07:00
kumavis
440a42bbc3 inpage - add idRemapMiddleware 2017-09-07 10:08:07 -07:00
frankiebee
00fca4f1f2 remove unused variable 2017-09-06 14:38:39 -07:00
Dan Finlay
74f7fc4613 Check balances in parallel 2017-09-06 14:37:46 -07:00
Dan Finlay
f9a052deed Add first passing balance calc test 2017-09-06 14:36:15 -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
frankiebee
00bd5b143f rename tx-utils.js -> tx-gas-utils.js 2017-09-05 20:33:50 -07:00
frankiebee
4c554f32ec remove #buildEthTxFromParams 2017-09-05 20:13:43 -07:00
kumavis
ea7e46ed38 inpage - bug fix
prevents mutation of original message object which causes problems with web3 1.0
2017-09-05 16:46:21 -07:00
Dan Finlay
70a61f8712 Make web3 deprecation notice more useful
Linking to a descriptive & precriptive article on a path forward.
2017-09-05 11:35:33 -07:00
kumavis
76de053b0b Merge branch 'master' into inpage-provider-fixes 2017-08-28 11:29:47 -07:00
kumavis
e294aa7e0d inpage - lint fix 2017-08-28 10:41:01 -07:00
kumavis
cc56d0d2f6 inpage - use json-rpc-engine for inpage-provider 2017-08-24 15:44:40 -07:00
kumavis
9ce82640f2 Merge pull request #1973 from MetaMask/hotfix-migration019
hotfix - fail submitted txs whos nonce is out of bound
2017-08-24 00:15:24 -07:00
frankiebee
c2624dd1a0 fall back to latest if blockNumber is null 2017-08-24 00:02:06 -07:00
Dan Finlay
0ad310e096 Fail transactions after a day of retries 2017-08-23 22:29:08 -07:00
Dan Finlay
c620123fab Enforce nonces as type string 2017-08-23 21:50:28 -07:00
Dan Finlay
a122ec1f8b Use toNumber method 2017-08-23 21:37:07 -07:00
Dan Finlay
55c1a259b1 Fix network nonce parsing 2017-08-23 21:14:46 -07:00
Dan Finlay
855f4eeacb Pass nonce tests 2017-08-23 20:43:47 -07:00
Dan Finlay
04d40b114d Got all tests but one passing 2017-08-23 20:11:37 -07:00
Dan Finlay
221575a191 Fix new test, break an older maybe wrong one 2017-08-23 20:04:03 -07:00
Dan Finlay
c4ab7a5779 Linted 2017-08-23 19:35:49 -07:00
Dan Finlay
1f0223d0a0 Simplify nonce calculation 2017-08-23 19:34:20 -07:00
kumavis
4019f318fe inpage provider - autoreload - improve readability 2017-08-23 16:44:57 -07:00
kumavis
44dc2ba712 inpage provider - only warn web3 usage once per session 2017-08-23 16:26:55 -07:00
kumavis
53e410167b inpage provider - sync rpc - default to null values 2017-08-23 16:13:33 -07:00
Dan Finlay
b3b62d97a3 Merge branch 'master' into useLocalNonce 2017-08-23 11:12:46 -07:00
kumavis
247965ebbe nonce-tracker - more debugging numbers for nonceDetails 2017-08-22 15:34:30 -07:00
kumavis
0a93b65a3d remove unused code 2017-08-22 15:06:54 -07:00
kumavis
fb2c6cc8ac nonce-tracker - use ethjs-query 2017-08-22 14:33:54 -07:00
kumavis
dc3e8d60ef nonce-tracker - fix var name 2017-08-22 14:24:09 -07:00
kumavis
6d596bd9e6 nonce-tracker - getlocalNextNonce - add entry to nonceDetails 2017-08-22 14:17:00 -07:00
kumavis
a7e3dc8327 nonce-tracker - simplify _getlocalNextNonce 2017-08-22 14:15:56 -07:00
kumavis
e43da3e4aa nonce-tracker - simplify getHighestNonce 2017-08-22 14:04:31 -07:00
kumavis
b191649ef5 nonce-tracker - getHighestNonce doesnt need uniqued input 2017-08-22 13:58:26 -07:00
kumavis
98bc9b6656 nonce-tracker - make nonce strategy api and naming more symmetical 2017-08-22 13:52:15 -07:00
frankiebee
604c91f7b2 nonce-tracker - pass tests 2017-08-21 18:04:05 -07:00
frankiebee
7d34b22d78 clean up code 2017-08-21 17:04:47 -07:00
frankiebee
5c74f316a8 nonce-tracker - pass tests 2017-08-21 16:45:10 -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
1ffb406480 break out network nonce calc. 2017-08-18 16:05:21 -07:00
frankiebee
37f86e874f fix 0x0 nonce calc. 2017-08-18 15:44:32 -07:00
frankiebee
f8eca95ca5 include pendingTxs in localNonce 2017-08-18 15:01:05 -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
frankiebee
66a012550e fix wording 2017-08-11 15:54:52 -07:00
frankiebee
ac9e84ff40 add deprecation warning for web3 2017-08-11 15:52:03 -07:00
kumavis
b4052cd5e6 tx utils - detect estimateGas err and set simulationFailed 2017-08-08 23:34:18 -07:00
kumavis
5418813ed1 util - sufficientBalance - validate input 2017-08-08 21:05:59 -07: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
59124eb6fd remove logging of the message and log the error 2017-08-07 14:45:43 -04:00
frankiebee
fb9866b4e1 fix spelling 2017-08-07 14:37:20 -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
frankiebee
caee2a9e35 move util functions to util.js 2017-08-04 13:55:00 -04:00
kumavis
c4cb371ce8 Merge pull request #1857 from MetaMask/hotFixCancleTx
fix cancelTransaction not receiving a callback
2017-08-03 21:01:13 -07:00
frankiebee
7de58c8709 fix cancelTransaction not reciving a callback 2017-08-03 21:22:08 -04:00
kumavis
d4877cb4e2 blacklist - use module eth-phishing-detect 2017-08-03 14:25:02 -07: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
340dbe75fc use async with #publishTransaction 2017-08-02 19:09:37 -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
kumavis
ecaa235b5e phishing detection - move phishing detection into contentscript and metamask controller 2017-08-02 14:26:10 -07:00
kumavis
aea5735b29 obj-multiplex - missing name error + prefer const over var 2017-08-02 14:25:28 -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
6675241fa9 Merge branch 'master' into i1805-LiveBlacklistUpdating 2017-07-26 16:46:59 -07:00
kumavis
35a128db1e nonce-tracker - hotfix for provider proxying 2017-07-26 11:37:00 -07:00
kumavis
b15a2baaf3 nonce-tracker - add raw baseNonceHex to nonceDetails 2017-07-26 11:09:02 -07:00
kumavis
0ef90fb1f0 tx controller + nonce tracker - record nonce components on txMeta 2017-07-26 10:40:08 -07:00
kumavis
39d28922de nonce-tracker - validation - add validation failing value type to error message 2017-07-26 10:16:08 -07:00
kumavis
f16802e2d4 nonce-tracker - validation - add validation failing value to error message 2017-07-26 10:15:35 -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
aa48ed34c4 nonce-tracker - fix lock mechanism to be a real mutex 2017-07-18 15:11:29 -07:00
kumavis
d249da77d7 nonce-tracker - return nonce as integer 2017-07-18 13:59:56 -07:00
kumavis
4f9fc8014a nonce-tracker - validate nonce calc components 2017-07-18 12:48:16 -07:00
frankiebee
948f3880a3 turn off auto faucet and remove file 2017-07-17 17:37:01 -04:00
frankiebee
7eccf5905a make publishTransaction and signTransaction async methods 2017-07-13 15:25:43 -04:00
frankiebee
aeefcbd75b Fix test to match behavior 2017-07-12 15:10:52 -07:00
frankiebee
da35f6744e use new nodeify 2017-07-12 15:06:49 -07:00
frankiebee
231ad48564 Use txParams 2017-07-11 12:52:56 -07:00
frankiebee
971d25a8ab Merge branch 'master' into nonce-tracker 2017-07-11 12:41:03 -07:00
Dan Finlay
c7b9e3fb18 Improve insufficient balance checking in retry loop 2017-07-11 12:19:01 -07:00
frankiebee
6d2cddaac9 fix nonce calculation order 2017-07-05 12:00:42 -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
92df9965eb fix nonceTracker 2017-06-21 19:51:00 -07:00
frankiebee
fa8c74fe9b add a test for #getNonceLock 2017-06-21 17:28:19 -07:00
kumavis
dab2fccc78 introduce nonce-tracker 2017-06-14 22:16:14 -07:00
Thomas Huang
13e6672028 Linting 2017-06-12 11:08:32 -07:00
Kevin Serrano
2b7d842498
Update gasblocklimit params with every block. 2017-06-02 15:18:14 -07:00
Kevin Serrano
82cbfaa826
Convert gasLimit to not use muln in BN 2017-06-01 12:53:16 -07:00
Thomas Huang
8f9a230d8d Merge pull request #1500 from MetaMask/RemoveStreamingSubprovider
Remove streaming subprovider
2017-05-25 15:04:50 -07:00
Dan Finlay
ad40e4d260 Remove stream subprovider
Since the polling leak seems to be coming from elsewhere, and new bugs came from this, I'm rolling back this change so that we can push the other improvements sooner and fix the bug at its true root.
2017-05-25 12:37:04 -07:00
frankiebee
717dceede8 fix spelling 2017-05-24 23:36:10 -04:00
frankiebee
3b06a29e1b Merge branch 'master' into reloadDapp 2017-05-24 23:10:58 -04:00
frankiebee
473b88f399 Reload the page when switching networks for sites that use web3 2017-05-24 23:00:58 -04:00
Dan Finlay
764806d211 Merge pull request #1494 from MetaMask/1472-gasceiling
Add Max GasLimit Ceiling
2017-05-24 16:36:00 -07:00
Kevin Serrano
26fd016b63
Add new blockGasLimit property to txMeta object. 2017-05-24 16:17:03 -07:00
kumavis
e6b278569e inpage-provider - disable polling after first block 2017-05-24 11:34:26 -07:00
Frankie
97ea7454b3 Merge branch 'master' into networkController 2017-05-23 20:36:11 -04:00
frankiebee
243eeff7cb Fix for tests 2017-05-23 19:49:57 -04:00
frankiebee
529304c005 Wrap the provider in a proxy 2017-05-23 01:56:10 -04:00
frankiebee
13a41f3129 Merge branch 'master' into networkController 2017-05-22 19:48:10 -04:00
kumavis
b217ad1ae8 clean - remove console logs 2017-05-22 16:06:22 -07:00
kumavis
1c1400b584 deps - use stream-subprovider from provider-engine 2017-05-22 15:59:07 -07:00
Dan Finlay
cbfaa6f56f Rename stream to streamSubprovider 2017-05-22 15:41:13 -07:00
Dan Finlay
48d9a21071 Use filter subprovider in-page to avoid filter leaks 2017-05-22 15:23:29 -07:00
Dan Finlay
c5432da567 Add new streaming subprovider but getting a loop
Regarding #1458

Uses a new streaming subprovider architecture on an experimental branch of StreamProvider:
https://github.com/flyswatter/web3-stream-provider/tree/StreamSubprovider
2017-05-20 20:38:38 -07:00
frankiebee
f87ea49b5a Create a network controller to manage switcing networks an updating the provider 2017-05-19 00:14:10 +02:00
Thomas Huang
3367363b12 Remove all traces of testnet 2017-05-15 19:11:16 -07:00
Thomas Huang
4c10e2021a Change default network to rinkeby 2017-05-15 18:05:11 -07:00
kumavis
2c8bbe3b25 migrator - fix typo 2017-05-12 12:27:40 -07:00
kumavis
70a328e028 migrator - cleaner migration runner with es7 2017-05-11 18:15:59 -07:00
frankiebee
6c01b26845 use asyncQ.waterfall instead of asyncQ.eachSeries 2017-05-11 23:25:33 +02:00
frankiebee
1772d34e94 fix migrator 2017-05-11 10:10:50 +02:00
Kevin Serrano
833b9f183f
Minor lint 2017-05-03 07:22:36 -07:00
kumavis
6ace0c9afb notification-manager - remove promise listener
seems chrome changed their API?
MDN suggests that a Promise should be returned but getting `undefined`
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create

Chrome docs suggest its a callback API lolwut
https://developer.chrome.com/extensions/windows#method-create
2017-04-28 16:04:00 -07:00
Dan Finlay
d1a1069180 Merge branch 'master' into rinkeby 2017-04-27 14:50:19 -07:00
Thomas Huang
6bdb4c8728 Fix linting warnings 2017-04-26 21:05:45 -07:00
Kevin Serrano
242dc1e99f
Add missing changes. Create unique style for rinkeby icon. 2017-04-25 14:39:01 -07:00
Nickyg
e9aa37b699 add rinkeby network 2017-04-26 01:40:33 +05:30
kumavis
9b9570fd2b auto-faucet - only skip faucet on explicit test environment 2017-04-04 18:48:33 -07:00
kumavis
5a91adf7d8 add platforms to mascara + move buyEther window open to ui 2017-04-04 18:23:46 -07:00
frankiebee
f80d1ce3e6 Switch auto-faucet from XMLHttpRequest to fetch 2017-04-04 14:55:48 +02:00
kumavis
86e882c51a notification-manager - rename show -> showPoup + make getPopup private 2017-03-31 18:41:51 -07:00
kumavis
6259ffaef4 extension - remove local extension files, we use extensionizer 2017-03-30 18:35:22 -07:00
kumavis
5036263f88 introduce platform api and rename notifications to notification-manager 2017-03-30 18:33:19 -07:00
Kevin Serrano
9a6b84644a Merge pull request #1293 from MetaMask/ImproveGasEstimates
tx-utils - gas buffer ceiling at 90% of block gas limit
2017-03-30 09:25:28 -04:00
kumavis
ff49e5e5cf tx-utils - gas buffer ceiling at 90% of block gas limit 2017-03-29 23:21:31 -07:00
Dan Finlay
98dd684524 Linted 2017-03-29 10:42:43 -07:00
Dan Finlay
610ec2bdf5 Fix popup behavior for Firefox
Firefox does not support the `focused` parameter when opening a new window, and we don't actually require it for Chrome either, new popups are at the foreground by default already.
2017-03-29 10:40:57 -07:00
kumavis
1495240969 tx manager - adjust new tx flow and txMeta decorations 2017-03-28 13:35:27 -07:00
Dan Finlay
81d3658343 Improve UI gas calculation logic
- Now striping hex prefixed gas values, which may have been causing mis-estimation.
- Unified calculation logic to be entirely functional.
- Greatly simplified how the pending-tx form keeps updated form state.

Still needs a commit from @kumavis to ensure the background passes in a txMeta.txParams.gasPrice value.
2017-03-28 11:52:15 -07:00
Dan Finlay
2cab2f767c Remove gas limit param
Fixes #1256 by removing redundant param.
2017-03-23 13:56:32 -07:00