-
Notifications
You must be signed in to change notification settings - Fork 2
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
Enhancement/refactor typescript #13
Enhancement/refactor typescript #13
Conversation
…ancement/refactor-typescript
Looks good, some feedback I can give through skimming through the code:
interface Session {
currentSessionNumber: number,
disputeID: number
} why are those constructors needed? |
Thanks for ur feedback @greenlucid ! Both issues have to do with typescript misinterpretations. I took your feedback, did some reading and I think I've corrected it all:
Next week i'll be testing all the changes on goerli (i think governor and kleros liquid are there) to test the appeal module. The happy path it's good. |
@@ -67,10 +67,12 @@ const AppealSideBox: React.FC<{ | |||
(Number(p.appealFee || 0) - Number(p.amountContributed || 0)).toString() | |||
); | |||
const useOnFund = (amount: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the type of this amount
supposed to be? BigNumber
? string
? Can you pass decimals here? This amount should be typed, is there any reason this wasn't the case?
Same for winner
in the props of the AppealSideBox
(is it a number? an address?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greenlucid Yep, I had doubts about some objects types.. But after I saw your comment I've made a review about all the "any" types and I think that it's okay now. lmk what you think
it was passing the absolute index of the list instead of the index within the session
Seems like the bug that made |
tried to change npm for yarn, but web3 broke
There's an issue I haven't been able to solve. On occasion, a transparent iframe will get in the way of the app and prevent you from interacting. If you F12 and delete it from the HTML inspector, the app works normally. Got any idea why that happens? I haven't replicated the issue in live governor.kleros.io, only on your branch. I don't know how to reproduce the bug consistently. It occurred on the following circumstances:
If you can't reproduce it, I could just merge and solve it if it ever becomes an issue |
I can reproduce it in master also. It's related to hot reload in local environment. I fixed it following this answer. I've also fixed:
|
Kudos, SonarCloud Quality Gate passed!
|
@greenlucid with the new package-json updates something in the build is broken. If you are okay, I can try to solve the iframe issue as a separate PR, because it's not related with the typescript refactor |
Let's just see what happens. Sure, then, if the iframe issue won't be noticed in production, then it's fine. |
Related issue #10