Commit Graph

67 Commits

Author SHA1 Message Date
James Prado 4788381641 Update Account SubTab Routing / Token Scanner CSS Updates (#1276)
* Redirect user to subtab after logging in

* Update token balances styles

* Adjust routing for readOnly wallets
2018-03-11 17:19:35 -05:00
James Prado 9cac0298a2 Improve accessibility (a11y) (#1267)
* Manage modal focus

* Add isOpen prop to CustomNodeModal

* Remove outline overrides

* Update outline style for inputs

* Fix modal focus management & Cleanup CustomNodeModal

* Add aria-label on modal close button

* Fix modal scroll to top

* Add aria-live property for notifications

* Add aria-busy to Spinner component

* Fix border styles for generatewallet password inputs

* Update token balances inputs

* Remove multiple h1's & Update styles

* Add alt text to all img elements

* Update swap link from bity to shapeshift

* Update aria-labels and alt text

* Only show keystore password input when required

* Revert "Only show keystore password input when required"

This reverts commit 7ec5de52da0982cd3131f365b142f6915638d831.

* address changes requested
2018-03-08 13:28:43 -06:00
HenryNguyen5 c340246ca0 Enable no-implicit-any (#1263)
* Progress commit

* Update more types

* Fix more types

* Fix abi function types

* Fix lib types

* Fix rest of types

* Address wbobeirne changes

* Change origin and destination check
2018-03-07 17:36:05 -06:00
Daniel Ternyak 3278318fa6
Fix Coinbase Widget (#1286)
* Connect Promos; pass current wallet address to Coinbase

* Use ShapeShift as promo if no wallet instance when showing Coinbase

* use appstate for typing
2018-03-07 10:54:14 -06:00
William O'Beirne 653c363279 Copy address touchups (#1215)
* Checksum address, adjust styles.

* Pull up address
2018-03-01 13:36:30 -06:00
James Prado 9ef1920fe0 Update dropdowns, inputs, and textareas (#1169)
* Align footer to bottom

* Fix request payment offset padding

* Update request payment padding

* Add new Input and Dropdown components

* Fix offset margins in equiv vals

* Update all send tx inputs & dropdowns

* Update generate wallet dropdowns

* Update inputs & dropdowns for contracts tab

* Add inputs & dropdowns for all but swap tab

* amend

* Fix imports

* inputs are invalid when not disabled or readonly

* Fix offset refresh button

* Add togglable password back to wallet generation

* Update swap inputs, textareas, and dropdowns

* Update any outstanding inputs

* Make UnitDropDown searchable

* unitdropdown searchanble if options > 10

* Fix css issues

* Reset before setting currentTo
2018-03-01 11:53:29 -06:00
William O'Beirne 1eb57a38bc Address component for checksumming + linking to explorer (#1168)
* Add address component that checksums and optionally links to block explorer.

* tscheck

* Add exclusive props, type guard.
2018-02-28 20:54:43 -06:00
Amidou Kante 4576b8f325 Copy to clipboard (#1146)
* added code for copy to clipbaord svg

* removed svg link

* can copy clipboard to mouse

* can copy clipboard to mouse

* can copy clipboard to mouse

* change copy svg to copy icon

* updated css styling

* locked in version number

* removed css state color

* scss updates coloring instead of additonal state

* change colors to scss variables

* changed p tag to span tag

* final style updates

* function to revert copied text
2018-02-25 14:02:03 -06:00
William O'Beirne 1b6143e457 Don't refresh on network change (#1144)
* Configure sagas and components to react to network switch.

* tscheck

* Update tests with new behavior.

* tscheck

* Log out of wallet on network change.

* Fix up test.
2018-02-24 19:32:34 -06:00
Daniel Ternyak a50dc2ebb0
Adjust Wallet Interface (#1154)
* Adjust Base Wallet Interface to not return promises' for getAdderssString; adjust callers to not await

* remove async for saveWalletConfig
2018-02-21 12:23:04 -06:00
William O'Beirne 3c5dd2743e Swap Bity Promo w/ Shapeshift, Adjust Promo Display (#1115) 2018-02-16 14:46:50 -06:00
William O'Beirne cec0d690c7 Hide refresh button and its spinner on initial balance fetch (#1108) 2018-02-16 12:47:28 -06:00
James Prado 23cdff1777 Add Symbols to Equivalent Values (#1038)
* Update styles

* Add fiat symbols

* chore(package): update webpack-dev-middleware to version 2.0.5 (#1036)

* Fix double alert on swap timeout (#1034)

* chore(package): update @types/jest to version 22.1.2 (#1037)

* Update Banners / Versions to Beta (#1040)

* update agreeement banner with beta nomenclature / styling

* update version

* remove v4 text

* adjust language

* more language

* MyEtherWallet => MyCrypto (#1041)

* MyEtherWallet => MyCrypto

Note: Knowledge base links in translations are not working due to the new knowledge base. Some links link to the MyEtherWallet Chrome Extension.

* Update consoleAdvertisement.ts

* Update consoleAdvertisement.ts

* Update en.json

* Update consoleAdvertisement.ts

* Update InsecureWalletWarning.tsx

* Update Footer to Prod Styles (#1044)

* More MEW -> MyCrypto Changes (#1043)

* Replace all language instances of MYCRYPTO LLC

* Fix disclaimer LLC

* Fix console advert link, adjust logo and make it easier to edit.

* Update coinbase URL.

* Fix trezor and ledger component links and text.

* Misc. cleanup.

* Update unlock guide at the end of generate.

* Fix onboarding translation string

* Change salt hash from mew to mycrpyto.

* chore(package): update webpack to version 3.11.0 (#1045)

* Contributor Guidelines (#1054)

* chore(package): update ts-jest to version 22.0.4 (#1053)

* fix(package): update react-markdown to version 3.2.0 (#1055)

* chore(package): update image-webpack-loader to version 4.1.0 (#1049)

* Add selfHidingImg

* Add coin & token images

* Update styles & fix undefined img path

* Update styles

* Align all symbols to left

* Use icon assets

* remove selfhidingimg
2018-02-12 18:15:27 -06:00
HenryNguyen5 01fc5f1a89 Move Nodes/Networks to Redux (#961)
* Start splitting networks into their own reducers

* Split out nodes and networks into their own reducers

* Cleanup file structure

* Make selectors for new state

* Change custom network typing

* re-type repo

* Fix up components to use selectors, work on fixing sagas

* Provide consistency in naming, fix more sagas

* Get non web3 node switching working

* Split config rehydration off into a different file for store

* Inline auth for custom nodes

* Include typing for app state

* moar selectors

* Get web3 working + cleanup sagas

* Cleanup tsc errors

* Use forof loop instead of foreach for clearing pruning custom networks

* Add reducer tests for new redux state

* Export needed variables

* Add console error

* Remove old comment

* Work on saga tests

* Get passing existing saga tests

* Fix more tests

* Remove irrlevant tests

* add console error

* Get rest of tests passing

* Fix merge errors

* Remove random text

* Fix store saving

* Fix selector lib only grabbing from static nodes

* Fix custom node removal crashing app

* Infer selected network via node

* Prune custom networks properly on node removal

* Infer network name from chainid from selecting state

* Cleanup tsc errors

* Remove MEW nodes for main and testnet
2018-02-12 14:43:07 -06:00
William O'Beirne 6be50f74b5 More MEW -> MyCrypto Changes (#1043)
* Replace all language instances of MYCRYPTO LLC

* Fix disclaimer LLC

* Fix console advert link, adjust logo and make it easier to edit.

* Update coinbase URL.

* Fix trezor and ledger component links and text.

* Misc. cleanup.

* Update unlock guide at the end of generate.

* Fix onboarding translation string

* Change salt hash from mew to mycrpyto.
2018-02-10 13:24:05 -06:00
William O'Beirne eaa9ac392c Unify Spinner / Refresh Styles (#1032)
* Unify spinner styles, enforce more SuitCSS style names

* Unify spinner styles, enforce more SuitCSS style names

* Hide refresh offline, adjust colors correctly.
2018-02-08 17:44:30 -06:00
aitrean df4b73721a Refresh balance button (#1027)
* Refresh balance button.

* Refresh balance button.

* Move refresh.svg

* Remove previous svg.

* Map action with saga.

* Fix travis build (on prettify).

* Move refresh button in-line with account balance

* Update styles
2018-02-08 01:22:32 -06:00
Daniel Ternyak e7f88a6a0a
Remove redux-promise-middleware (#1022)
* Use shapeshift for all swaps.

* Replace existing redux-promise-middleware based CCRequest action with saga based action.

* Remove module from package.json, store middleware, webpack_config.

* fix snapshot

* Add return typing

* Add test for saga
2018-02-07 17:59:55 -06:00
William O'Beirne e7633c6d2f MyEtherWallet -> MyCrypto (#977)
* Replace all mentions of MyEtherWallet in translations with MyCrypto

* Replace all translation mentions of kvhnuke/etherwallet repo with MyCryptoHQ/MyCrypto repo.

* Replace all instances of MEW with MyCrypto in translations.

* Replace all instances of myetherwallet.com with mycrypto.com

* First pass of myetherwallet -> mycrypto in codebase.

* Replace most MEWs and mews with MyCrypto or MyC or myc

* Update all assets, clean out unused old assets.

* Adjust v3 url

* Convert all links to help articles to a help link component to make future changes easier.

* Rework onboarding images

* Adjust logo colors due to CMY issue.

* Update donation address, remove mentions of mewtopia.eth

* Update license

* Update sosh meed and referral links.

* Fix more translations strings.

* Tscheck fix.

* Update shapeshift api key.
2018-02-06 22:28:28 -06:00
William O'Beirne d1a2c885a2 Performance Improvements (Pure components, debounced gas slider) (#899)
* PureComponent a ton of non-connected components.

* Debounce gas price slider. Keep gas price in state to reflect changes immediately.

* PureComponent balance sidebar and swap unconnected components.

* Import correct component.

* Move debouncing of gas slider to sagas via gasPriceInputIntent action.

* Remove console log.

* Remove leftover file from merge.
2018-01-29 13:13:46 -06:00
Daniel Ternyak d661f0ff5f
Handle unsupported units in EquivalentValues (#939) 2018-01-29 12:23:39 -06:00
HenryNguyen5 75d1be6961 Minimize re-renders due to gas price changes (#886) 2018-01-22 18:12:03 -06:00
William O'Beirne a58097eeaa Various Browser Quirk Fixes (#881)
* Fix large images in onboarding in safari.

* Fix shapeshift banner centering, adjusted spacing and logo.

* Fix jagged rates.

* Fix small password input on Firefox.

* Remove top and bottom padding on form inputs that would cause cut off text.

* Dont remove top and bottom padding on textareas.

* Prevent flickering from rerender of promos.
2018-01-22 14:44:13 -06:00
James Prado f9c1134a16 Equivalent Values Bugfixes (#870)
Update <EquivalentValues /> component
Now works on non-ethereum networks
Update dropdown with new <Select /> from react-select
Calculates total value for all coins & tokens
2018-01-21 22:21:48 -06:00
Daniel Ternyak ab5fa1a799
Support Non-Ethereum Networks (#849)
* Make UnlockHeader a PureComponent

* MVP

* actually disable wallet format if not determined to be valid format for wallet

* default to correct derivation in mnemonic modal

* cleanup

* fix tslint

* use enums for HD wallet getPath

* Add stricter typing

* Fix labels not updating on selector

* Ban hardware wallet support for custom network unsupported chainIds

* Fix type error

* Fix custom node dPath not being saved

* Fix mnemonic modal

* default path bugfixes

* add react-select

* misc fixes; rabbit holing hard.

* fix tslint

* revert identicon changes

* reload on network change :/

* actually reload on network change

* really really reload on network change

* tslint fixes

* Update styles

* set table width

* fix package versioning

* push broken sagas

* Fix saga test

* fix tslint

* address round of review

* move non-selectors out to utilty; adjust reload timer

* cleanup network util comments

* manage wallet disable at WalletDecrypt instead of in both WalletDecrypt and WalletButton

* Separate WalletDecrypt props into ownProps / StateProps

* disable payment requests on non-eth networks

* specialize connect; separate props

* remove unused state prop

* remove bad import

* create tests for networks

* Clarify Lite-Send error on non-ethereum networkS

* remove string option for network config name

* Create concept of always-on 'EXTRA_PATHS'; include SINGULAR_DTV legacy dPath in 'EXTRA_PATHS'

* fix multiple imports

* address PR comments
2018-01-20 14:06:28 -06:00
James Prado f06d814e24 Rotate promos (#858)
* Rotate promos

* Animate promo rotation

* Update promo rotate funct
2018-01-18 23:40:31 -06:00
James Prado 31e22af904 Remove extra fonts (#790)
* Remove extra font-files

* Add woff font files

* Add woff format for social-media icon font
2018-01-12 11:50:51 -06:00
James Prado 0fa0004e3b Display Address on Hardware Wallets (#772)
* Add 'Display Address' button

* Remove unnecessary css

* Pass full dPath when getting addr

* Add typings for ledger vendor files

* Replace ledger vendor files w/ ledgerco module

* Remove u2f-api file

* Update TrezorConnect api & types

* Add displayAddress method to hardware wallets

* install libusb-1.0 on ci

* Change address, dpath, and index to protected attributes

* Use CommonJS export syntax

* Pin package version

* Prompt user to confirm address on hardware wallet

* Pass full path when getting trezor addr
2018-01-11 20:57:19 -06:00
William O'Beirne 4f6e83acf4 Better Offline UX (#785)
* Check offline status immediately.

* If they start the page offline, show a less severe error message.

* Get rid of offline aware header. Disable wallet options when offline.

* Add online indicator to the header.

* Prevent some components from render, some requests from firing when offline.

* Allow for array of elements with typing.

* Dont show dollars in fee summary when offline.

* Fix up saga tests.

* Fix sidebar component offline styles.

* Remove force offline.

* Dont request rates if offline.

* Nonce in advanced, show even of online.

* Show invalid advanced props.

* Fix up offline poll tests.
2018-01-11 12:04:11 -06:00
Eddie Wang 3a7a0822e2 Hide Equivalent Values on Testnet (#763)
* Hide eqv values when not on testnet

* use isTestnet and variabalize rateExistsOrAll
2018-01-11 11:27:00 -06:00
Jack Clancy 26619e28cc Enforce HTTPS / Prevent Reverse Tabnabbing (#773)
* working version of test custom rule config

* setting no imports to false so tests will pass

* adding anchor blank noopener rule, rule currently off to allow tests to pass

* removing copied code from tslint-microsoft-contrib

* adding tslint-microsoft-contrib to dev deps

* extending tslint for external http rule

* locking tslint-microsoft-contrib version and turning on target blank noopener rule

* final fixes for pull #663

* add noopener noreferrer as needed

* fixing false positives for a tags without href

* really fix linting errors

* fix imports

* remove accidently(?) added LedgerNano duplicate file
2018-01-09 23:17:52 -06:00
William O'Beirne edda9f71ea Improved Gas UX (Pt. 1 - Gas Slider on Send) (#728)
* Initial crack at simple only gas slider component.

* Work on advanced component. Refactor redux and components to specify gas limit vs price.

* Convert fee summary to a render cbesque thing.

* Rework responsive columns.

* Remove force offline button.

* Tweak styles.

* Fix tscheck issues, remove unneeded prop.

* Fix references to GasField

* Gas slider in lite send.

* Make gas slider network-aware for symbol and price calculation.
2018-01-07 10:43:06 -06:00
William O'Beirne bcd85ee3a2 Fix Custom Token Delete (#717) 2018-01-02 21:48:17 -06:00
William O'Beirne b4f2934878 Show warning when no tokens are found after scan (#711)
* Show warning when no tokens are found.

* Rework no tokens message so users can still add customs or scan for new ones.
2018-01-02 21:04:12 -06:00
HenryNguyen5 f39787152e Fix Miscellaneous Types (#635)
* Add repo wide prettier command to prepush

* Make config file explict, remove formatAll to prepush

* Fix react router typings

* Add more typings

* Fix event typings,  fix transition children
2017-12-19 16:46:34 -06:00
HenryNguyen5 08d4ccbdae Productionize Transaction Stack (#456)
* export conditional input and hoc

* Move typings and fields out of send transaction

* Move fields into their own component for decoupled handling, use conditional inputs to simplify disabled components

* Handle hex and non hex strings automatically in BN conversion

* Fix handling of strings and numbers for BN

* add web3 fixes & comments

* Display short balances on deterministic modals

* add more tests, fix rounding

* Add spacer to balance sidebar network name

* Fix tsc error

* Add offline render CB

* Make more render callbacks

* Transform NonceField into its self contained component

* Remove styling from nonce field

* Better network handling in nonce cb

* Move network nonce initialization to componentDidMount

* Remove unessesary conditional input

* Make nonce component return a BN

* Simplify Query render cb

* Add gas query and token query render cbs

* Re-write address field component, strip out ENS name functionality for now

* Add address and data as unit types

* Cleanup Address Field component

* Export gas query

* Re-write gas field component

* Cleanup gas estimation check

* Re-write Data field

* Transaction field skeleton

* Export transaction field actions

* Rename fields to map to ethtx fields

* Make reducers for fields

* Fix reducer module exports

* Export reducer

* Formatting fix

* Type return of GasQuery

* Add transaction field getter / setter component

* Make transaction fields more flexible

* Formatting fix

* Split transaction fields component into two

* Remove erroneous prop

* Fix field naming to follow ethereum transaction fields

* Merge valid prop into componeent

* Change address field to be redux based

* Convert nonce field to redux based

* Make component for passing in current transaction

* Re-write Gas component to use redux state

* Reduxify data field component

* seperate transaction fields redux state into field data and meta data

* Rename SetTransactionFields to be singular

* Make render callback components for getting/setting meta fields

* Add non-zero option prop for token balance render cb

* re-write unit dropdown component to be redux based

* Make ether the first option

* Fix tsc error on tokenquery

* Handle query string default values in unit drop down

* Add thunks to package

* Add helper function for encoding transfer data

* Handle co-dependencies between fields via thunks, seperate value fields into ether and token based

* Fix wrong typing

* Add token metafield as export

* Start scaffolding out amount field component

* Make render cbs for conditional selection of value and balance

* Make render callbacks nullable

* Progress commit -- get dynaming swapping between tokens and ether working

* Get gas estimation working between ether and tokens

* Remove nonce from breaking gas estimation

* Add better validation for amount field

* Add 500ms debounce to gas saga

* Self contain custom message component

* Add web3 awareness to wallet render cb

* Add render cb for checking if  wallet is unlocked

* Cleanup inline typing

* export available params

* Add render cb to render component when a query string exists

* Add boolean callback param that check that the transaction is filled by user

* Remove uneeded typings from send transaction

* Fix misnomer

* Self contain generate transaction button

* Compartmentalize more send transaction components

* Add query string warning, custom message and generate tx button to fields

* Cleanup send tx component with new components

* export render callbacks

* saga transaction scaffolding

* make gas saga fully declarative

* transaction lib renaming

* Seperate gasprice into its own generator

* Make action creators for tx sign actions

* Clean up signing saga, introduce reducer for signing, make HW wallet libs compatible with new tx format, fix some typing with ethereumjs-tx

* Add TransactionComparison component

* Add pushTx

* Progress commit --  Streamline web3 and local signing / broadcasting flows. Need to still implement reducers for broadcasting and notifications

* Get local transaction broadcasting working

* re-write confirmation modal to be redux based

* Fix spacing and import

* Move confirmation modal to be attached to send button, create send button

* Properly handle broadcasting for conf modal

* Handle gas cost > balance for send everything

* Add signing status as its own component (#454)

* Fix ledger errors not showing on notifs

* Make dedicated actions for swapping from tokens to ether and ether to tokens

* Split actionTypes file

* Cleanup comments

* Cleanup comments

* Fix various tsc errors

* Lay down infrastructure for saving configurations per-wallet.

* Add pending and rejected states properly to token values.

* Add custom token form improvements.

* Fix metamask transaction errors

* Fix send entire balance estimation

* Fix add token form from never being enabled.

* Initial pass at account tab with send and view wallet tabs.

* Fix inactive tab.

* Hide private key, toggling

* Progress commit -- Replacing render callbacks with selectors, put  validation logic in sagas

* Moved the restore keystore functionality to view wallet info, and put it in a modal / util file.

* Fix navigation link active

* Force read only wallets to info tab.

* Remove commented code

* Saga-ify send everything

* Scan for new tokens, track saved tokens, only request tracked tokens on initial load.

* Add custom token to current wallets tracked tokens.

* Rework remove token icon.

* Adjust button margin

* Remove the rest of the needless render callbacks for selectors, sagaify nonce

* Bug fix send transaction

* remove unused redux-thunk

* Move fields to general components

* Clean up saga structure

* Refactor broadcast tx

* Implement better validation logic, get contract deploy working

* PR feedback.

* Convert tokenbalances component to connected redux component.

* Addressed feedback from Henry.

* Progress commit -- Implement Interact logic, needs manual testing

* Get rid of commented code

* move exports after declarations

* add tests, rough draft

* Get contract method calls working

* Bugfix contracts

* Cleanup hex prefixing

* Reset transaction state on wallet change

* Get rid of old send transaction component

* Disable sign transaction button when network request is underway

* Flatten send button tree, make nonce human readable in confirmation modal

* Add ghetto cost breakdown component, fix token field validation

* Create Generic SubTab and use in Send

* MVP of mnemonics with sub-tabs in Create Wallet view.

* Do dynamic revalidation

* move exports after declarations

* add forgotten signing tests

* update token spec

* update currentValue spec

* update validationHelpers spec

* Address TODO - use injected history to push navigation state instead of hardcoding window.location

* Use SubTabs in Contracts

* Fix revertPath prop for AcceptOrRedirectModal

* Use subtabs in SignAndVerifyMessage

* Routing for subtabs

* Fix routes, adjust sizing.

* Remove unused import

* Request nonce in base 10

* Add offline override to unit display

* Make cost breakdown less buggy

* Add non standard transaction warning

* Fix amount validity

* Cleanup datafield validity

* Display notif on gas estimation failure

* Add post-signing verification against fields, clean up gas price

* Fix tsc errors

* Code cleanup

* add exports to functions

* add specs for sendEverything and reset sagas

* delete duplicate files

* make tslint happy

* Merge develop

* Fix develop regressions

* Delegate nonce pulling  to wallet being set

* Clarify non standard transaction

* Make address a buffer to avoid leading 0's bug

* Clarify validation helper comment

* Increase debounce time, add console error

* Better validation for non-standard transactions

* Add verification skipping for broadcasting txs

* Fix state and wallet resetting for contract tabs

* Fix some spec files, remove contract.spec

* Remove broadcasting specs from wallet

* Close DeterministicWalletModal on confirm

* Revert "Close DeterministicWalletModal on confirm"

This reverts commit 16c860e854ca29e9de754164d8be5e24f722cbad.

* Reset hardware wallet state on unlocking. Dont render walletdecrypt content when its hidden.

* Fix client side broadcast checking

* Add more state resetters in error scenarios

* Fix gas estimation

* Add validation for value transactions to contract creation

* Add transaction comparaision differentiation depending on wallet type

* Fix token row display balance showing twice

* Properly handle failed transactions

* Handle bad error messages

* fix broken tests

* fix broken test

* Progress commit -- Implement generic subtab types

* Remove react router v3

* Remove unused routes

* Clean up Tabbing code, add onTabChange handler

* Fix tests

* Add nav fix

* revert opinionated sub-tab implementation

* additional reverts

* Add decimal validation

* Make gas price single source of truth, dont save any transaction state other than gas price

* Get rid of old wallet.spec reducer tests

* Add decimal validation when re-validating gasCost

* remove utilities view

* Remove cost breakdown

* Remove local gas estimation warning

* Create getShownTokenBalances selector; use in UnitDropDown and Equivalent Values

* Convert reducers to switch case

* Clean tsc errors

* Fix failing test

* fix tscheck error

* Add number validation to gas field

* Fix misaligned input dropdown

* Revert "Fix misaligned input dropdown"

This reverts commit a40a4c0e8d52471dea01e6727f741a737b798695.

* Set window timeout long enough for node switch to be persisted to state

* Transaction Refactor Style Fixes (#615)

* Fix unit dropdown alignment by rendering it in AmountField, and fixing a missed bootstrap case.

* Fix modal amount and gas text.

* Fix misaligned dropdown

* Update conditions for NavLink is-active class
2017-12-18 15:23:31 -06:00
James Prado d1174fb324 Address Miscellaneous Todos (#534)
* Fix TODO issues

* Update / Removd old comments

* Update types & Fix todos
2017-12-14 16:51:42 -08:00
William O'Beirne 610805aadd Equivalent Values Fixes (#500)
* Initialize with no requested currencies, so that the initial request always fires.

* Adjust tokens with different decimals for equivalent values.

* Reuse libs units function.

* Create lib function and tests for base conversion behavior.
2017-12-11 12:36:22 -08:00
James Prado 0759ccd23f Update Knowledge-Base Links (#533) 2017-12-06 15:04:57 -08:00
William O'Beirne 8f878abab1 Mobile CSS Improvements (#525)
* Banner announcement cuts off mailchimp on mobile

* Hide site version on mobile. Added version to footer as well in case someone _really_ needs to check it.

* Shrink pre-footer font size on mobile.

* Fix column breakpoint for force offline send (Was stacking, now remains side-by-side.)

* Reduce header dropdown sizes at mobile. Force gas dropdown to the left side so its not offscreen.

* Columnify contracts for better mobile behavior and less code.

* Remove leftover string interpolation

* Better mobile header / nav sizing.
2017-12-05 11:51:21 -08:00
William O'Beirne 6cb0ebff5b Fix EquivalentValue crash on invalid tokens (#511) 2017-12-01 14:40:27 -06:00
Eddie Wang 980366694c RPC Error Handling (#384)
* create ensureOkResponse and check against RPC responses

* Merge with develop branch

* added single unit test

* main nodes added

* getBalance method

* remove console.log

* minor conflict fix - readd polyfill to integration test

* added two more method tests

* seperate rpcnode from extended classes

* fixes etherscan

* added all tests

* revert files with only formatting changes

* remove console.logs - still need to update snapshot before tests will pass

* updated snapshot due to RpcNode fixes for Infura and Etherscan nodes

* added RpcNodeTest config so we don't rely on constants in code

* undo formatting changes

* Multiple fixes to error handling tokens.

* Fixed TSC errors

* Minor styling edit - change async func to promise

* changed shape of tokenBalances

* change balance type back to stricter TokenValue type

* remove package.json change and include test for error state.

* minor change removing unneeded line of code

* added longer timeout for api

* update snapshot
2017-11-29 23:35:17 -06:00
William O'Beirne 1510533ec7 Equivalent values for all tokens (ETH + ERC20s) (#420)
* Fetch all token rates at once. Add option for displaying all token values.

* Ensure spinner always shows before equivalent values are ready.

* Fix up test.
2017-11-18 14:15:02 -06:00
William O'Beirne 8bc1a348c7 Equivalent Values for Tokens (#366)
* Add select with tokens.

* Reformat state shape to allow multiple currency rates. Show those rates when selected.

* Add loader
2017-11-14 23:51:09 -06:00
James Prado 151b2d762f display network name if balance loaded (#402) 2017-11-14 23:47:03 -06:00
James Prado 05a9770a9b Fix account balance underline & spacing (#401) 2017-11-14 23:12:10 -06:00
James Prado 0d5d0cea9a Wallet Loading States & Spinner Update (#334)
* 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

* Replace '???' with Spinner & update spinner

* Add loading states for wallet balances

* Update wallet test

* Remove excess data passed to wallet balance reducer & Fix wallet balance types

* Merge 'develop' into 'loading-indicator'

* Add 'light' prop to Spinner

* Only show spinners when fetching data

* Remove format diff

* Apply naming conventions

* Remove network name when offline
2017-11-14 21:44:55 -06:00
HenryNguyen5 8fe664c171 Replace bignumber.js with bn.js (#319)
* Add definition file for bn.js

* Remove types-bn

* make isBN a static property

* progress commit -- swap out bignumber.js for bn.js

* Swap out bignumber for bn in vendor

* Change modn to number return

* Start to strip out units lib for a string manipulation based lib

* Convert codebase to only base units

* Get rid of useless component

* Handle only wei in values

* Use unit conversion in sidebar

* Automatically strip hex prefix, and  handle decimal edge case

* Handle base 16 wei in transactions

* Make a render callback component for dealing with unit conversion

* Switch contracts to use bn.js, and get transaction values from signedTx instead of state

* Get send transaction  working with bn.js

* Remove redundant hex stripping,  return base value of tokens

* Cleanup unit file

* Re-implement toFixed for strings

* Use formatNumber in codebase

* Cleanup code

* Undo package test changes

* Update snapshot and remove console logs

* Use TokenValue / Wei more consistently where applicable

* Add typing to deterministicWallets, fix confirmation modal, make UnitDisplay more flexible

* Clean up prop handling in UnitDisplay

* Change instanceof to typeof check, change boolean of displayBalance

* Fix tsc errors

* Fix token row displaying wrong decimals

* Fix deterministic modal token display

* Handle hex and non hex strings automatically in BN conversion

* Fix handling of strings and numbers for BN

* add web3 fixes & comments

* Display short balances on deterministic modals

* add more tests, fix rounding

* Add spacer to balance sidebar network name

* Fix tsc error
2017-11-12 11:45:52 -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
Daniel Ternyak b493a0c968 Offline Send (#276)
* offline-send mvp

* cleanup unneeded imports

* - create pollOfflineStatus action, action creator, interface

* expand UnlockHeader when collapse-button is clicked, instead of div

* kick-off pollOfflineStatus upon SendTransaction mount.

* Create sagas for polling offline status

* remove comment

* - create CONFIG_FORCE_OFFLINE action, action creator, interface

* Adjust OfflineToggle terms to "Force Online/Offline", and understand when forced offline and when really offline.

* - Assume offline in SendTransaction when either offline or forcedOffline

* - handle forceOffline action in reducer
- adjust state type / provide default state for forceOffline in config reducer

* adjust test to pass with different key name

* fix incorrect import

* - allow size to be specified in offline toggle

* - Decode and display nonce in confirmation modal

* - set default nonces when forced offline and have online connectivity based on transaction count
- pass nonce to generateCompleteTransaction
- refactor componentDidUpdate

* Allow optional nonce to be passed to generateCompleteTransaction

* - create stripHexPrefix function

* - cleanup sagas

* move getParam into helper util

* update address on component update

* - show spinner while transaction is being signed
- reset state when wallet instance changes (new wallet instantiated via UnlockHeader)

* center-align offline message

* Adjust force offline/online button text

* - validate nonces when offline
- only estimate gas when online
- don't show send tx button when offline

* - break generateCompleteTransactionFromRawTransaction into multiple functions.
- support offline generation in generateCompleteTransaction (and generateCompleteTransactionFromRawTransaction). Balance checking is now only done when not offline to support offline generation.

* Create Help component (to be used as a tooltip)

* Disable hardware wallets when offline.

* Hide Send Entire Balance when balance is falsy

* Show help icon in nonce field.

* - show helper instructions on how to broadcast when user is offline after generating a tx
- hardcoded gas limits when offline
- refactors

* create isPositiveInteger helper function

* fix nonce validation

* really fix nonce validation (specifically the input highlighting)

* remove stray // @flow's

* remove offline tab nav

* remove unused action arg

* address PR comments
2017-10-10 22:04:49 -07:00