Commit Graph

399 Commits

Author SHA1 Message Date
Daniel Ternyak c2241dd9df
Tag release 0.1.0 (#831) 2018-01-15 04:02:45 -06:00
James Prado 6108d08693 Improved Gas Estimate UX (#830) 2018-01-15 03:59:59 -06:00
HenryNguyen5 67b2e6491c ENS Resolution for AddressField Component (#807)
* 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

* Initial commit

* Add loading indicator

* Remove some bidding components

* Revert bidding files

* Remove more bidding code

* Remove rest of bidding code

* Fix ENS error message

* Revert value saga changes

* Remove error param from setting 'To' field

* Fix existing ENS test

* Cleanup address resolution, remove dead code

* Remove error messages from unimplemented ENS

* Fix last character being not set bug

* Remove error state from Meta

* Rename isGenesisAddress to isCreationAddress
2018-01-15 03:57:09 -06:00
Eddie Wang eb4fd1cce8 Stricter balance checks during swap (#793)
* check currentBalance before showing Amount Field and GenerateTx button

* add token balance check

* check wallet balance

* comments

* simplify wallet balance check
2018-01-15 00:51:35 -06:00
Daniel Ternyak b8b0cdece3
Change network without window refresh (#825)
* remove RSK as support network

* completely remove RSK

* change network without window refresh

* fix saga tests

* fix import
2018-01-15 00:27:26 -06:00
Daniel Ternyak a2eb2021cd
Remove non-Ethereum networks (#813)
* remove RSK as support network

* completely remove RSK

* remove UBIQ; EXP

* remove ETC
2018-01-15 00:21:42 -06:00
Eddie Wang 9ee764be2e Handle Shapeshift Error Messages (#811)
* Add error message if exists in shapeshift

* console error if shapeshiftOrderCreateFailed and bityOrderCreateFailed

* check e before checking e.message

* Handle preflight rejections. Put failure on any error.
2018-01-15 00:09:38 -06:00
Daniel Ternyak fa8fbe531f
Replace <Aux> with React Fragements (#816)
* replace <Aux> with React Fragements

* Remove Aux imports
2018-01-14 20:07:02 -06:00
William O'Beirne dfb93c16ab Onboarding Style Improvements (#805)
* Increases Modal's width to better fit in the content.
* Restore the image side behavior so that images are sometimes on the left, not always on the right
* Allows modal to dynamically size its height.
    * This reduces some awkward whitespace, and makes it so you can't just jam on the "Next" button since it moves a bit, should slow some people down to at least catch the headlines.
* Restore the alert style on the opening modal
* Provide a mobile-friendly progress stepper.
    * This module's markup kind of sucks, so the restyling code is heinous. Sorry.
* Scrolls the user to the top after hitting "Next" or "Previous"
    * On mobile, you would stay scrolled at the bottom. Much nicer feeling now.
* Tons of text and content spacing / color / size adjustments.
2018-01-13 02:26:08 -06:00
Daniel Ternyak 75871abf5c
Remove Digital Bitbox from account view (#804)
* remove unsupported digital bitbox from account view

* Fix sizing.
2018-01-13 01:50:37 -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
Olajide Ogundipe Jr 303e44abb3 Onboarding Modal (#611)
* [WIP] Start port of V3 Modal

* allow lambda functions in React Components

* lint code

* add null case for modalRef

* fix action test

* reduce onboard slide boilerplate

* delete images and componentize OnboardSlide

* comment out info onboarding message

* fix merge conflict

* fix prettier error

* revert tslint file

* fix type in modal

* add translations to onboard modal

* add in images, fix stlyes
2018-01-11 12:13:14 -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
Eddie Wang f4b8364abc Stop Timer when Swap Order is Received (#791) 2018-01-11 01:08:36 -06:00
Eddie Wang db4dc516e2 Clear transaction data on transaction resign (#788) 2018-01-11 01:07:38 -06:00
William O'Beirne 418b186642 Resolve custom token conflicts (#767)
* Remove custom token if it conflicts with symbol or address.

* Refactor deduping to utils function. Add unit tests for said function.

* Fix tscheck
2018-01-11 00:50:31 -06:00
William O'Beirne 7d2c3e1990 Unit tests for token & contract JSON (#768) 2018-01-11 00:47:48 -06:00
aitrean af2e0b69e1 Web Worker Decrypt (#680)
1. Attempt an empty password every time a keystore is uploaded.
2. Delegate scrypt decryption (ie ethereumjs-wallet.fromV3) to its own web worker and interface with it through an async typescript function that gets handled in the wallet saga. This keeps the UI unblocked when scrypt takes a long time to decrypt.
3. Add logic to show a spinner x number of milliseconds after file upload so the user will understand when a wallet is being decrypted.
2018-01-11 00:44:13 -06:00
William O'Beirne fb0cce1d68 Rename Aux to AuxComponent for Windows (#771)
* Rename reseved filename 'Aux' to 'AuxComponent'

* fix prettier
2018-01-09 23:29:24 -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 6e2b74c79a Use network unit everywhere, fix network redux state (#765)
* Use network unit in confirmation modal. Make sure network is set at init.

* Fix token display

* Ensure that when the node changes, the network also changes. Show network unit in unit dropdown.

* Type saga, fix tests.
2018-01-09 14:13:14 -06:00
Daniel Ternyak d5ece361aa
Revert "Implement `offline-plugin` for Service Workers / App Cache (#701)" (#760)
This reverts commit ef506c54d6.
2018-01-08 23:04:20 -06:00
Daniel Ternyak 401a57dc0d
Tag Release 0.0.8 (#758) 2018-01-08 22:13:09 -06:00
Eddie Wang aef80e9bd4 Add Default Tokens (#753) 2018-01-08 20:59:32 -06:00
Daniel Ternyak ff6747b1b1
Tag Release 0.0.7 (#746) 2018-01-08 01:19:27 -06:00
William O'Beirne 6ec04f6731 Fix ENS Address Field (#724)
* Fixed borked tag.

* Fix saga tests.

* fix tscheck error
2018-01-08 01:12:16 -06:00
William O'Beirne 62381427e4 Slider prop error fix (#743)
* Cast to float.

* Force gas price and limit inputs to be numbers.
2018-01-07 23:30:56 -06:00
Daniel Ternyak 92d8ecf353
Web3 Improvements (#740)
* increase timeout for web3 auto-login; don't attempt login when web3 is unavailable

* only auto-login when metamask available

* combine multiple imports
2018-01-07 19:21:11 -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 498aeec92c Fix Logout Prompt (#725) 2018-01-04 10:31:22 -06:00
William O'Beirne 18695d0936 Fix Trezor signing + stronger typing (#723) 2018-01-04 10:07:10 -06:00
William O'Beirne bcd85ee3a2 Fix Custom Token Delete (#717) 2018-01-02 21:48:17 -06:00
Danny Skubak b939e8ceda Request Payment SubTab - EIP 681 (#671)
* progress

* Normalize bity api response

* Filter api response

* Track swap information in component state

* Update dropdown onchange

* remove dead code

* Update Min Max Validation

* Update minmax err msg && fix onChangeOriginKind

* Add origin & destination to redux state

* Update types & Update tests

* Update types

* Update swap.spec.ts test

* Remove commented out code

* Remove hardcoded coin array

* Create types.ts for swap reducer

* Update swapinput type

* Update bityRates in localStorage & Replace all instances of ...Kind / ...Amount props

* Add shapeshift banner

* initial work for sagas

* Update Types

* Update swap reducer initial state

* Update Types & Store empty obj for bityRates / options

* Update more types

* added shapeshift file and rates comments

* action reducers and prop mapping to components

* add typings and swap icon

* more actions reducers and sagas

* debugging shapeshift service

* add Headers

* Fix content type

* add order reset saga and ui fixes

* remove console log and swap b/w Bity and Shapeshift

* working state for Shapeshift and Bity - tested with mainnet

* add icon component

* UI improvements and fix select bug

* fix timer bug

* add bity fallback options and toFixed floats

* tslint errors

* add arrow to dropdown and add support footer

* Add service provider

* fix minor $ bug and stop timer on order complete

* better load UX and dropdown UX

* fixed single test

* currRate prop bugs and reduce LS bloat

* takeEvery on timer saga and don't clear state.options to restartSwap reducer

* export tx sagas and fix minor type

* Add ShapeShift Rates functionality when selecting a ShapeShift pair.

* type fixes

* BugFix: Don't change displayed ShapeShift Rate Inputs on every dropdown change
Also contains some caching / performance improvements

* BugFix: Don't remote rate inputs when falsy amount

* fix type error

* Progress commit

* Implement saga logic

* Make address field factory component

* Shorten debounce time

* Make new actions / sagas  for handling single token lookup

* Implement working version of litesend

* make unit dropdown searchable, add props for all tokens, custom validation

* add string generators for EIP 681 token & ether transactions

* add new selectors

* add request payment tab

* Change saga into selector

* Add failing spec

* fix broken test

* add debounce to error message

* fix tests

* update snapshots

* test coverage

* move setState disabled property from debounce so we instantly can go to next step on valid amounts

* reset amount value (useful for switching between tabs)

* much deeper test coverage, fix debounce ux, and fix bity flashing at swap page load

* fix minor failing test

* seperate shapeshift erc20 token whitelist

* fix saveState store bug

* break orderTimeRemaining saga up and rewrite tests

* fix tslint error

* add isReadOnly prop to address field

* use AddressField component, add additional validation

* make prop optional

* correct validation

* allow for request tab to be used with view only wallet

* account for undefined activeTab

* add types
2018-01-02 21:18:10 -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
Eddie Wang 88532cdc3c Shapeshift Integration (#564)
* progress

* Normalize bity api response

* Filter api response

* Track swap information in component state

* Update dropdown onchange

* remove dead code

* Update Min Max Validation

* Update minmax err msg && fix onChangeOriginKind

* Add origin & destination to redux state

* Update types & Update tests

* Update types

* Update swap.spec.ts test

* Remove commented out code

* Remove hardcoded coin array

* Create types.ts for swap reducer

* Update swapinput type

* Update bityRates in localStorage & Replace all instances of ...Kind / ...Amount props

* Add shapeshift banner

* initial work for sagas

* Update Types

* Update swap reducer initial state

* Update Types & Store empty obj for bityRates / options

* Update more types

* added shapeshift file and rates comments

* action reducers and prop mapping to components

* add typings and swap icon

* more actions reducers and sagas

* debugging shapeshift service

* add Headers

* Fix content type

* add order reset saga and ui fixes

* remove console log and swap b/w Bity and Shapeshift

* working state for Shapeshift and Bity - tested with mainnet

* add icon component

* UI improvements and fix select bug

* fix timer bug

* add bity fallback options and toFixed floats

* tslint errors

* add arrow to dropdown and add support footer

* Add service provider

* fix minor $ bug and stop timer on order complete

* better load UX and dropdown UX

* fixed single test

* currRate prop bugs and reduce LS bloat

* takeEvery on timer saga and don't clear state.options to restartSwap reducer

* export tx sagas and fix minor type

* Add ShapeShift Rates functionality when selecting a ShapeShift pair.

* type fixes

* BugFix: Don't change displayed ShapeShift Rate Inputs on every dropdown change
Also contains some caching / performance improvements

* BugFix: Don't remote rate inputs when falsy amount

* fix type error

* Progress commit

* Implement saga logic

* Make address field factory component

* Shorten debounce time

* Make new actions / sagas  for handling single token lookup

* Implement working version of litesend

* Change saga into selector

* Add failing spec

* fix broken test

* add debounce to error message

* fix tests

* update snapshots

* test coverage

* move setState disabled property from debounce so we instantly can go to next step on valid amounts

* much deeper test coverage, fix debounce ux, and fix bity flashing at swap page load

* fix minor failing test

* seperate shapeshift erc20 token whitelist

* fix saveState store bug

* break orderTimeRemaining saga up and rewrite tests

* add new swap icon

* remove unused allowReadOnly prop

* change offlineaware to walletdecrypt for litesend

* fix LiteSend changewallet bug

* fix error message UX

* fix button styling to match develop

* fix liteSend test

* Fix LiteSend UX on unavl tokens, dropdown null value, and don't show decrypt in litesend after successful wallet decrypt.

* add litesend network check
2018-01-02 12:04:50 -06:00
William O'Beirne 2f98555b00 Fix deterministic modal token values (#708)
* Fix borked deterministic wallet saga for token values.

* Fix test.
2018-01-02 11:49:18 -06:00
William O'Beirne d1b8f4b65a Ledger warning (#709)
* Ledger HTTPS warning.

* Missed colon.
2018-01-02 00:45:21 -06:00
Eddie Wang 3733adfd84 Add "404" Page (#705)
* add error page

* address PR comments
2018-01-01 18:37:41 -06:00
William O'Beirne ef506c54d6 Implement `offline-plugin` for Service Workers / App Cache (#701) 2018-01-01 17:15:13 -06:00
James Prado 8452e231d8 Fix Help Nav isActive Condition (#694)
* Update tab isActive Condition

Add condition to fix help tab appearing as active at `localhost:3000/`

* Shorten long variables

* Type nav tab links, clarify conditions.
2018-01-01 14:43:27 -06:00
William O'Beirne 371e6e327c Wallet Decrypt Redesign (#677)
* Reorganize files to better match other components.

* Initial UI for wallet buttons.

* Fix leftover rebase conflict.

* Wallet selection, styling, mobile handling.

* Initial work on animations.

* Adjusted animations.

* Adjust wallet unlock forms to be more uniform. Fix view address saying 'unlock'

* Adjust tooltips.

* Fix embedded decrypt components.

* Cover whole sign msg form with decrypt.

* Give deploy contract a better unlock treatment like sign msg.

* Reset decrypt component on hide / show

* Unused var

* Fix tooltip hover.

* Fix hover lift.

* Make spacing better on mobile.

* Back button mobile handling.

* Redesign mobile button icons. Prevent clicking through when clicking on icons.

* TSCheck fixes.

* Attempt to unlock MetaMask onClick, and provide existing flow with notification when unlock fails.

* Get rid of outline.

* Remove decrypt min height. Make view only textarea.

* Add change wallet buttons to deploy contract and sign msg.

* Standardize
2018-01-01 13:46:28 -06:00
William O'Beirne 0710f22291 Fix custom node form (#699) 2017-12-31 21:14:14 -06:00
William O'Beirne 349bf5bba5 Fix Notification Close (#700) 2017-12-31 21:13:54 -06:00
James Prado ec37eeffe8 Hardware Wallet Unlock - Loading Indicator (#675)
* Direct user to correct app on timeout

* Add spinner while decrypting hardware wallets

* Hide tip on connect

* Remove unnecessary trezor tips

* Remove showTip property from component state
2017-12-31 21:07:37 -06:00
HenryNguyen5 616928c085 Webpack Upgrade (#665)
* Update TODO comments & Remove old TODO comments

* Fix undefined bityRate pair

* Fix any props in TODO

* Add HashRouter

* Update publicPath

* Revert "Update publicPath"

This reverts commit 1ab9068df4d570cf50bc4f2fcd97bd775e9aa768.

* Use HashRouter only if site is downloaded

* Update conditions for router

* Update asset paths & Change publicPath in production

* Remove hoist-non-react-statistics

* Revert "Remove hoist-non-react-statistics"

This reverts commit abc017a3f3ca1a00bebdd9201f0d18770581d8c5.

* Add hoist-non-react-statics as dev depencency

* Initial tests

* Lock hoist-non-react-statics version

* Add webpack-include-assets & favicon-webpack plugins

* Add env var BUILD_DOWNLOADABLE

* Remove dll from prod build

* Speed up rebuild times

* Change var to const

* lodash tree-shacking finagling

* Make app aware of its serving location

* Fix failing test

* Remove downloadable plugin

* Merge hash-router and get build working

* Add missing package.

* Make app aware of its serving location

* Revert "Make app aware of its serving location"

This reverts commit 8dae3b399e0392272cde25d45443391f6fb6594e.

* Revert "Remove downloadable plugin"

* Move AutoDLLPlugin to be in dev only

* Remove require HtmlWebpackIncludeAssetsPlugin

* Remove extra file added

* Bring config up to date with webpack 2 rules, add multi threading and proper cache busting

* Fix favicons package from freezing build process

* Make exclude rules more simple

* update freezer webpack config

* Move webpack multithreading to full source map dev builds only

* update freezer webpack config (#687)

* Add HtmlWebpackIncludeAssetsPlugin
2017-12-30 14:29:04 -06:00
James Prado 78e3bcd7c1 Add HashRouter for downloadable version (#651)
* Update TODO comments & Remove old TODO comments

* Fix undefined bityRate pair

* Add HashRouter

* Update publicPath

* Use HashRouter only if site is downloaded

* Update conditions for router

* Update asset paths & Change publicPath in production

* Remove hoist-non-react-statistics

* Add hoist-non-react-statics as dev depencency

* Lock hoist-non-react-statics version

* Add webpack-include-assets & favicon-webpack plugins

* Add env var BUILD_DOWNLOADABLE

* Make app aware of its serving location

* Remove downloadable plugin
2017-12-30 10:22:28 -06:00
aitrean 97c32800e5 Check for appropriate keystore file type on upload (#646)
* Check for appropriate keystore file type on upload.

* Pass props to component.

* Add typing for rawFile
2017-12-28 23:11:07 -06:00
William O'Beirne 6513acd03d Generate Mnemonic Wallet (#659)
* Initial work at splitting out generate into two flows.

* Finish mnemonic flow.

* Convert keystore to state-based component. Remove all redux generate stuff. Remove generate help section. Fix styles.

* Add back button, switch to routing instead of state for generate pages.

* PR feedback.

* Alertify warning at generate. Linkify alternatives. Fix some alert link styles.
2017-12-28 13:54:07 -06:00