Commit Graph

184 Commits

Author SHA1 Message Date
HenryNguyen5 481e6e89b6 Refactor Wallet Base Class to Wallet Interface and Implement (#184) 2017-09-11 19:26:16 -05:00
William O'Beirne 8854d42fd9 Sidebar refactor / style update (#173)
* Convert bootstrap to sass instead of checked in and less

* Darken body, adjust header.

* First pass at tab styles, each tab will need a lot of individual love tho.

* Update footer to main site content, improve responsiveness.

* Missing key added.

* Fix dropdowns.

* Convert GenerateWallet HTML over, still needs styling.

* Send form.

* Current rates styled.

* CurrencySwap form styles.

* SwapInfoHeader styled.

* Finish up swap restyling, minor usability improvements for mobile.

* Fix up notifications / alert customizations

* Import v3 variables.

* Fix notification spacing.

* Align input height base with buttons.

* Revert height base, add additional bootstrap overrides.

* Grid overrides.

* Move overrides to their own folder. Adjust naming.

* Fix inconsistencies.

* Style generate wallet pt 1.

* Style generate wallet pt 2

* Style generate wallet pt 3

* Fix swap

* Added some missing overries, fixed the fallout.

* Remove header text, indicate alpha version.

* Fix radio / checkbox weights.

* Bind => arrow

* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.

* Fix token balances buttons, footr icons.

* Break out files, style up account info.

* Style up token balances.

* Equivalent values styling.

* Sidebar promos.

* Fix up delete button and add custom form.

* Even spacing.

* Unlog

* Convert Big types to Ether types

* Fix test to expect Ether instead of Big
2017-09-08 14:26:51 -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
Daniel Ternyak d654b60949 Fix Send Regressions (#170) 2017-09-07 15:14:52 -05:00
Daniel Ternyak e3d3b2c8e8 Refactor Send (#164)
* refactor SendTransaction component and transaction helper lib

* move transaction generation out of component; refactor tx types and simply tx generation

* remove commented out try/catch

* address todo; rename function/types

* fix imports and address comments
2017-09-05 16:28:19 -05:00
Daniel Ternyak 0989424d73 Refactor Bity (#166)
* Refactor bity config

* fix bug in refactor that would cause destinationKind amount to not load

* use function instead of string replace for building blockexplorers per PR comment
2017-09-05 15:07:28 -05:00
William O'Beirne de7d4fbaa2 v3 Style Import (#151)
* Convert bootstrap to sass instead of checked in and less

* Darken body, adjust header.

* First pass at tab styles, each tab will need a lot of individual love tho.

* Update footer to main site content, improve responsiveness.

* Missing key added.

* Fix dropdowns.

* Convert GenerateWallet HTML over, still needs styling.

* Send form.

* Current rates styled.

* CurrencySwap form styles.

* SwapInfoHeader styled.

* Finish up swap restyling, minor usability improvements for mobile.

* Fix up notifications / alert customizations

* Import v3 variables.

* Fix notification spacing.

* Align input height base with buttons.

* Revert height base, add additional bootstrap overrides.

* Grid overrides.

* Move overrides to their own folder. Adjust naming.

* Fix inconsistencies.

* Style generate wallet pt 1.

* Style generate wallet pt 2

* Style generate wallet pt 3

* Fix swap

* Added some missing overries, fixed the fallout.

* Remove header text, indicate alpha version.

* Fix radio / checkbox weights.

* Bind => arrow

* Convert simpledropdown to proper form select, instead of weirdly implemented nonfuncitoning dropdown.

* Fix token balances buttons, footr icons.
2017-09-05 14:52:01 -05:00
HenryNguyen5 d05525e682 ENS - Tab + General Infomation Panel (#147) 2017-09-03 19:04:27 -05:00
Daniel Ternyak c2c9f39c6b Fix "no bignumber" Error (#155)
* provide link to mailchimp based subscription

* only estimate gas when the amount value is a number
2017-08-31 17:01:34 -07:00
Daniel Ternyak efee709d0f Swap Part 5 (#150)
* refactor notificationMessage

* MVP Bitcoin QR

* refactor currentrates and add loading state

* fix text space

* translate hardcoded text

* only show QR code when attempting to swap Bitcoin as the origin kind

* remove commented import

* add flow typings

* Don't show a notification of a stringified element
2017-08-31 08:56:49 -07:00
Daniel Ternyak a4ec6f6139 Finalize send (broadcast signedTx, loading indicators, error handling, form validation) (#141)
* hide buttons during send loading state

* fix transaction succeeded not clickable; provide error in action

* move BroadcastStatusTransaction into 'libs/transaction'

* use more succint Array.prototype.find

* rename resetState -> resetTransaction

* refactor and component componentDidUpdate logic

* rename disabled -> generateDisabled; comment componentDidUpdate

* add size to Spinner, use in ConfirmationModal; disable instead of hide buttons in Modal

* fix flow not understanding that an object wouldn't be null in this case anyway. silly flow

* various refactors; send entire balance working
2017-08-30 21:00:31 -07:00
William O'Beirne ae0ada9c06 Add an alpha agreement screen cover. Bump up announcement size by a bit. (#139) 2017-08-28 14:09:42 -05:00
William O'Beirne f5b6a49463 Translation updates (#120)
* Updated all translations, moved into their own folders.

* Switch translations to use Markdown component.

* Remove markup tests, since were using a module now.

* Fix flow errors, render react elements instead of dangerouslysetinnerhtml.

* Make translate a connected component, so it updates with Redux.

* Fix flow errors

* First pass at returning raw when needed for placeholder.

* Added aria test.

* Fixed flow errors and linter warnings.

* Move settimeout to saga.

* Change reload to 250 ms from 1500 ms
2017-08-28 13:05:38 -05:00
skubakdj 982d70a56c Use async in download wallet (#127)
* convert keystore gen to async

* add & use type UtcKeystore

* add types, refactor

* remove unneeded prop checking
2017-08-24 10:34:08 +02:00
William O'Beirne bf4171dfbd Transaction confirmation modal (#108)
* Add a little arrow icon.

* Replaced toEther function with toUnit to reduce the number of conversion functions wed need. Add tests for conversion functions.

* First pass at a styled confirm transaction modal.

* More data about data

* Hook up generated transaction with modal

* Fix modal position

* Add from address. Restyle a bit.

* Only show textareas and button if transaction has been generated.

* Remove need for param.

* Copy.

* Use non-relative path.

* Initial crack at transaction token support.

* Fix flow type

* Unit tests for contracts and erc20

* Convert contract class to ethereumjs-abi, caught a bug

* Add decodeArgs for contracts, decodeTransfer for erc20

* Show token value in modal

* Show value from transaction data in confirmation.

* Show address of receiver, not token contract

* Flow type

* Only accept bigs

* Unlog

* Use ethereumjs-abis method ID function

* Get transaction stuff out of state. Leave todo notes.

* Intuit token from transaction to address.

* Move generate transaction out of node and into libs/transaction.

* timeout -> interval

* Promise.reject -> throw

* Get default currency from network.

* Add more unit tests for decoding. Adopt the $ prefix for decoding calls.

* Use signed transaction in confirmation modal.
2017-08-23 08:57:18 +02:00
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 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
Daniel Ternyak a66337ac0a Swap Part 4 (#101)
### Re-implements:
* min/max validators on initial currency swap selection
* polling of order status
* timer that persists across refreshes via localStorage (computed based on `createdTime` and `validFor` amount)
* swap persists across refreshes once order is created.
* various type refactors

### New additions:
* *SimpleButton* (can be PRd separately on request)
* clear loading state after order create (via SimpleButton and font-awesome)
* buffers for non-BTC swaps (bity does not actually accept 0.01 BTC worth of ETH as they claim they do in their JSON response, so a magic number of 10% is added to the minimum).
2017-07-31 18:14:30 -05:00
William O'Beirne e3505fd958 Contracts Tab Scaffolding (#70)
* Empty component, routes setup.

* Shared components for all Contracts inputs. Dont do anything yet.

* Check in reducer work so far. Still WIP.

* Header styling

* Check in input work so far, splitting to new branch.

* Strip down contracts inputs. Split out into form and explorer

* Contract selector

* Constantized config actions to use in contract saga.

* Interact explorer UI, no functionality

* Convert to constants, hook up errors

* Deploy and style cleanup.

* Remove unnecessary class.

* Fix flow errors with css modules

* Attempt at fixing all newly introduced flow errors in the contracts branch.

* Removed unused validator.

* Remove action constants, fix flow specificity in reducers

* Fix unit tests

* Move network contracts out of redux / sagas, and read directly from state with a selector in mapStateToProps.

* Fix initialState -> INITIAL_STATE rename

* foreach push -> concat
2017-07-27 19:31:59 -05:00
William O'Beirne 1aad9d1c21 Standardize Redux Actions / Reducers (#95)
* Convert Swap to consistent style

* Generate wallet reducer cleanup.

* Confirm empty action in swap reducer

* Union types. Fix gen wallet collision

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

* Readme instructions.

* Remove common action constants.

* Bring all actions and reducers inline with readme instructions.

* Readme fixes

* address comments
2017-07-27 12:05:09 -05:00
Daniel Ternyak 0eae13f938 Swap Cleanup (#68)
* add types for swap action creators (and separate out to separate module)
* DRY up swapInformation and onGoingSwapInformation -> SwapInfoHeader.
* stop bity rate loading when Swap will unmount
* split out SimpleDropdown to separate module
* various additional refactors
2017-07-22 16:24:03 -05:00
skubakdj 7fd7ba66c9 Gas price dropdown (#61)
* implement gas price dropdown
2017-07-20 12:06:10 -05:00
Daniel Ternyak 0b72b8ff6a update GenerateWallet hasDownloadedWalletFile prop type from invalid 'boolean' to valid 'bool' type (#58) 2017-07-17 20:47:01 -05:00
Daniel 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 c8fa6e3022 support tokens on send page (#47) 2017-07-15 18:05:57 -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 cdcbd7a56b Sagas: Adjust bity saga to allow for cancelled polling, and stop polling when part 2 of swap ends. 2017-07-08 22:51:14 -05:00
crptm ecb11133dd move bity getRates to saga (#35)
* move bity getRates to saga

* typo

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

* Send: add. localization
2017-07-05 19:36:11 -05:00
Daniel Ternyak 12fa008755 reformat everything 2017-07-03 22:28:56 -05:00
Daniel Ternyak 06ae70988a merge develop into 'swap_part_3' 2017-07-03 22:21:19 -05:00
crptm 40f2c4466a merge develop 2017-07-04 06:18:16 +04:00
crptm 85759d73b4 type dropdown, config actions 2017-07-04 05:25:01 +04:00
Daniel Ternyak 20b1d85bb8 undo donation address hardcode temp 2017-07-03 19:39:36 -05:00
Daniel Ternyak 7846b2125a merge develop info 'donation_addresses' 2017-07-03 19:24:22 -05:00
Daniel Ternyak 164e6a07bb fix additional hardcoded address issues 2017-07-03 19:20:47 -05:00
Daniel Ternyak 29be2821a3 refactor donation addresses map; fix hardcoded instance of address in send 2017-07-03 19:16:20 -05:00
Daniel Ternyak 8f77aedc70 swapProgress: create computed class for active step; cleanup 2017-07-03 19:09:33 -05:00
Daniel Ternyak 513b4c67b9 Bity: refactor and remove unnecessary class 2017-07-03 19:08:35 -05:00
crptm 65234a26c0 fix flow sagas errors 2017-07-04 03:59:27 +04:00
Daniel Ternyak 62150fb63b swapProgress: add translations and remove ng-scopes 2017-07-03 16:53:02 -05:00
Daniel Ternyak 7cf3d26bbe Merge feat/send-page 2017-07-02 00:49:06 -05:00
Daniel Ternyak b623a3efe9 Swap Part 3 WIP 2017-07-02 00:45:22 -05:00
crptm 63e7eb89e4 unlock wip 2017-06-30 03:03:11 +04:00
crptm d6b7cca10a merge send-tx 2017-06-27 03:36:21 +04:00
crptm 0ad93101e7 validators merge 2017-06-27 03:27:26 +04:00
crptm 240007fe43 merge develop 2017-06-27 03:13:21 +04:00
crptm 9f2a209da5 typing fixes 2017-06-27 03:08:52 +04:00
crptm 96c8c88ab6 remove obsolete comment 2017-06-27 02:46:15 +04:00
crptm 1fb4a004ac send wip 2017-06-27 02:27:55 +04:00
Daniel Ternyak afe2adbb5a add translation support 2017-06-25 00:57:43 -05:00
Daniel Ternyak dab75a48b0 address comments 2017-06-24 15:39:03 -05:00
Daniel Ternyak 08f44e1d4a Merge branch 'swap_part_2' into swap_part_2_more 2017-06-24 13:19:14 -05:00
Daniel Ternyak 119dda77e1 Create toFixedIfLarger function, unit test, and use in app. 2017-06-24 13:17:09 -05:00
Daniel Ternyak 28415cd0e8 Consume new receivingAddressSwap action creator and receivingAddress state, validate receiving address input using Validator class. 2017-06-24 01:09:44 -05:00
Daniel Ternyak cb36331c2d Refactor: remove stray ng-binding 2017-06-23 20:34:13 -05:00
Daniel Ternyak 943a0532d7 Swap: Create components/adjust containers as neccesasary for part 2 of swap 2017-06-23 20:26:54 -05:00
crptm 51f2c8596e address review comments 2017-06-23 01:16:21 +04:00
crptm d0becf7746 notifications 2017-06-22 03:31:59 +04:00
Daniel Ternyak 1a4fac1dec accidently swapped verb and namespace order for action creators originally; fixed 2017-06-20 01:28:22 -05:00
Daniel Ternyak ba6d46e91d reformat 2017-06-20 01:14:35 -05:00
Daniel Ternyak ff81133b5e reformat 2017-06-20 01:14:23 -05:00
Daniel Ternyak 3644cb5515 format 2017-06-20 01:13:21 -05:00
Daniel Ternyak 3cee501da1 format 2017-06-20 01:08:26 -05:00
Daniel Ternyak 9a612eb6de use standard action creator naming convention 2017-06-20 00:59:54 -05:00
Daniel Ternyak c46ed8f6ed clean up Generate Wallet actions to not use boilerplate 2017-06-19 22:15:38 -05:00
Daniel Kaspo 3f6bf916cd Added sanity checks so decrypt doesn't blow up on null. 2017-06-19 21:02:29 -04:00
Daniel Kaspo 91c854f2e1 Replaced component with key in wallet-decrypt state. 2017-06-19 21:02:28 -04:00
Daniel Kaspo 6d48e5b36b Changing how we handle event functions. 2017-06-19 21:02:28 -04:00
Daniel Kaspo 37e78df682 Logging public and private key temporarily for Travis 2017-06-19 21:02:28 -04:00
Daniel Kaspo ce3749000f Keystore decryption initial implementation. 2017-06-19 21:02:28 -04:00
Daniel Kaspo c448e7331f Properly bound onChange handler for wallet decrypt. 2017-06-19 21:01:45 -04:00
Daniel Kaspo 670e283dbf Returned null instead of an empty div. 2017-06-19 21:01:45 -04:00
Daniel Kaspo 87121c8a6d Added logic for changing of decryption selections. 2017-06-19 21:01:45 -04:00
Daniel Kaspo 6ac6237f72 Added folders for future decryption components. 2017-06-19 21:01:45 -04:00
Daniel Kaspo a77c973bb4 Made method to build markup for decryption choices. 2017-06-19 21:01:45 -04:00
Daniel Kaspo 1ba467b355 Removed un-needed constructors 2017-06-19 21:01:45 -04:00
Daniel Kaspo 70d71b158b Added initial Keystore Decrypt component
Markup isn't quite right just yet but that'll be added in the next
commit.
2017-06-19 21:01:45 -04:00
Daniel Kaspo f8e9906b37 Added and marked up wallet decrypt component.
Still needs lots of work at this point, but all the visuals are done,
it's been renamed to what Taylor said it should be called, and all the
Aria labels have been properly updated.
2017-06-19 21:01:44 -04:00
Daniel Ternyak b33d2ef590 don't pass around bityRates when you can access from state in reducer 2017-06-19 18:47:11 -05:00
Daniel Ternyak c820cf8ce3 remove unused propType 2017-06-19 18:35:52 -05:00
Daniel Ternyak e7d8284d69 move state building into swap reducer instead of in wantToSwapMy component 2017-06-19 18:35:14 -05:00
Daniel Ternyak 67d57c3d4b remove eslint warning because store was undefined since it was global 2017-06-19 00:49:52 -05:00
Daniel Ternyak 6f638c66da remove unused actions 2017-06-19 00:39:57 -05:00
Daniel Ternyak 67a5eee0a9 Reformat 2017-06-19 00:39:07 -05:00
Daniel Ternyak f32a2d6631 Reformat: common/containers/Tabs/Swap/components/wantToSwapMy.js 2017-06-19 00:37:17 -05:00
Daniel Ternyak 3cf43d04ad address additional comments 2017-06-18 23:56:32 -05:00
Daniel Ternyak c77f5ef300 address sleep() hack -- get state directly from redux instead of relying on props 2017-06-18 23:53:32 -05:00
Daniel Ternyak 192efd4404 reformat 2017-06-18 20:00:54 -05:00
Daniel Ternyak f2b8045c21 address additional comments 2017-06-18 19:56:11 -05:00
Daniel Ternyak 3333169c27 Fix duplicate location key due to bad marge 2017-06-18 15:00:15 -05:00
Daniel Ternyak 125d8742ae Merge branch 'cleanup' into swap 2017-06-18 14:58:45 -05:00
Daniel Ternyak 8e530fe476 use props.location instead of window 2017-06-18 14:56:12 -05:00
Daniel Ternyak fb73be4214 WIP address comments 2017-06-18 14:47:00 -05:00
Daniel Ternyak 00e5962ae0 Merge branch 'cleanup' into swap 2017-06-18 14:39:46 -05:00
Daniel Ternyak ee8c411c4e Remove comments. 2017-06-11 20:08:19 -05:00
Daniel Ternyak d745729d95 Swap: Initial Swap Home View 2017-06-11 20:02:39 -05:00
Daniel Ternyak db70e17a67 PR comments 2017-05-30 22:34:57 -05:00
Daniel Ternyak 62dcec96d9 fix merge conflicts 2017-05-30 18:35:30 -05:00