Commit Graph

13 Commits

Author SHA1 Message Date
James Prado 70a2b3ca9a Update Jest & Enzyme, Add snapshot tests (#307)
* Add disclaimer modal to footer

* Remove duplicate code & unnecessary styles

* Fix formatting noise

* remove un-used css style

* Fix tslint error & add media query for modals

* Nest Media Query

* Update Jest & Enzyme, Add snapshot tests

* Fix tslint errors in /spec, Update mock localstorage

* Update types in tests, Fix tslint error

* Specify module versions for browser

* Update sendTransaction snapshot
2017-10-24 19:17:26 -07:00
HenryNguyen5 5d4b36d453 Migrate to Typescript (#224)
* Refactor babel/types

* Refactor entry point

* Refactor actions

* Refactor api

* Full project refactor -- Broad type fixing sweep

* - completely fix merge conflicts
- handle various type errors

* Add tslint to package.json

* Dependency cleanup

* Fix module resolution

* Work on type definitions for untyped libs

* progress commit

* Add more definition typing

* various type additions

* Add unit types

* Fix sagaiterator  + unit types

* various types added

* additional type additions

* Fix typing on Sagas

* remove flowfixmes; swap translate for translateRaw

* Get rid of contracts - awaiting Henry's contract PR

* Remove contracts from routing

* Fix most of actions/reducers

* refactor actions directory structure

* fix reducer action type imports

* Fix most of type errors pre-actions refactor

* fix action creator imports in containers

* Refactor more

* Refactor index of actions

* fix action imports; use module level index export

* package-lock.json updated

* Use action types in props

* Type up action creators

* Fix most of connect errors

* Typefixing progress

* More types

* Fix run-time errors

* Caching improvements for webpack

* Remove path resolve from webpack

* Update non-breaking packages to latest version

* Fix token typing

* Remove unused color code

* Fix wallet decrypt dispatch

* Set redux-form related props/functions to ANY, since we're stripping it out later on

* Revert BigNumber.js package changes

* Extend window to custom object for Perf

* Format Navigation

* Typecase keystore errors as any (since we shouldnt touch this)

* Push wallet context fix

* - find/replace value->payload in swap
- properly type swap state properties
- extract inline reducer into reducer function

* - type local storage retrieved items as generic

* - bind all RPCClient methods with fat arrow

* - reformat

* Change to enums for constants

* Change state into any

* Fix swap errors

* ensure that seconds are passed into state as integers

* Fix rest of errors

* use parseInt explicitly instead of type coercion

* Fix derivation-checker, remove flow command, add tslint command, add tslint-react, tell travis to use tslint instead of flow.

* Whoops, remove those tests.

* Remove unsupported (yet) config option.

* Fix precommit to target ts and tsx files.

* Fix some errors, ignore some silly rules.

* Revert jest to v19, use ts-jest and make all tests typescript. Fixes all but one.

* Get rid of saga tests

* Fix tslint errors
2017-09-24 19:06:28 -07:00
skubakdj c88e96d603 Wallet Decrypt - Mnemonic (#180)
* add 'bip39' package

* add mnemonic decrypt, wallet wrapper

* add mnemonic path config

* add mnemonic support to deterministic components

* add mnemonic support

* accomodate for ledger ETH path

* remove comments

* update comments regarding path length

* rename modal open handler

* make several props optional

* add basic tests for mnemonic decrypt

* make flow happy, add user error notifications

* convert dpaths to js file, update references

* add ledger path to test

* Trezor DPath Fix (#196)

* Match v3 more closely.

* Require wallet index on deterministic wallets, update trezor to send index.

* remove redundent stripAndLower function and rename existing stripHex to stripHexPrefixAndLower
2017-09-15 12:29:38 -07: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
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
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
Daniel Ternyak 29be2821a3 refactor donation addresses map; fix hardcoded instance of address in send 2017-07-03 19:16:20 -05:00
Daniel Ternyak 7cf3d26bbe Merge feat/send-page 2017-07-02 00:49:06 -05:00
crptm 6fce9029c5 fix spec 2017-06-27 03:38:45 +04:00
Daniel Ternyak 142ed3adc5 Add tests for Validator 2017-06-24 15:46:30 -05:00