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

Tech Debt: Validator Type definitions #1108

Merged
merged 27 commits into from
Jul 27, 2020
Merged

Conversation

mmv08
Copy link
Member

@mmv08 mmv08 commented Jul 9, 2020

This PR:

  • replace simpleMemoize function with memoize from lodash to fix typings
  • add type definitions to validators
  • correctly type components that refer props from router
  • dependency bump
  • a little bit more of type improvements because when you type things correctly errors start to pop up
  • Remove duplicated validators
  • Add tests for validators

@mmv08 mmv08 requested review from nicosampler, Agupane, fernandomg and dasanra and removed request for nicosampler and Agupane July 9, 2020 10:48
@mmv08 mmv08 marked this pull request as ready for review July 9, 2020 10:48
@mmv08 mmv08 added the Tech-debt 🚧 Technical debt label Jul 9, 2020
@ghost
Copy link

ghost commented Jul 9, 2020

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

@mmv08 mmv08 requested a review from francovenica July 9, 2020 11:01
@ghost
Copy link

ghost commented Jul 9, 2020

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

@ghost
Copy link

ghost commented Jul 9, 2020

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

@mmv08
Copy link
Member Author

mmv08 commented Jul 9, 2020

@francovenica Could you please test sending funds/contract interaction forms for this PR? Especially with the edge cases (balance less than token, balance equal to token balance, etc). Thanks!

@ghost
Copy link

ghost commented Jul 9, 2020

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

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

ghost commented Jul 20, 2020

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

@ghost
Copy link

ghost commented Jul 20, 2020

Travis automatic deployment:
https://pr1108--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 25 0
Ignored 5 N/A
  • Result: ✅ success

  • Annotations: 25 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

@ghost
Copy link

ghost commented Jul 21, 2020

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

@mmv08
Copy link
Member Author

mmv08 commented Jul 22, 2020

@francovenica could you please test this?

@ghost
Copy link

ghost commented Jul 22, 2020

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

src/components/forms/validator.ts Show resolved Hide resolved
src/routes/open/container/Open.tsx Show resolved Hide resolved
src/routes/safe/container/selector.ts Outdated Show resolved Hide resolved
src/store/index.ts Show resolved Hide resolved
@fernandomg
Copy link
Contributor

I don't know why it marked those as 'request change' despite I expressly clicked the 'comment' button 🤷‍♂️

@ghost
Copy link

ghost commented Jul 22, 2020

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

@mmv08 mmv08 requested a review from fernandomg July 22, 2020 13:50
@ghost
Copy link

ghost commented Jul 22, 2020

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

1 similar comment
@ghost
Copy link

ghost commented Jul 22, 2020

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

@ghost
Copy link

ghost commented Jul 24, 2020

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

@mmv08
Copy link
Member Author

mmv08 commented Jul 27, 2020

I tested this PR and it worked fine: validation works as expected in forms and different scenarios like no token selected, re-validating after changing token etc

@ghost
Copy link

ghost commented Jul 27, 2020

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

@mmv08 mmv08 merged commit f62bbff into development Jul 27, 2020
@mmv08 mmv08 deleted the validator-type-definitions branch July 27, 2020 10:31
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.

4 participants