Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle LBC unavailable error from ShapeShift without breaking the app #1739

Merged
merged 1 commit into from
Jul 9, 2018

Conversation

neb-b
Copy link

@neb-b neb-b commented Jul 8, 2018

If LBC is unavailable on shapeshift (like it is right now) the app breaks on the Get Credits page. We need to explicitly check that it is available before worrying about other coins availability.

If it's unavailable, stop and show an error message.

@neb-b neb-b changed the title wip Handle LBC unavailable error from ShapeShift without breaking the app Jul 9, 2018
@neb-b neb-b requested a review from kauffj July 9, 2018 04:30
@lbry-bot lbry-bot assigned kauffj and unassigned neb-b Jul 9, 2018
@@ -1,3 +1,5 @@
export const NO_DEPOSITS = 'no_deposits';
export const RECEIVED = 'received';
export const COMPLETE = 'complete';
export const AVAILABLE = 'available';
export const UNAVAILABLE = 'unavailable';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 good stuff

@@ -65,9 +66,16 @@ export const shapeShiftInit = () => (dispatch: Dispatch): ThunkAction => {
return shapeShift
.coinsAsync()
.then(coinData => {
if (coinData.LBC.status === SHAPESHIFT_STATUSES.UNAVAILABLE) {
dispatch({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return dispatch ?

@lbry-bot lbry-bot assigned neb-b and unassigned kauffj and neb-b Jul 9, 2018
@neb-b neb-b merged commit 5cd70d5 into master Jul 9, 2018
@neb-b neb-b deleted the shapeshift-fix branch September 10, 2018 19:27
jessopb pushed a commit that referenced this pull request Jul 15, 2022
* Remove ad-handling in videojs.jsx

Primary impetus is to remove unnecessary IntersectionObserver usage, but it should be removed anyway because:
- no longer relevant today with Adnimation's script.
- we also globally hide floating ads now, so no more invisible divs.
- the code is wrongly placed -- it's not the responsibility of the Videojs component.

* use-lazy-loaded: skip if IntersectionObserver is not supported

## Issue
Page not loading in older Safari (e.g. ipad air 2)

## Approach
Instead of using a polyfill (which comes with implementation caveats), just not apply the lazy-loading for those old browsers. Not lazy-loading is better than not loading at all, plus this is way easier to test (even by just reading the code) than testing out the polyfill implementation's caveats.

The cons is we would need the polyfill if we use it in other places in the future.

## Code Changes
Factor out the src-setting code, and use it directly when IntersectionObserver is not found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants