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

(Fix) Disable continue button in step 1 if contracts couldn't be downloaded #516

Merged
merged 4 commits into from
Jan 29, 2018

Conversation

fvictorio
Copy link
Contributor

Closes #399.

Disable the "Continue" button in step one until all the contracts are downloaded. If there is a problem with the download, the button is kept disabled and a toast message with an error is shown.

This will help with the problem in #399, but only when the ABI files are missing, because those are the ones that are JSON.parsed. If the SOL and BIN files, the index.html is returned. I mean: a 404 error is never returned when a file in public/contracts is missing.

I think this is configured that way for react-router to work in HTML5 mode. I don't really know how to fix that, but I think it's a different issue.

@BlackDuckCoPilot
Copy link

Black Duck Security Report

Merging #516 into master will decrease security risk!

Removed Components

Medium Risk: 1
Clean: 1366

Click here to see full report

@ghost ghost assigned fvictorio Jan 25, 2018
console.error('Error downloading contracts', e)
toast.showToaster({
type: TOAST.TYPE.ERROR,
message: 'The contracts could not be downloaded'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe, to add "Please try to refresh the page. If the problem still persists, try again later".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@vbaranov vbaranov merged commit dfe8bda into master Jan 29, 2018
@ghost ghost removed the awaiting for review label Jan 29, 2018
@vbaranov vbaranov deleted the handle-contract-download-error branch January 29, 2018 16:17
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.

utils.js:37 Error: Returned error: Unexpected token < in JSON at position 0
3 participants