Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Tech debt: Add types for contracts#1118

Merged
mmv08 merged 48 commits intodevelopmentfrom
tech-debt/add-typechain
Jul 31, 2020
Merged

Tech debt: Add types for contracts#1118
mmv08 merged 48 commits intodevelopmentfrom
tech-debt/add-typechain

Conversation

@mmv08
Copy link
Contributor

@mmv08 mmv08 commented Jul 16, 2020

This PR:

  • Adds typechain for Gnosis Safe contracts
  • Adds typings/small refactor of Stepper component because I couldn't get it to compile because of type errors
  • Some more type improvements
  • Remove memoization of getGnosisSafeInstance because it doesn't really work how it should: when we call it the first time, it gets initialized with readonly web3.js which cannot be used for sending transactions, memoization should be also dependent on web3 object we have, not only safeAddress

TODO

  • remove truffle-contract dependency, currently we have a mix of web3 contracts/truffle contracts, we should go with only web3.js and remove truffle (should shave off ~1mb of bundle size)
  • think of a better solution for getGnosisSafeInstance
  • add types for other contracts (tokens, etc)

I will create issues for all the todos, the PR is quite large so I decided to leave it on this stage

@mmv08 mmv08 added the Tech-debt 🚧 Technical debt label Jul 16, 2020
@ghost
Copy link

ghost commented Jul 16, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 16, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 16, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 16, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 16, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 17, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 17, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 17, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 17, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@github-actions
Copy link

github-actions bot commented Jul 21, 2020

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 52 0
Ignored 4 N/A
  • Result: ✅ success

  • Annotations: 52 total


[warning] @typescript-eslint/explicit-module-boundary-types

Require explicit return and argument types on exported functions' and classes' public class methods


Report generated by eslint-plus-action

@mmv08 mmv08 mentioned this pull request Jul 21, 2020
@ghost
Copy link

ghost commented Jul 30, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 30, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

2 similar comments
@ghost
Copy link

ghost commented Jul 30, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 30, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

Comment on lines -94 to -99
validation={(values) => {
const selectedTokenRecord = tokens.find((token) => token.address === values?.token)

return {
amount: maxValue(selectedTokenRecord?.balance)(values.amount),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

what happened here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ghost
Copy link

ghost commented Jul 30, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@mmv08 mmv08 requested a review from fernandomg July 31, 2020 10:22
@ghost
Copy link

ghost commented Jul 31, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

2 similar comments
@ghost
Copy link

ghost commented Jul 31, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 31, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Jul 31, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

Copy link
Contributor

@Agupane Agupane left a comment

Choose a reason for hiding this comment

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

Good Job!

@ghost
Copy link

ghost commented Jul 31, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

1 similar comment
@ghost
Copy link

ghost commented Jul 31, 2020

Travis automatic deployment:
https://pr1118--safereact.review.gnosisdev.com/app

@mmv08 mmv08 merged commit 86cbd94 into development Jul 31, 2020
@mmv08 mmv08 deleted the tech-debt/add-typechain branch July 31, 2020 22:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Tech-debt 🚧 Technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants