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

343 Commits

Author SHA1 Message Date
Kevin Serrano
f8b404a478
correct bug in test. 2017-03-24 17:23:56 -04:00
Kevin Serrano
360afacd70
Add tests. 2017-03-24 17:21:58 -04:00
Kevin Serrano
d99b5a9e5a
Add migration tests to ensure that bodies are erased properly in notices. 2017-03-23 10:15:42 -04:00
Dan Finlay
b6e2eaf7b1 Remove eth-lightwallet 2017-03-16 11:16:03 -07:00
Kevin Serrano
d85cc7ec4e Add test to account for prevention of identities duplication. 2017-03-10 10:48:07 -08:00
Kevin Serrano
c47f7f6a76 Add another test for duplicates. 2017-03-10 10:34:18 -08:00
Kevin Serrano
dc2d614da6 Add basic tests. 2017-03-10 09:52:05 -08:00
Dan Finlay
67c3126e63 Merge branch 'master' into kumavis-patch-1 2017-03-08 10:16:50 -08:00
Kevin Serrano
86f71d504c Merge branch 'master' into i1144-moarrpc 2017-03-08 09:28:36 -08:00
kumavis
92b8443824 tx-utils - add encoding utils 2017-03-07 22:51:39 -08:00
kumavis
c063fab993 tx-utils - stricter naming type-based convention 2017-03-07 22:47:35 -08:00
kumavis
68b99dfb08 test - tx-utils
add tests for `addGasBuffer`
2017-03-07 22:28:02 -08:00
jaredpereira
52ee007fcb Merge branch 'master' into i1118-IncreaseGasBuffer 2017-03-07 22:55:56 -05:00
Jared Pereira
4916331c53 change BN.mul to BN.muln 2017-03-07 22:42:16 -05:00
Jared Pereira
de44cd9ba4 add gas buffer multiply test 2017-03-07 20:49:40 -05:00
Kevin Serrano
4562e41d33
Fix tests until new ones to-be-written. 2017-03-07 16:10:06 -08:00
Kevin Serrano
970324b699
Merge github.com:MetaMask/metamask-plugin into i1144-moarrpc 2017-03-07 16:02:42 -08:00
Kevin Serrano
e7e024bcdd
Refactor of code into separate reducers and actions. 2017-03-07 16:01:51 -08:00
Dan Finlay
fba7a50e1b Fixed encoding 2017-03-07 11:43:59 -08:00
Dan Finlay
6253885e28 Remove unrelated test file 2017-03-07 11:36:13 -08:00
Dan Finlay
e78e642eef Add gas buffer test 2017-03-07 11:34:11 -08:00
Kevin Serrano
08ca7dac5a
Merge branch 'master' into i1144-moarrpc 2017-03-07 10:37:31 -08:00
Kevin Serrano
01f2ec4823
Modify tests.' 2017-03-07 10:37:01 -08:00
Dan Finlay
99b49b11f6 Fix test name 2017-03-06 17:36:37 -08:00
Dan Finlay
70e14b8a6f Fixed internal encoding test case 2017-03-06 17:36:08 -08:00
Dan Finlay
e66e755766 Fix normalizeMsgData function to always return hex prefixed 2017-03-06 16:33:33 -08:00
Dan Finlay
af337dfae5 Fix function names 2017-03-06 15:17:45 -08:00
Dan Finlay
9bd8c5f723 Render personal_sign messages as utf-8 text
Calls to `personal_sign` are now:

- When hex encoded, preserved as hex encoded, but displayed as utf-8 text.
- When not hex encoded, decoded as utf-8 text as hex for signing.
- The messages proposed for signing are displayed as UTF-8 text.
- When the message cannot be rendered as UTF-8 text, it is displayed as hexadecimal.

