Commit Graph

129 Commits

Author SHA1 Message Date
Dan Finlay f51a13abaf Fix ethStore pushed addresses
Needed to add hex prefix always.
2016-09-12 08:39:46 -07:00
Dan Finlay 9b861b6687 Fixed caching bug
Fixed bug where the second new vault created in an IdStore would initially return the accounts from the original store.

Also fixed some tests that were incorrect.
2016-09-10 15:45:34 -07:00
Dan Finlay 59fd86383f Correctly clear ethStore cache on new vault restore 2016-09-10 12:08:27 -07:00
Dan Finlay 6763871c41 Captured #640 in failing test 2016-09-10 11:46:50 -07:00
Dan Finlay 36dc63bc04 Add new eth-lightwallet salting to vault.
eth-lightwallet was previously not salting vault passwords, potentially making it easier to crack them once obtained.

This branch incorporates the API changes to allow us to take advantage of the new salting logic.

This is still throwing deprecation warnings, but that's actually a bug in eth-lightwallet I wrote, [I've submitted a PR for that here](https://github.com/ConsenSys/eth-lightwallet/pull/116).

Fixes #555
2016-09-09 19:42:18 -07:00
Dan Finlay 01f3683dcf Only init one wallet on restore
Fixes #610
2016-09-08 19:49:28 -07:00
Frankie 483a7fee0a Add a back button on lock screen to go back to init menu 2016-08-25 14:13:32 -07:00
Frankie efa61f2cf8 Merge branch 'master' into shapeshiftTx 2016-08-18 11:06:32 -07:00
Frankie 752d16f6c0 WIP: ShapeShift tx 2016-08-18 11:04:28 -07:00
Kevin Serrano 6895d330ff Merge master. 2016-08-15 10:50:53 -07:00
Kevin Serrano b1f68ec9cd Add global var for background. 2016-08-11 19:44:59 -07:00
Kevin Serrano 86832e6feb Fix merge conflicts. Fix typos. Ensure currency immediately updated on load. 2016-07-22 11:15:47 -07:00
Kevin Serrano 716e65424d Add date access throughout the data flow. 2016-07-21 14:08:26 -07:00
Frankie fcd523abe4 Buy button (#474)
* WIP: Buy button link

* Add buy eth and the buy eth warning message

* Add css

* Move the opening of coinbase page to background
 and send to faucet if on test net

* Create a Warning about storeing eth

* Finish Buy button and Eth store warning screen

* Add to CHANGELOG

* fix frankies deletion and change chrome to extension
2016-07-21 13:41:10 -07:00
Kevin Serrano 4a9d5b1c25 Add data field to pass up parameters up to reducer. 2016-07-21 10:15:34 -07:00
kumavis 97e38b4983 new tx - calculate estimatedGas and show thing in tx-details (#441)
* new tx - calculate estimatedGas and show thing in tx-details

* Bump changelog
2016-07-13 23:39:44 -07:00
Kevin Serrano ecd0a3ec1e Add one wallet to new accounts instead of three. 2016-07-12 12:06:18 -07:00
Dan Finlay 78f2794d39 Remove useless and buggy clearWallet function 2016-06-30 11:34:34 -07:00
Dan Finlay 122018a96a Fixed tests 2016-06-24 16:13:27 -07:00
Dan Finlay b2b3f4b26b Improve refactor
Replace config-manager-singleton with one that is instantiated within the `background-controller`, and takes its persistence callbacks from its instantiated options.

Replaced class getters with more familiar get___() functions.
2016-06-24 15:52:56 -07:00
Dan Finlay 8fde8a8921 Manually linted 2016-06-21 13:56:04 -07:00
Dan Finlay a08c3bc01b Auto linted 2016-06-21 13:18:32 -07:00
Dan Finlay 61459a6b51 Merge pull request #294 from MetaMask/SignFullDataNotHash
Sign full data not hash
2016-06-20 15:08:27 -07:00
Dan Finlay 7ecc028c5d Merge pull request #296 from MetaMask/i252
idStore - add DELEGATE_CALL detection
2016-06-17 10:48:44 -07:00
kumavis c1e9444200 idStore - add DELEGATE_CALL detection 2016-06-16 19:51:34 -07:00
Dan Finlay 451be3b10e Merge branch 'master' into SignFullDataNotHash 2016-06-16 17:34:44 -07:00
Dan Finlay e8ef8f3d2d Add confirmation status to metamask state branch 2016-06-16 16:41:33 -07:00
Dan Finlay ae3993b6d7 Factor idManagement into its own module 2016-06-15 14:58:06 -07:00
Dan Finlay 37e552e95d Sign binary data not hash on eth_sign 2016-06-15 10:48:36 -07:00
Dan Finlay 7430560f7f Fix pad with zeroes usage 2016-06-14 15:41:07 -07:00
Dan Finlay 1fe383f7fb Fix signature concatenation
Fixes #280

Or at least, it should. Is this what you were requesting, @denisgranha?
2016-06-14 15:35:37 -07:00
Dan Finlay b2b4b4dd25 Merge branch 'master' into display_network 2016-06-03 15:21:24 -07:00
Dan Finlay d49ef1a2e5 Blockchain status now updates on availability change 2016-06-03 15:18:20 -07:00
Dan Finlay 2422c78ce2 Add network loading indication 2016-06-03 13:58:09 -07:00
Dan Finlay 07617dbb07 Add login check 2016-06-02 17:11:10 -07:00
Dan Finlay 9cc04be5e4 Added seed word recovery to config screen 2016-06-02 16:52:18 -07:00
kumavis 9640a6c543 idStore - track network failure 2016-05-30 08:22:19 -10:00
Dan Finlay 95a3cfe3fc Added ability to nickname wallets locally
The changes are persisted to localstorage, so they cannot be restored on a new computer, but for right now it's a nice organizational feature.
2016-05-20 16:18:54 -07:00
Dan Finlay 7d5aaaa5bd Add ability to add account to vault
Scrolling to the bottom of the accounts page now reveals a downward-facing chevron button.

Pressing this button shows loading indication, adds a new account to the identity vault, displays it in the list, and scrolls the list to the bottom of the page.

Any number of accounts can be generated in this way, and the UX feels intuitive without having to overly explain how HD paths work.
2016-05-20 12:40:44 -07:00
Dan Finlay 041b5493dc Streamlined some transition logic
Fixes #122

Had used multiple actions for some transitions, which would lead to brief intermediary states.

Now making a few actions much more explicit about what they route to, so there is less intermediary logic, and we can transition confidently to the correct view.
2016-05-13 01:24:05 -07:00
Dan Finlay e6c4d63ccd Add UI for Signing Messages
Calls to `eth.sign` are now transiently persisted in memory, and displayed in a chronological stack with pending transactions (which are still persisted to disk).

This allows the user a method to sign/cancel transactions even if they miss the Chrome notification.

Improved a lot of the view routing, to avoid cases where routes would show an empty account view, or transition to the accounts list when it shouldn't.

Broke the transaction approval view into a couple components so messages and transactions could have their own templates.
2016-05-03 14:32:22 -07:00
kumavis 82983e5eff idmgmt - eth_sign support + notifications 2016-04-28 14:16:24 -07:00
kumavis d562b86f7a tx list - bug fix - fixes #143 2016-04-28 11:48:39 -07:00
Dan Finlay d017c28441 Filter transaction list for current blockchain network
When starting up, we now create a `web3` inside the `background.js` process, which we pass to the `idStore` and ask for the current `network`.

We include the `network` on `app.metamask.network` in the state object.

We re-request the network when changing provider.

We filter the transaction list for transactions that match the current network.
2016-04-27 18:04:33 -07:00
Dan Finlay 1025eb3b4f Persist selected account
When selecting an account, we now persist the selection to the `configManager`, so the selection can be restored when re-unlocking Metamask.

Also found the bug where `rawtestrpc` was still being used as a default, and fixed it!
2016-04-25 14:14:34 -07:00
Dan Finlay 2dd7bd6bd0 Make account detail view the primary view
- When unlocking, the first account is now selected by default and displayed as the main view.
 - There is now a "CHANGE ACCT" button on the detail view to show the accounts list.
 - Clicking an account from the accounts list now navigates to the detail view and selects that account.
 - Config/Info screen "back" buttons now fire a new action, `GO_HOME`, which is configured to navigate to the accountDetail view, putting that logic in one place.
 - When locking and unlocking again, the first account is always displayed, eventually we should persist the selection.
2016-04-25 12:38:43 -07:00
Dan Finlay 532edf670e Store metamaskId on metaTx instead of getTxWithParams method. 2016-04-20 09:29:37 -07:00
Dan Finlay b8c57433ce Add completed tx hash to persisted tx log 2016-04-19 17:44:11 -07:00
Dan Finlay cfdad0f9fe Emit transaction list to UI 2016-04-18 17:19:58 -07:00
Dan Finlay dc043b7f9b Fix method of emitting unconfirmedTxs to UI 2016-04-18 17:19:20 -07:00
Dan Finlay a441e635bd Persist transactions to config-manager
Transactions are now stored, and are never deleted, they only have their status updated.

We can add deleting later if we'd like.

I've hacked on emitting the new unconfirmedTx key to the UI in the format it received before, I want Aaron's opinion on where I should actually do that.
2016-04-18 16:39:35 -07:00
Dan Finlay 874d9c1ab8 Add ability to export private keys 2016-04-06 12:01:10 -07:00
Dan Finlay 2d6a82e36d Add mayBeFauceting boolean to account object
This boolean is computed from these requirements:

 - The user is on the testnet rpc
 - The account is index 0

The UI is responsible for checking the account balancing and indicating if fauceting is indeed pending or not.
2016-04-04 15:35:41 -07:00
Dan Finlay b134bb4374 Support undefined address selection
If `setSelectedAddress` is called on the IdStore, the first account is automatically selected.
2016-04-04 12:13:30 -07:00
Dan Finlay 685711aca4 Call back with wallet restore errors 2016-04-01 14:02:02 -07:00
Dan Finlay f5105293bf Do not cache the seed, retrieve it from the decrypted wallet 2016-03-31 10:47:40 -07:00
Dan Finlay ea7b891729 Remove unnecessary abstraction 2016-03-31 10:24:39 -07:00
Dan Finlay b81e2ccb7e Removed logs 2016-03-30 19:26:05 -07:00
Dan Finlay c2046be0d8 Made configuration migrateable
Abstract all configuration data into a singleton called `configManager`, who is responsible for reading and writing to the persisted storage (localStorage, in our case).

Uses my new module [pojo-migrator](https://www.npmjs.com/package/pojo-migrator), and wraps it with the `ConfigManager` class, which we can hang any state setting or getting methods we need.

By keeping all the persisted state in one place, we can stabilize its outward-facing API, making the interactions increasingly atomic, which will allow us to add features that require restructuring the persisted data in the long term without having to rewrite UI or even `background.js` code.

All the restructuring and data-type management is kept in one neat little place.

This should make it very easy to add new configuration options like user-configured providers, per-domain vaults, and more!

I know this doesn't seem like a big user-facing feature, but we have a big laundry list of features that I think this will really help streamline.
2016-03-30 19:15:49 -07:00
Dan Finlay 9bdc169712 Fix signing bug 2016-03-29 12:50:47 -07:00
Dan Finlay d6dee7e748 Add auto-fauceting
When first creating a vault, the first account is submitted to our `rawtestrpc` faucet, receiving `1.337` ether within 15-30 seconds.
2016-03-29 12:21:46 -07:00
Dan Finlay 39160d3025 Remove argument destructuring 2016-03-29 11:12:07 -07:00
Dan Finlay 1c69edff45 Return updated state after restoring vault 2016-03-28 12:35:18 -07:00
Dan Finlay 742fd7caa8 Remove unused reference 2016-03-25 15:47:24 -07:00
Dan Finlay f05ad130c5 Cleaned up how we pass hdString to Lightwallet 2016-03-25 15:38:08 -07:00
Dan Finlay a2c7ccafa6 Implemented BIP44 compliance test.
Also added the hdPath that Christian had told me to our calls to the LightWallet, but this does not seem to have made us generate the same accounts as `testrpc` yet.
2016-03-25 14:51:19 -07:00
Dan Finlay 37fd45e5b7 Convert to bip44 hdTrees
Added initial test just to verify we can recover the accounts we generate in this way.

Still need to add compliance test to make sure this interoperates with testrpc's new mnemonic flag.
2016-03-25 12:41:18 -07:00
Dan Finlay d6aa78e647 Gave lock a callback for better loading indication 2016-03-24 11:05:42 -07:00
Dan Finlay 55f8ae4edd Add seed word caching during confirmation screen
In order to persist the seed word page until the user clicks the confirmation button, we need to store the seed words in localStorage.

To simplify this process I've also reorganized some of the account manager code, broken up one large function into many smaller functions, and created a new class for the IdMgmt object.

Again, sorry such a big refactor in one commit, but I really had to break it down to work through it.
2016-03-24 10:32:50 -07:00
kumavis 2197750510 add vault recovery 2016-03-15 13:39:12 -07:00
kumavis b8e36f41a2 notifications - add tx confirm+cancel buttons 2016-03-11 17:13:48 -08:00
kumavis cbde4157aa idStore - normalize hex format before signing 2016-03-05 14:25:33 -08:00
kumavis 6df64970aa tx sig - it works again 2016-03-02 23:08:28 -08:00
Simon de la Rouviere bab37466d7 Fix issue with raw transaction injected. 2016-02-22 22:10:25 +02:00
kumavis 2c719db940 idStore - add createNewVault 2016-02-17 00:55:57 -08:00
kumavis 9da4094db6 idStore - add isInitialized flag 2016-02-15 14:44:13 -08:00
kumavis 970e9e2113 idStore - seperate signTx and sendTx 2016-02-12 17:57:10 -08:00
kumavis bc2ec9f464 idStore - cancel tx 2016-02-12 12:55:20 -08:00
kumavis f8c5b90320 idmgmt - refactor 2016-02-10 17:44:46 -08:00