sourcifyeth / remix-sourcify

Remix plugin for source verify project
21 stars 12 forks source link

improved error handling #51

Closed bunsenstraat closed 3 years ago

bunsenstraat commented 3 years ago

Errors did not display properly, we had issues. Mistakes with pasting addresses and so are easily made, for example when you have trailing whitespace the contract loads but then the script matching the addresses fails, and so on. Hope this brings out more clear errors to the user.

FabijanC commented 3 years ago

To prevent the trailing space issue, perhaps the address could be trimmed? It could be done before calling this.fetchByNetwork and remixClient.saveFetchedToRemix in RemixClient.ts. Or it could be done in ContractFetcher.tsx when setting address.

FabijanC commented 3 years ago

Also, what's with package-lock.json? I am aware that I updated it with my last commit, but that's what happened after installing all the dependencies before the commit. Shouldn't its content be tracked like this?

bunsenstraat commented 3 years ago

You can do it in every way you wish. Without the try catch block it didn't catch it. The lock file no probably not. It's errors not displaying that concern me at the moment. You want me to clean up the branch? rm the lock. About the trailing space, I'm not sure. Didn't want to meddle in that.

FabijanC commented 3 years ago

@bunsenstraat Who will publish the new version to IPFS and update the source-verification plugin entry in the plugin repo?

bunsenstraat commented 3 years ago

I can do it sure.