Fixes #1173
2017-03-06 15:04:11 -08:00
Kevin Serrano
e66035254f
More conflict resolution. 2017-03-01 10:04:25 -08:00
Kevin Serrano
0a3849ec84
Fix merge conflicts. 2017-03-01 10:01:21 -08:00
Dan Finlay
6fb33853f2 Fix test reference 2017-02-27 10:53:36 -08:00
Dan Finlay
5edb3db969 Merge branch 'master' into i1144-moarrpc 2017-02-27 10:36:48 -08:00
Kevin Serrano
930dafc4b0
Fix spelling error. 2017-02-24 15:30:18 -08:00
Dan Finlay
d1bce61996 Remove irrelevant tests 2017-02-23 17:45:23 -08:00
Kevin Serrano
62854398f1
Tested against code to play nice with unit tests. 2017-02-23 13:56:58 -08:00
Dan Finlay
0584988688 Move sigUtil and keyrings to external modules
These external modules now have their own test coverage and build enforcement. This allowed me to somewhat more easily add good tests around our personalSign strategy (held now in [eth-sig-util](https://github.com/flyswatter/eth-sig-util), and allow each of the keyrings to import that, etc.
2017-02-21 14:25:47 -08:00
Dan Finlay
352bb5cb39 Merge branch 'master' into dev 2017-02-15 15:49:04 -08:00
Kevin Serrano
d0e2846eca
Complete migration tests. 2017-02-15 11:15:47 -08:00
Kevin Serrano
cd75d86187
Add migrations for removing terms of use data. 2017-02-14 13:21:00 -08:00
Dan Finlay
97b8410b30 Verify messages in a loop 2017-02-13 21:29:22 -08:00
Dan Finlay
f2486fbdd3 got hash test passing 2017-02-13 21:25:02 -08:00
Dan Finlay
b862d94209 Add failing test for signature recovery 2017-02-13 20:13:11 -08:00
Kevin Serrano
65c84ac4b2
Delete all code related to disclaimers. 2017-02-09 18:17:50 -08:00
Frankie
de6455151e Revert old style message sighing 2017-02-09 17:32:49 -08:00
kumavis
e1719191f4 test - skip eth_sign tests until we have test data 2017-02-03 15:16:21 -08:00
kumavis
9e4ef45b6a migration #9 - break out CurrencyController substate 2017-02-02 23:32:24 -08:00
kumavis
f08f40aee2 txManager - depend on preferencesStore 2017-02-02 21:09:17 -08:00
kumavis
0c6df24ecf metamask - introduce networkStore 2017-02-02 20:59:47 -08:00
kumavis
99fa9ab13a migration 7 - break off TransactionManager substate 2017-02-02 20:20:13 -08:00
kumavis
bcb86f38cb messageManager - move view state to obs-store 2017-02-02 18:21:22 -08:00
Frankie
54b1339f6a Merge branch 'dev' into messageManagerCleanUp 2017-02-01 13:05:58 -08:00
Frankie
ce0c3ed03c Merge branch 'dev' into messageManagerCleanUp 2017-02-01 12:03:42 -08:00
Frankie
1b16b46241 code clan up and tests 2017-02-01 11:54:01 -08:00
kumavis
1cb730144d metamask - adopt isInitialized from keyring controller 2017-02-01 00:31:26 -08:00
kumavis
cd5d952600 keyring - move identities into memStore 2017-02-01 00:17:48 -08:00
kumavis
c0d3db6a8c keyring - synchronous getState 2017-01-31 20:02:38 -08:00
kumavis
2fa60cfcbf continue rename selectedAccount to selectedAddress 2017-01-30 15:25:12 -08:00
Frankie
fdee1e3701 Merge branch 'dev' into messageManagerCleanUp 2017-01-28 22:59:28 -08:00
Frankie
8be68575bb Clean up message manger includes:
Provider egine bump
Remove presence of message manger in keyring controller
Change the status wording fom conf to approved
make Message manager a class
fix messages not being apart of the badge
re write message manger to better reflect controller pattern
2017-01-28 20:28:20 -08:00
kumavis
4dd6ba9c1b migration 5 - move keyring controller state to substate 2017-01-28 19:19:03 -08:00
kumavis
3afd0ef27d tests - remove persistence and start with initial state 2017-01-27 23:04:34 -08:00
kumavis
a14a25c423 config-manager - default to USD for currentFiat 2017-01-26 15:22:13 -08:00
kumavis
76ce348a04 obs-store - use published module 2017-01-24 19:47:00 -08:00
kumavis
bb1ee8e649 Merge branch 'dev' of github.com:MetaMask/metamask-plugin into obs-store2 2017-01-24 16:09:57 -08:00
kumavis
463a56ff54 background controller - extract KeyringC.placeSeedWords to MetamaskC 2017-01-24 15:33:33 -08:00
kumavis
74dc20bdf1 Merge branch 'dev' into obs-store2 2017-01-21 10:06:50 -08:00
Dan Finlay
7e886dff77 Wrote failing test for eth.sign 2017-01-16 23:26:37 -08:00
kumavis
053066b57f Merge branch 'dev' into simple-keystore-fix 2017-01-16 12:10:04 -08:00
kumavis
4a09f856d1 test - keyring - simple - fix fixture data 2017-01-16 12:08:20 -08:00
Dan Finlay
5dd5619e5d Merge branch 'master' into dev 2017-01-16 10:55:32 -08:00
kumavis
85634326e8 test - clear localStorage on test start 2017-01-14 22:35:26 -08:00
kumavis
91e5cc0f29 test - clear localStorage in case CI caches it (?) 2017-01-14 22:30:12 -08:00
kumavis
993daebc4e test - txManager - add network to all txs 2017-01-14 22:09:19 -08:00
kumavis
3df9ce9809 tests - txManager - add getNetwork fn to fixture txManager 2017-01-14 21:52:09 -08:00
Frankie
87505e1742 fix for linting 2017-01-13 18:01:50 -08:00
kumavis
29e83d71a8 background - handle tx finalization in controllers instead of provider-engine 2017-01-13 02:00:11 -08:00
kumavis
b33c51c0a6 migrations - introduce promise-based migrator 2017-01-12 01:17:05 -08:00
kumavis
3bc996878b background - move pojo migrator to outside of metamask controller 2017-01-11 22:47:56 -08:00
kumavis
2019c02fc0 test - fix tests from obs-store 2017-01-11 19:31:42 -08:00
kumavis
bd382f4705 tests - add fetch polyfill 2017-01-10 12:39:01 -08:00
Dan Finlay
2dbbc0dce7 Merge remote-tracking branch 'origin/kumavis-readme-gource' into RevertTxManager 2017-01-02 17:32:51 -08:00
Dan Finlay
5e8a344f97 Correct getState test to be async 2016-12-23 18:40:36 -08:00
Frankie
fa3e708f34 Merge branch 'dev' into TxManager 2016-12-23 12:48:36 -08:00
Frankie
fde69ea0ba fix some minor spelling mistakes and clean up code 2016-12-23 12:43:42 -08:00
Frankie
6f7c23fd28 Merge branch 'dev' into TxManager 2016-12-21 14:31:07 -08:00
Frances Pangilinan
6e78494846 First pass at revision requests 2016-12-21 13:41:32 -08:00
Dan Finlay
afcad53ef9 Refine a lostAccount test 2016-12-20 16:11:49 -08:00
Frances Pangilinan
4910e2f9bd remove network Id 2 from explorer link and Add network Id 3 2016-12-20 13:49:22 -08:00
Dan Finlay
674b268982 Merge pull request #916 from MetaMask/i894-DetectBadAccounts
I894 detect bad accounts
2016-12-20 11:50:26 -08:00
Dan Finlay
20d2204ce6
Made changes according to feedback. 2016-12-19 19:32:59 -08:00
Dan Finlay
77d2deb176 Merged master into dev 2016-12-19 13:37:27 -08:00
kumavis
73998feeb2 move notice code from metamask-controller + config-manager, in to notice-controller 2016-12-16 12:44:47 -08:00
kumavis
4c390a6221 clean - code style 2016-12-16 11:58:15 -08:00
Kevin Serrano
8819475a2e Add ability to show notices to user & get confirmation.
Implement generation of markdown for notice files.
Create npm command. Enhance notice generation.
Add test files to test multiple notices.
Add basic markdown support to notices.
Interval checks for updates.
Add extensionizer and linker
Add terms and conditions state file
Add link support to disclaimer.
Changelog addition.
2016-12-16 10:44:52 -08:00
Frances Pangilinan
5aba096bd1 add Test for txManager. As well as fix tests to account for txManager. 2016-12-14 12:56:53 -08:00
Dan Finlay
ab9e15b782 Mostly added bad account detection
Currently riddled with logs, because the migrator is inexplicably returning before generating the new style accounts for comparison.
2016-12-08 14:22:02 -08:00
Dan Finlay
fe01ceb857 Remove .only from unit test suite 2016-12-07 16:32:49 -08:00
Dan Finlay
9e764b1935 Fix nodeify 2016-11-28 17:27:20 -08:00
Dan Finlay
80e76b45ee Denodeify most of KeyringController
Mostly Fixes #893

A couple methods cache callbacks, and will require a larger refactor to fully denodeify.

Specifically, our methods involving web3 requests to sign a tx, sign a message, and approve or cancel either of those.

I think we should postpone those until the TxManager refactor, since it will likely handle this response caching itself.
2016-11-28 16:13:03 -08:00
Dan Finlay
b899119582 Merge branch 'master' into dev 2016-11-23 16:54:27 -08:00
Dan Finlay
9f67974133 Fix last async keyring test 2016-11-23 14:39:35 -08:00
Dan Finlay
230a0ab876 Fix more keyring asyncifying tests 2016-11-23 11:58:34 -08:00
Dan Finlay
600f5c31db Mostly got async keyringController tests passing 2016-11-23 00:23:41 -08:00
Dan Finlay
822face7a3 Fix password reference 2016-11-22 16:29:46 -08:00
Dan Finlay
358440384c Fix vault migration unit test 2016-11-22 16:07:35 -08:00
Dan Finlay
607a474c3f Improve vault migration unit test 2016-11-22 16:05:37 -08:00
Dan Finlay
de8da9ddf6 Simplify Encryptor API Surface
At least, the portion of it that we use.

Moved salting within the encryptor, so it does not need to be managed externally.

KeyringController now caches the password instead of a passwordDerivedKey, since it is ignorant of the salt.

Encryptor payload is now in a JSON format, so its portions are both base64 encoded *and* labeled appropriately.  The format is `{ "data": "0x0", "iv": "0x0", "salt": "string" }`.

Fixes #843
Fixes #859
2016-11-22 15:54:51 -08:00
kumavis
e14efa8f17 Merge pull request #858 from MetaMask/i842-WaitForSeedWord
I842 wait for seed word
2016-11-22 16:18:43 -05:00
Dan Finlay
a67b4d7131 Fix etherscan link generation test 2016-11-22 12:54:27 -08:00
kumavis
49a1f43736 Merge branch 'master' into i868-estimateGasTooHigh 2016-11-22 15:14:25 -05:00
kumavis
fa2f0dee28 idStore - fix estimateGas calculation 2016-11-22 12:10:49 -08:00
Kevin Serrano
8261cf232d
Merge branch 'dev' into dev-cleanup 2016-11-22 10:50:15 -08:00
Dan Finlay
60afc41bb6 Fix keyring test 2016-11-21 19:47:45 -08:00
Dan Finlay
e2a9e1cd4a Unify test wording 2016-11-21 19:45:05 -08:00
Dan Finlay
694f34ae9a Add temporary morden explorer link support 2016-11-21 19:43:59 -08:00
Dan Finlay
ced36eb201 Improve Keyring organization
Separated public & private methods. (Fixes #845)
Made class method `type()` into a simple property. (Fixes #846)
2016-11-21 19:40:58 -08:00
Dan Finlay
ecfda5bcc5 Revert premature link test fix 2016-11-21 19:39:19 -08:00
Dan Finlay
daec4d5c36 Fix ropsten link test 2016-11-21 19:19:34 -08:00
Dan Finlay
be6b7b496a Fixed account link test for ropsten network 2016-11-21 19:18:46 -08:00
Kevin Serrano
f5b0795ac5
change all instances of selectedAddress to selectedAccount. 2016-11-21 16:21:16 -08:00
Kevin Serrano
9123e70434
Remove entropy from encryption and project. 2016-11-21 15:49:03 -08:00
Kevin Serrano
a4666de0ce
Minimize repeated code. 2016-11-15 13:31:22 -08:00
Kevin Serrano
7de6b12aad
Re-enable disclaimer screen. Rename variables to reflect role more clearly. 2016-11-14 16:49:16 -08:00
Kevin Serrano
92edc63d6e
Add idStore tests again. 2016-11-14 16:23:52 -08:00
Kevin Serrano
eea3bfb0b3
Rename n variables to numberOfAccounts inside of test suite. Remove idStore tests. 2016-11-11 17:06:37 -08:00
Frankie
f665b779cb Merge branch 'master' into i328-MultiVault 2016-11-10 16:53:47 -08:00
Dan Finlay
7068d2e71c Adjust gas buffer to be 20% over estimate 2016-11-08 08:39:41 -08:00
Dan Finlay
6f39924e60 Increase gas buffer
Fixes #795
2016-11-08 08:32:34 -08:00
Dan Finlay
161ff62fdc Merge branch 'master' into i328-MultiVault 2016-11-07 15:38:25 -08:00
Dan Finlay
798e057854 Fix nickname test 2016-11-07 12:19:56 -08:00
Dan Finlay
7b420c6e15 Fix BN reference 2016-11-07 12:18:02 -08:00
Dan Finlay
553a6da011 Fix 787 gas buffer bug 2016-11-07 12:00:14 -08:00
Dan Finlay
1896928562 Fix gas price buffering
Our gas price buffering logic had a bug, because bn.js has inconsistent behavior when using hex-prefixed output.  The issue has been opened with them here:
https://github.com/indutny/bn.js/issues/151

We've corrected our usage in the mean time.
2016-11-07 11:56:20 -08:00
Dan Finlay
fff5a6765e Added failing test for #787 2016-11-07 11:25:23 -08:00
Dan Finlay
e0246975a7 Finish fixing nicknaming bug 2016-11-03 13:44:29 -07:00
Dan Finlay
bd2a429a85 Fix account nicknaming bug
When nicknaming, we weren't normalizing the input, and so we were retrieving with differently formatted addresses than we were persisting.
2016-11-03 11:59:20 -07:00
Dan Finlay
9ca3c57339 Fix vault creation bug 2016-11-03 11:34:57 -07:00
Dan Finlay
185396ff08 Fix dual vault creation bug 2016-11-02 16:35:46 -07:00
Dan Finlay
4cf1b606e4 Fix handling of migrating old vault style
Now old vaults are recognized as an "Initialized" MetaMask instance.

Upon logging in, when fetching the initial password-derived key, if there is no new-style vault, but there is an old style vault, it is migrated to the new format before proceeding through the usual unlocking steps.
2016-11-02 15:04:50 -07:00
Dan Finlay
18e5173f06 Now migrating old vaults to new DEN format 2016-10-29 02:29:25 -07:00
Dan Finlay
331d9c91ee Add vault migration test 2016-10-28 13:26:14 -07:00
Dan Finlay
2690d1acfd Added hd wallet tests 2016-10-27 17:23:26 -07:00
Dan Finlay
f9ff6cb55e Merge branch 'master' into i328-MultiVault 2016-10-25 16:59:58 -07:00
kumavis
3af3565000 test - fix delegate-call test 2016-10-24 16:12:44 -07:00
kumavis
85d03cc8fb Merge branch 'master' into i743-FixDelegateCallFlag 2016-10-24 12:24:19 -07:00
Dan Finlay
152419a79b Merge branch 'master' into i328-MultiVault 2016-10-21 17:58:18 -07:00
Dan Finlay
626b52d24a Fix bug in new KeyringController vault restoring logic. 2016-10-21 13:11:30 -07:00
Dan Finlay
ee73e373a0 Create new vault before each keyringController unit test 2016-10-21 12:26:56 -07:00
Dan Finlay
44aa1be277 Create basic keyring-controller unit test file 2016-10-21 12:11:54 -07:00
Dan Finlay
c3e1c5c57f Added SimpleKeyring tests 2016-10-21 11:10:36 -07:00