Commit Graph

239 Commits

Author SHA1 Message Date
James Prado aabcd3f7a3 Use Network Symbol in Confirmation Modal (#1039)
* Set default unit to 'ETH' instead of 'ether'

* Use 'isEtherUnit()' everywhere

* Set default unit to empty string

* Update isEthUnit to isNetworkUnit

* Fix unit conversion for non-ethereum networks

* Set default network unit properly

* Fix tests

* fix typos

* Update isNetworkUnit selector

* Update isNetworkUnit

* Fix validationhelpers tests

* Add mock state to tests & Move isNetworkUnit to selectors

* Fix validation helper spec

* fix unit swap spec
2018-03-01 19:24:14 -06:00
Daniel Ternyak 162713ac6d
Logo updates (#1216)
* Update image brand color, remove unused images.

* Update brand color.
2018-03-01 13:49:07 -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
William O'Beirne a430fe650c Update copy / links for Beta (#1193)
* AlphaAgreement -> BetaAgreement.

* Banner color.

* Remove language disclaimer.

* Discord link in footer.

* Update font for discord icon.

* Adjust copy.

* Link to github repo in error message.

* Remove always error
2018-02-27 15:35:32 -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
William O'Beirne b48617e95e Simplify custom node URL (#1141)
* Simplify custom nodes to just be a URL, not a url + port.

* Allow modals to specify max width (#1142)
2018-02-24 12:02:07 -06:00
William O'Beirne c76d0b3fa5 Handle Gas / Estimates on a Per Network Basis (#1160)
* Give each network the ability to specify default estimates, and whether or not they should fetch estimates from API. Convert gas slider to always use estimates.

* Fix gas cache invalidation, invalid too high / low logic.

* Fix up tests.

* tscheck
2018-02-24 12:00:00 -06:00
James Prado 48536f79be Align footer to bottom (#1150) 2018-02-24 11:57:54 -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
Daniel Ternyak 39fba57831
Patch Web3 boolean logic (#1131) 2018-02-17 18:48:31 -06:00
Pete Jihoon Kim 2f23aa96de Fix compatibility with unknown Web 3 providers (#1128)
* Fix compatibility with unknown Web3 providers

* Detect Cipher Browser

* Fix incorrect translation label
2018-02-17 18:25:01 -06:00
William O'Beirne 41c5c32d51 Fix Modals on Mobile (#1110) 2018-02-17 15:57:15 -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 c5f32a9ce2 Re-set address state when wallet changes (#1107) 2018-02-16 14:34:58 -06:00
William O'Beirne 31912c0f83 Gas Price Estimates API (#1050)
* Setup api / reducers / actions for gas.

* Implement gas price saga, fetch from component, and loading states. Blocked on CORS.

* Implement caching mechanism.

* Add tests for gas saga and reducer.

* More testing.

* Indicate that gas price is recommended when fetched from API.

* Hide track while loading.

* Fix tscheck.

* Check gas estimate before assuming its ok.

* Check for correct logical order of gas prices.

* Tscheck fixes.
2018-02-16 13:01:39 -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
William O'Beirne b574c209a6 Add missing keys on insecure wallet checkboxes. (#1112) 2018-02-16 12:39:05 -06:00
William O'Beirne be61d804e0 Check Transaction page (Pt. 1 - The Basics) (#1099)
* Component layer and routing for transaction status.

* Initial start on redux for transactions.

* Initial crack at reducer / actions / saga for transactions.

* Finish off check transaction saga, reducer, component, and page.
2018-02-16 10:57:23 -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 408c0011ca Update Footer to Prod Styles (#1044) 2018-02-10 12:56:05 -06:00
Michael H bcdc0f546d 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
2018-02-09 15:41:44 -06:00
Daniel Ternyak 273b77b390
Update Banners / Versions to Beta (#1040)
* update agreeement banner with beta nomenclature / styling

* update version

* remove v4 text

* adjust language

* more language
2018-02-09 15:29:28 -06:00
aitrean 626afe554a Forward query arguments during redirect (#990)
* Transfer query arguments over with routing.

* Create a Query Redirect wrapper.

* Add RedirectWithQuery component to SendTransaction index redirect.

* Correct hash-query ordering.
2018-02-08 22:02:56 -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
James Prado 0ab226ca16 Add nonce loading indicator & refresh button (#1021)
* Add InlineSpinner component

* Add 'what-input' module

* Add input style overrides

* Add new refresh icon

* Update footer styles

* Add nonce refresh button & loading indicator

* Center InlineSpinner

* Add types

* Lock version

* prettify package.json

* prettify package.json
2018-02-08 11:51:15 -06:00
William O'Beirne 7ac546acaf ENS Search Styling (#1018)
* Restyled, recopied, and did some component refactoring for ENS.

* Awkward copy fix.

* Update snapshot.

* Overflow table handling.

* Re-enable on error.
2018-02-08 11:30:29 -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 82cd123632 Update Header & Footer (#1020)
* Adjust header styles.

* Update footer.

* tscheck

* Convert header to jpg for mad file size savings.
2018-02-07 17:22:31 -06:00
James Prado 0da409cd12 Confirm TX Modal Upgrades (#928)
* Wipe tx modal clean & Update the subcomponents

* Add Amounts & Address styles

* Forgot to pass onlyIncludeLoader to GasLimitLoading component

* Add currency conversion

* Update styles

* Change SENDModal_Yes & _No messages

* Add visual summary

* Update fonts & add Roboto Mono

* Add details to tx-modal

* Display contract addr when sending tokens

* Add inline styles back to identicon (for paper wallet)

* Remove inline styles

* Update USD conversion conditions

* Display token to usd conversion

* Update styles

* Update modal styles

* Animate modals

* Add a fade effect when modal overflows

* Improve styles for mobile

* Remove dead code

* Update unlockHeader close button

* Update text overflow fade styles

* Fix invalid inline css prop

* Fix issue with 'isToken' condition

* Add table layout & update styles

* Remove unsupported styles

* Remove formatting diff

* update styles

* Update tx modal fixes (#999)

* chore(package): update @types/lodash to version 4.14.101 (#992)

* ENS Resolving (#942)

* Refactor BaseNode to be an interface INode

* Initial contract commit

* Remove redundant fallback ABI function

* First working iteration of Contract generator to be used in ENS branch

* Hide abi to clean up logging output

* Strip 0x prefix from output decode

* Handle unnamed output params

* Implement ability to supply output mappings to ABI functions

* Fix null case in outputMapping

* Add flow typing

* Add .call method to functions

* Partial commit for type refactor

* Temp contract type fix -- waiting for NPM modularization

* Remove empty files

* Cleanup contract

* Add call request to node interface

* Fix output mapping types

* Revert destructuring overboard

* Add sendCallRequest to rpcNode class and add typing

* Use enum for selecting ABI methods

* Add transaction capability to contracts

* Cleanup privaite/public members

* Remove broadcasting step from a contract transaction

* Cleanup uneeded types

* Refactor ens-base to typescript and add typings for ENS smart contracts

* Migrate ens-name-search to TS

* Add IResolveDomainRequest

* Fix rest of TSC errors

* Add definition file for bn.js

* Remove types-bn

* Fix some typings

* 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

* Split different ENS modes into their own components

* Fix Abi typedef

* Remove redundant moment type package

* Add Aux helper component

* Split out resolve components

* Make 'to' parameter optional

* Change import type

* Change typing to be base domain request

* Split handling of resolving into object handler

* Fix countdown component

* Adjust element spacing

* Implement reveal search functionality

* Add unit display for highest bidder

* Fill out forbidden/NYA modes

* ENS wallet component skeleton

* Clean up prop handling in UnitDisplay

* Change instanceof to typeof check, change boolean of displayBalance

* Add ENS wallet component

* Cleanup spacing

* Convert ConfModal for bidding in ENS

* Make ui component for placing bids

* Fix destructure in placeBid

* Pass through entire wallet

* Remove text center

* Display inline notification ENS isValid & add some ENS tests

* Add export of Aux

* Reformat with prettier

* progress...

* Add ENSUnlockLayout

* Add RevealBid component

* organize NameResolve components

* Merge ENS with transaction-refactor changes

* Fix address resolution

* Update styles

* convert ens name to lowercase before checking

* Add overflow-y:scroll to table

* update ens snapshots & tests

* cast 'undefined' state argument as any for testing

* clean up components

* Connect unitconverter to redux state

* remove unnecessary type assertion

* fix spinner size

* remove old bidmodal

* validate bidmask before opening modal

* progress...

* Update styles

* Add saga / actions for placing a bid

* Update types & clean up dead code

* Delete old test

* Dispatch PlaceBidRequested acitons

* Progress commit -- get ENS bidding ready for tx generation via sagas

* Seperate ENS action creators and types

* Add reducer & actions for ENS fields

* Add preliminary sagas for bid mask and bid value

* Fix ts errors

* Get bidding fields connected with some validation

* Clean up generate bid

* Hook up generate bid to redux state

* Get bid data generation working

* Add support for bidding on already open auctions

* Move bid generation states to redux, improve default field values

* Remove generate bid component

* Throttle bid generation

* Progress commit -- Bid Modal

* Hook bidmodal component up to bidding component

* Update template modal to handle custom confirm behavior

* Remove old redux bidding actions, add new one for downloaded bids

* Save downloaded bids to local storage

* Finish bidding modal

* Fix gas estimation bug

* Fix typing

* Remove bidding related functionality

* Get passing unit tests

* Make previous test more comprehensive

* Fix ts errors

* Remove commented code

* Fix invalid return

* Remove implementation of revealing bid

* Update snapshot

* Fix tests

* Delegate bidding to V3

* Update react-markdown to the latest version 🚀 (#986)

* fix(package): update react-markdown to version 3.1.5

* Fix tsc errors, match original behaviour of V2 as closely as possible

* Add tooltip to gas slider (#997)

* Prevent invalid gas price states (#996)

* Slider using value instead of raw to prevent errors. Dont show empty gas price as invalid. Clamp slider values to min / max on mount.

* Remove gas price from local storage.

* Update @types/react to the latest version 🚀 (#912)

* chore(package): update @types/react to version 16.0.35

* Add stricter typing via function overloads

* Fix rest of aria translations

* Make implementation of confirmation modal template

* Address github comments for #928

* Make modal state setting more explicit

* Fix infinite loop of state setting on modal

* Fix transaction rebroadcasting for modal display
2018-02-06 22:39:24 -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
James Prado 5272bdacd5 Update <Markdown/> allowedTypes (#1004) 2018-02-06 13:54:02 -06:00
William O'Beirne 39da226cd1 Prevent invalid gas price states (#996)
* Slider using value instead of raw to prevent errors. Dont show empty gas price as invalid. Clamp slider values to min / max on mount.

* Remove gas price from local storage.
2018-02-05 17:14:23 -06:00
William O'Beirne 942eb6b341 Add tooltip to gas slider (#997) 2018-02-05 17:03:00 -06:00
greenkeeper[bot] 057a1095d3 Update react-markdown to the latest version 🚀 (#986)
* fix(package): update react-markdown to version 3.1.5

* Fix tsc errors, match original behaviour of V2 as closely as possible
2018-02-05 16:41:33 -06:00
William O'Beirne 174dea8a29 MEW-01-004 - Stronger Keystores (#981)
* Add better password checking, confirm password, feedback, and up the minimum to 12.

* Move wallet generation off to a web worker, and bump up the n value to 8192. Refactor workers a wee bit.

* tscheck cleanup

* Make keystore password a form. Replace text with spinner on load.

* Center align again.

* Hard code n factor of test wallet, fix some misspelled type definitions for IV3Wallet.
2018-02-02 00:01:30 -06:00
William O'Beirne ecccdcfc33 MEW-01-005 Web - Remove all HTTP links (#978)
* Replace custom linter rule with no-http-string rule. Fix exceptions.

* Replaced all http links in translations with https links.
2018-02-01 16:51:14 -06:00
Daniel Ternyak 84bae60c02
Refactor Generate Transaction (#960)
* Make generic modal

* Allow generic modals to be injected into send button component

* Refactor generate transaction, cleanup transaction sagas, simplify signing process

* Get passing unit tests

* Make previous test more comprehensive

* Fix ts errors
2018-01-29 16:58:07 -06:00
HenryNguyen5 c84740c4d4 Generic Confirmation Modal (#940)
* Make generic modal

* Allow generic modals to be injected into send button component
2018-01-29 15:38:28 -06:00
William O'Beirne 9fd00a4f70 MEW-01-011: remove dangerouslySetInnerHTML / Add Lint Rule (#955) 2018-01-29 14:51:02 -06:00
William O'Beirne 9ee30b957d Address messages, warnings and gas limits (#930)
* Move address messages to config folder, add some other messages for common pitfalls.

* Fix checksum vs lowercase issues.

* Use gas limit if an address message specified one. Allow messages to have a custom severity. Add a function for getting message to reduce complexity.

* Handle address message gas limit on all actions, make separate saga fn.

* Apparently I used the wrong takeEvery?
2018-01-29 14:00:43 -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
William O'Beirne 7fe2888633 Passwordify Private Key & Mnemonic Inputs (#925)
* Create reusable password toggle component, convert private key and mnemonic to it.

* Convert keystore modal to togglable password.

* Remove the restore keystore tab code (defunct).

* Replace wallet info with togglable password. Allow for controlled togglable password.

* Convert last password component (generate) and cleanup unneeded files and styles.
2018-01-26 16:11:52 -06:00
William O'Beirne 2309d05c06 Disable more wallets conditionally + explain why (#924)
* Add more wallet disables, move all into selector.

* Add reasons for disabled wallets.

* Disable read only in lite send.

* Fix view address showing insecure icon.
2018-01-26 14:08:39 -06:00