Commit Graph

497 Commits

Author SHA1 Message Date
Daniel Ternyak 0474c52004 Derivation Checker (#134) 2017-08-24 18:41:47 +02:00
Daniel Ternyak a61dc268dc Add reducer tests (#133)
* create config reducer tests

* create generateWallet reducer tests

* create wallet reducer tests

* create swap reducer tests; use empty string as destination amount when origin amount is an empty string instead of 0

* add additional swap reducer tests

* refactor swap; additional tests

* create separate dir for swap reducer
2017-08-24 10:53:59 +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
Will Piers 318a42ccf3 Throttling changes to gas price (#81) (#123) 2017-08-20 22:51:01 +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
Daniel Ternyak 11834299a2 Explicitly label ALPHA 2017-08-15 15:56:29 +02:00
William O'Beirne 6ae97b3121 Add no-restricted-globals rule (#117) 2017-08-15 11:29:40 +02:00
Daniel Ternyak 41ab0639e7 add flow to travis (#115) 2017-08-11 23:13:53 +01: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
Daniel Ternyak a66337ac0a Swap Part 4 (#101)
### Re-implements:
* min/max validators on initial currency swap selection
* polling of order status
* timer that persists across refreshes via localStorage (computed based on `createdTime` and `validFor` amount)
* swap persists across refreshes once order is created.
* various type refactors

### New additions:
* *SimpleButton* (can be PRd separately on request)
* clear loading state after order create (via SimpleButton and font-awesome)
* buffers for non-BTC swaps (bity does not actually accept 0.01 BTC worth of ETH as they claim they do in their JSON response, so a magic number of 10% is added to the minimum).
2017-07-31 18:14:30 -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
William O'Beirne 96405157f0 Fix number formatter (#99)
* Fix initialState -> INITIAL_STATE rename

* Fix number formatter for removing non-trailing zeroes, not handling zero decimals. Add tests.
2017-07-27 18:21:50 -05:00
William O'Beirne c32edf4a0b Fix initialState -> INITIAL_STATE rename (#97) 2017-07-27 18:21:27 -05:00
William O'Beirne 1aad9d1c21 Standardize Redux Actions / Reducers (#95)
* Convert Swap to consistent style

* Generate wallet reducer cleanup.

* Confirm empty action in swap reducer

* Union types. Fix gen wallet collision

* Fix not using all actions in reducer. Added reducer state for is fetching from bity. Added todo to make that a loader.

* Readme instructions.

* Remove common action constants.

* Bring all actions and reducers inline with readme instructions.

* Readme fixes

* address comments
2017-07-27 12:05:09 -05:00
William O'Beirne e8ad2ce958 Flow style include fix (#75)
* Attempt to fix the flow include style errors, as outlined in this gist: https://gist.github.com/lambdahands/d19e0da96285b749f0ef (#75)
2017-07-27 11:50:29 -05:00
crptm 1c7f13c69c fix npm run build (#94) 2017-07-25 18:13:25 -05:00
Daniel Ternyak 0eae13f938 Swap Cleanup (#68)
* add types for swap action creators (and separate out to separate module)
* DRY up swapInformation and onGoingSwapInformation -> SwapInfoHeader.
* stop bity rate loading when Swap will unmount
* split out SimpleDropdown to separate module
* various additional refactors
2017-07-22 16:24:03 -05:00
William O'Beirne 7d5e590c42 Manifest and Favicons (#69)
* Move favicon stuff to static folder. Expand manifest.json. Link it all up in HTML.

* Undo index changes

* Remove unnecessary readme
2017-07-22 15:55:59 -05:00
Daniel Ternyak 69851696e9 Update flow-bin version to 0.50.0 (#67) 2017-07-21 13:49:30 -05:00
William O'Beirne 5ca84b816f Added missing qr code dependency to package lock (#65) 2017-07-20 15:20:28 -05:00
skubakdj 7fd7ba66c9 Gas price dropdown (#61)
* implement gas price dropdown
2017-07-20 12:06:10 -05:00
William O'Beirne d2ae162e80 Enforce node / npm versions, add package-lock.json (#57)
* Enforce node / npm versions, add package-lock.json

* Have travis respect nvmrc. Add nvmrc.
2017-07-18 19:41:17 -05:00
Daniel Ternyak 0b72b8ff6a update GenerateWallet hasDownloadedWalletFile prop type from invalid 'boolean' to valid 'bool' type (#58) 2017-07-17 20:47:01 -05:00
Daniel Kaspo e0a52ed0f8 Fixed trying to improperly delete our dist folder. (#36)
* Fixed trying to improperly delete our dist folder.
2017-07-17 10:35:25 -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
Daniel Ternyak 2265f75700 Adjust 'lint-staged' to pass single-quote via CLI; remove unneeded .prettierrc (#55) 2017-07-16 11:15:37 -05:00
crptm c8fa6e3022 support tokens on send page (#47) 2017-07-15 18:05:57 -05:00
Maciej Bembenista f4e63c7e02 Integrate Husky git hooks and configure a Prettier hook for JS (#53)
* Add Husky, lint-staged and prettier as dependencies, configure prettier precommit hook

* Change line width in Prettier to the default 80
2017-07-15 18:02:14 -05:00
William O'Beirne ccd946a08d Reusable modal component (#50)
* README proposal.

* First pass at implementation of proposal on Footer and Header. Footer could use some work.

* Cleanup, and readme additions

* First pass at basic modal

* Modal open / close

* Modal close on esc key.

* Freeze body scrolling when modal is open.

* Use the index bestowed upon me.

* No close on shade click

* Only render children if modal is open. Also, dont show cursor on shade

* Use flexbox for simpler content height / scroll behavior.

* type modal, fix body scroll when mounted opened

* Modal width is sized by content, not hard coded sizes.

* Remove size from flow prop types.
2017-07-15 01:26:43 -05:00
William O'Beirne 8ed09dfa06 First attempt at CSS modules (#48)
* README proposal.

* First pass at implementation of proposal on Footer and Header. Footer could use some work.

* Cleanup, and readme additions
2017-07-14 23:16:36 -05:00
William O'Beirne c9948626d1 Bundle and compress images with Webpack (#49)
* First pass at image loader

* Clean up config, convert some images as example.
2017-07-14 12:04:08 -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 52cbdfbd0f Docker (#40)
* initial attempt at a docker based MEW for dev

* add webpack dev polling which is needed when mounting on windows. https://github.com/webpack/webpack-dev-server/issues/155#issuecomment-159140735

* readme
2017-07-10 22:03:08 -05:00
Daniel Ternyak 8092a5dec3 Merge pull request #37 from MyEtherWallet/bity_stop_refresh
Sagas: Adjust bity saga to allow for cancelled polling, and stop poll…
2017-07-09 14:15:23 -05:00
Daniel Ternyak cdcbd7a56b Sagas: Adjust bity saga to allow for cancelled polling, and stop polling when part 2 of swap ends. 2017-07-08 22:51:14 -05:00
crptm ecb11133dd move bity getRates to saga (#35)
* move bity getRates to saga

* typo

* bity polling
2017-07-07 21:00:09 -05:00
Daniel Ternyak 46ec6fe235 Send: cleanup (#34)
* Send: cleanup

* Send: add. localization
2017-07-05 19:36:11 -05:00
Daniel Ternyak 7c6483b121 Dev: silence eslint warnings for unused vars 2017-07-05 19:18:25 -05:00
Daniel Ternyak 30c3f6362a Merge pull request #33 from MyEtherWallet/persist_language_select
De-duplicate language select state
2017-07-05 18:37:56 -05:00
Daniel Ternyak caadae2704 De-duplicate language select state 2017-07-05 18:28:54 -05:00
Daniel Ternyak 3a1eaf9af1 Merge pull request #32 from MyEtherWallet/persist_language_select
Redux: Persist language selection to local storage via middleware and…
2017-07-05 17:57:40 -05:00
Daniel Ternyak e873ffc994 Logging: clarify saveState log 2017-07-05 17:56:46 -05:00
Daniel Ternyak dc3c1985b5 Logging: add warning log for exception during local storage parsing 2017-07-05 17:35:53 -05:00
Daniel Ternyak 90d7b52987 Fix flow 2017-07-05 17:16:32 -05:00