Commit Graph

26 Commits

Author SHA1 Message Date
Daniel Ternyak f34811546a Fix Unlock Bugs (#183)
* Remove unused imports.

* Create and use .toPrecision forwarding method for `Unit`

* Error handling when unlocking trezor devices.

* Use translateRaw to fulfill string req;
2017-09-11 20:29:07 -05:00
HenryNguyen5 481e6e89b6 Refactor Wallet Base Class to Wallet Interface and Implement (#184) 2017-09-11 19:26:16 -05:00
Daniel Ternyak 38dd22953a Ether Unit Types and Send UX Improvements (#174)
* remove 'transate' property and ng-scopes

* use bigs (surprised flow did not catch this)

* fix dropdown not expanding -- switch to simpledropdown

* Don't use generics for no real reason

*    Create Ether, Wei, and GWei types, and annotate.

    Also contains refactors and UX improvements

    1. clear previously generated rawTX/signedTx when changes to transaction inputs are made.

    2. reset generated rawTx/signedTx while new generateTx is loading

* add toString helper method and use in place of .amount.toString()

* support optional base in toString helper method and use

* incorporate PR suggestions (destructure, resolve via callback)
2017-09-08 14:01:31 -05:00
Daniel Ternyak e3d3b2c8e8 Refactor Send (#164)
* refactor SendTransaction component and transaction helper lib

* move transaction generation out of component; refactor tx types and simply tx generation

* remove commented out try/catch

* address todo; rename function/types

* fix imports and address comments
2017-09-05 16:28:19 -05:00
HenryNguyen5 e07eedb3ad Refactor BaseNode to be an interface INode (#167) 2017-09-05 11:32:14 -05:00
Daniel Ternyak a4ec6f6139 Finalize send (broadcast signedTx, loading indicators, error handling, form validation) (#141)
* hide buttons during send loading state

* fix transaction succeeded not clickable; provide error in action

* move BroadcastStatusTransaction into 'libs/transaction'

* use more succint Array.prototype.find

* rename resetState -> resetTransaction

* refactor and component componentDidUpdate logic

* rename disabled -> generateDisabled; comment componentDidUpdate

* add size to Spinner, use in ConfirmationModal; disable instead of hide buttons in Modal

* fix flow not understanding that an object wouldn't be null in this case anyway. silly flow

* various refactors; send entire balance working
2017-08-30 21:00:31 -07:00
William O'Beirne 1d235cf67a Trezor Unlock + Deterministic Wallet Groundwork (#137)
* Basic reducer / action / saga setup, rendering wallets.

* Better address rows, with values.

* Styling + back and next buttons.

* Formatting, dpath changing.

* Derived -> Deterministic

* Set wallet on confirm.

* Flesh out Trezor wallet, add transaction signing.

* Custom dpath, better handling of canceled switches and over-rendering / prop calling.

* Token empty string value.

* Move DPaths to config file.

* Clarifying comments.
2017-08-28 12:43:57 -05:00
Daniel Ternyak 0474c52004 Derivation Checker (#134) 2017-08-24 18:41:47 +02:00
skubakdj 982d70a56c Use async in download wallet (#127)
* convert keystore gen to async

* add & use type UtcKeystore

* add types, refactor

* remove unneeded prop checking
2017-08-24 10:34:08 +02:00
William O'Beirne bf4171dfbd Transaction confirmation modal (#108)
* Add a little arrow icon.

* Replaced toEther function with toUnit to reduce the number of conversion functions wed need. Add tests for conversion functions.

* First pass at a styled confirm transaction modal.

* More data about data

* Hook up generated transaction with modal

* Fix modal position

* Add from address. Restyle a bit.

* Only show textareas and button if transaction has been generated.

* Remove need for param.

* Copy.

* Use non-relative path.

* Initial crack at transaction token support.

* Fix flow type

* Unit tests for contracts and erc20

* Convert contract class to ethereumjs-abi, caught a bug

* Add decodeArgs for contracts, decodeTransfer for erc20

* Show token value in modal

* Show value from transaction data in confirmation.

* Show address of receiver, not token contract

* Flow type

* Only accept bigs

* Unlog

* Use ethereumjs-abis method ID function

* Get transaction stuff out of state. Leave todo notes.

* Intuit token from transaction to address.

* Move generate transaction out of node and into libs/transaction.

* timeout -> interval

* Promise.reject -> throw

* Get default currency from network.

* Add more unit tests for decoding. Adopt the $ prefix for decoding calls.

* Use signed transaction in confirmation modal.
2017-08-23 08:57:18 +02:00
skubakdj f42837de68 Keystore & Private Key Wallet Decrypts (#116)
* wire up keystore decrypt & build UI

* add support for encrypted private keys

* add check for key length

* rename keystore wallet file

* rename encrypted priv key wallet file

* add support for presale, v1, & v2 JSON keystores

* clean up TODO messages, add class files

* add v3 references

* add flow type

* fix event bug

* update privkey validators to accept whole privkey

* refactor pkey/pass validation to function

* move pass req detection to function, remove unnecessary state

* add tests for decrypt & keystore libs
2017-08-20 22:28:47 +02:00
William O'Beirne 9b2156ed4f WIP: Generating transaction on Send tab (Pt 1) (#100)
* Generating transaction ,placing into read only textareas.

* Fix async wallet getAddress cases.

* Chain id from network

* remove leftover console log

* Check balance before generating transaction.

* Translate error msgs, check for invalid address.

* Errors for gas limit and gas price issues.
2017-08-11 22:54:10 +01:00
Daniel Ternyak c594619acd fix additional flow errors (#113) 2017-08-09 15:26:35 +02:00
skubakdj 30f2d854d6 KeystoreWallet Class & Decrypt (#111)
* add keystore decrypt functionality

* add flow types

* add KeystoreWallet class

* only support keystore as string
2017-08-09 07:04:32 -05:00
skubakdj 187d2e16ad Fix flow errors (#110)
* simplify getAddress method

* refactor to handle async wallet getAddress

* fix bug on BaseWallet

* remove unnecessary catch
2017-08-09 07:01:34 -05:00
William O'Beirne 7541d6f486 Estimate gas (WIP) (#102)
* relayout rpc code, start contract helper

* Dont ask for estimate if theres no value

* Split out conversion of ether to wei hex into lib function.

* big.js -> bignumber.js
2017-08-07 22:45:08 -05:00
skubakdj 3ef2b51a68 Add Promises & Signing to Wallet Classes (#105)
* add validation for raw tx

* add node module, add signing lib

* add tx & message signing, promise everything

* remove unnecessary returns

* move isValidRawTx to for loop

* add & use new type RawTx

* implement cleaner promises, reject instead of throw
2017-08-07 22:25:23 -05:00
William O'Beirne e3505fd958 Contracts Tab Scaffolding (#70)
* Empty component, routes setup.

* Shared components for all Contracts inputs. Dont do anything yet.

* Check in reducer work so far. Still WIP.

* Header styling

* Check in input work so far, splitting to new branch.

* Strip down contracts inputs. Split out into form and explorer

* Contract selector

* Constantized config actions to use in contract saga.

* Interact explorer UI, no functionality

* Convert to constants, hook up errors

* Deploy and style cleanup.

* Remove unnecessary class.

* Fix flow errors with css modules

* Attempt at fixing all newly introduced flow errors in the contracts branch.

* Removed unused validator.

* Remove action constants, fix flow specificity in reducers

* Fix unit tests

* Move network contracts out of redux / sagas, and read directly from state with a selector in mapStateToProps.

* Fix initialState -> INITIAL_STATE rename

* foreach push -> concat
2017-07-27 19:31:59 -05:00
Daniel Ternyak 37008e9fe9 Complete Generate/Create Wallet Flow (#38)
* GenerateWallet: Download real UTC file.

* Paper wallet (#45)

* Working paper wallet (#52)

* Reset Generate Wallet state when component will unmount
2017-07-16 16:02:13 -05:00
crptm 780f3ba94f balance fetching (#41)
* balance fetching

* fix tests

* bump deps

* validate custom token form

* equiv values

* fix rates saga naming

* address review comments
2017-07-13 16:02:39 -05:00
Daniel Ternyak 06ae70988a merge develop into 'swap_part_3' 2017-07-03 22:21:19 -05:00
crptm 85759d73b4 type dropdown, config actions 2017-07-04 05:25:01 +04:00
Daniel Ternyak 7cf3d26bbe Merge feat/send-page 2017-07-02 00:49:06 -05:00
crptm 63e7eb89e4 unlock wip 2017-06-30 03:03:11 +04:00
crptm 0ad93101e7 validators merge 2017-06-27 03:27:26 +04:00
Daniel Ternyak c77f8430c5 Create Validator class and add deps to package.json 2017-06-24 01:08:57 -05:00