Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Ternyak af84a589c5 Redux promise middleware (v2) (#233)
* add redux-promise-middleware to package.json and update package-lock.json

* intergrate redux-promise-middleware and simplify rates by replacing saga with promise

* fix unrelated breaking test

* -improve user messaging when network request fails. \n Clean up rates actions and reducers

* Address tslint errors
2017-09-25 20:41:11 -07:00
HenryNguyen5 5d4b36d453 Migrate to Typescript (#224)
* Refactor babel/types

* Refactor entry point

* Refactor actions

* Refactor api

* Full project refactor -- Broad type fixing sweep

* - completely fix merge conflicts
- handle various type errors

* Add tslint to package.json

* Dependency cleanup

* Fix module resolution

* Work on type definitions for untyped libs

* progress commit

* Add more definition typing

* various type additions

* Add unit types

* Fix sagaiterator  + unit types

* various types added

* additional type additions

* Fix typing on Sagas

* remove flowfixmes; swap translate for translateRaw

* Get rid of contracts - awaiting Henry's contract PR

* Remove contracts from routing

* Fix most of actions/reducers

* refactor actions directory structure

* fix reducer action type imports

* Fix most of type errors pre-actions refactor

* fix action creator imports in containers

* Refactor more

* Refactor index of actions

* fix action imports; use module level index export

* package-lock.json updated

* Use action types in props

* Type up action creators

* Fix most of connect errors

* Typefixing progress

* More types

* Fix run-time errors

* Caching improvements for webpack

* Remove path resolve from webpack

* Update non-breaking packages to latest version

* Fix token typing

* Remove unused color code

* Fix wallet decrypt dispatch

* Set redux-form related props/functions to ANY, since we're stripping it out later on

* Revert BigNumber.js package changes

* Extend window to custom object for Perf

* Format Navigation

* Typecase keystore errors as any (since we shouldnt touch this)

* Push wallet context fix

* - find/replace value->payload in swap
- properly type swap state properties
- extract inline reducer into reducer function

* - type local storage retrieved items as generic

* - bind all RPCClient methods with fat arrow

* - reformat

* Change to enums for constants

* Change state into any

* Fix swap errors

* ensure that seconds are passed into state as integers

* Fix rest of errors

* use parseInt explicitly instead of type coercion

* Fix derivation-checker, remove flow command, add tslint command, add tslint-react, tell travis to use tslint instead of flow.

* Whoops, remove those tests.

* Remove unsupported (yet) config option.

* Fix precommit to target ts and tsx files.

* Fix some errors, ignore some silly rules.

* Revert jest to v19, use ts-jest and make all tests typescript. Fixes all but one.

* Get rid of saga tests

* Fix tslint errors
2017-09-24 19:06:28 -07:00
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
Bryan Fillmer 2616129409 Create a basic saga pattern to handle potential network errors. (#144)
* First pass at handling API failure.

* Bity saga logic upgrade.

* Reusable response.ok logic. Small optimization to array join.

* Flow fixes.

* Streamlined some error handling, moved types.
2017-08-31 09:30:46 -07: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
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
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
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 12fa008755 reformat everything 2017-07-03 22:28:56 -05:00
Daniel Ternyak 513b4c67b9 Bity: refactor and remove unnecessary class 2017-07-03 19:08:35 -05:00
Daniel Ternyak 67a5eee0a9 Reformat 2017-06-19 00:39:07 -05:00
Daniel Ternyak f2b8045c21 address additional comments 2017-06-18 19:56:11 -05:00
Daniel Ternyak fb73be4214 WIP address comments 2017-06-18 14:47:00 -05:00
Daniel Ternyak e8a10b3848 Swap: Initial Bity API Class 2017-06-11 20:01:27 -05:00
Daniel Ternyak a12d720c8a Resolve broken prod css 2017-04-24 18:36:59 -05:00
Daniel Ternyak a17b97cbc2 create react/redux boilerplate 2017-04-12 00:04:27 -05:00