Commit Graph

22 Commits

Author SHA1 Message Date
skubakdj c9c147db52 Wallet Decrypt - Web3 (MetaMask / Mist) (#303)
* add support for web3, disabled, and hidden in node dropdown header

* add web3 node config actions

* add web3 wallet actions

* add web3 node support

* add web3 wallet & web3 wallet ui selection

* add web3 wallet & config sagas

* add web3 transaction support to SendTransaction tab

* add web3 node check & reset to redux store

* remove comments from Web3.tsx

* update comment

* correct spacing display issue in Web3 component

* convert getTransactionCount response to string

* disable web3 wallets in offline mode

* implement sendCallRequest method on Web3 node

* remove unused vars

* make typescript happy

* convert wallet constants to enum & apply to wallet action files

* update wallet reducer to use TypeKeys enum

* remove unnecessary console log

* remove unnecessary await

* make token balance math more readable

* use NewTabLink in Web3.tsx, allow NewTabLink to accept className

* move web3.ts to non-deterministic folder

* update imports & method names, implement message signing

* add web3 wallet export

* use bufferToHex
2017-11-09 19:30:20 -08:00
HenryNguyen5 a00269507c EthereumJS-Wallet (Part 3) (#316)
* Progress commit -- ethereumjs-wallet typings

* Add hdkey module + better wallet typing

* Add provider-engine typings

* Add jsdoc descriptions for hdkey constructor methods

* Fix missing return type

* Fix another missing return

* Make provider engine options optional

* Add priv/pubkey members to wallet instance

* Turn into SFC + Use ethereumjs-lib

* Use proper interface naming for V3Wallet

* Switch to ethereumjs-wallet

* Switch to ethereumjs-wallet and refactor using NewTabLink

* Use proper interface naming for V3Wallet

* Use proper interface naming for PublicKeyOnlyWallet

* Strip out wallet classes for ethereumjs-wallet, stuff wallet types in privkey for now

* Seperate wallets into deterministic and non-deterministic, change IWallet and deterministic wallets to adhere to getAddressString

* Fix broken test, remove scryptsy

* Fix broken test, re-add scryptsy to make this PR pass

* Remove uuid from deps and keystore test

* Add ethereumjs-wallet to DLL

* Wrap mnemonic wallet

* Fix definition module for thirdparty wallets

* Fix MewV1 wallet not loading due to wrong library

* Fix tsc error

* Decrease n-factor to 1024, checksum address of keystore

* Fix isKeystorePassRequired

* Fix tsc errors

* Merge package lock

* Update package lock

* regenerate lock file

* Lock typescript to 2.5.2

* Merge develop
2017-11-08 10:16:43 -08:00
skubakdj 68e5972a03 Sign & Verify Message (#315)
* add route and nav tab for new module

* add new module to tabs index

* add signMessage to wallet interface

* add signed message verification, normalize pkey sign

* init Sign & Verify Message tab

* reorder imports

* mock out Trezor

* cast to bool instead of length check

* normalize ledger sign message

* fix broken this context

* add commented message signing to trezor wallet

* correct var to start on sign tab

* remove unused state var

* clean up SignMessage classes

* clean up VerifyMessage classes, remove unnecessary log

* correct event variable types

* remove unnecessary exports

* remove empty classname

* use implicit return

* shorten signMessage method

* remove unnecessary disable

* tweak variable name

* make better use of destructuring, remove console log

* use destructured var

* flatten if statement

* add signMessage method to wallet reducer test
2017-10-30 12:10:25 -07:00
HenryNguyen5 b94bede473 Add "No Unused Params and Locals" Linting Rule (#297)
Add "No Unused Params and Locals" Linting Rule
2017-10-18 19:29:49 -07:00
skubakdj aac0176ca2 Wallet Decrypt - Ledger (#238)
* add static vendor js libraries

* add ledger config

* add ledger components

* add ledger wallet

* bugfix: trezor, set dPath on change

* add rlp type package, update types

* change address to public

* update tslint script to exclude all files in directory

* revert to private address and use getAddress()

* remove unnecessary eslint line out of library files

* remove IWallet import

* Fix ts errors

* Remove version controlled vendor files from DLL
2017-10-05 16:29:14 -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
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
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
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
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 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 63e7eb89e4 unlock wip 2017-06-30 03:03:11 +04:00