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 SafeInfo network type #78

Merged
merged 8 commits into from
Jan 12, 2021
Merged

Fix SafeInfo network type #78

merged 8 commits into from
Jan 12, 2021

Conversation

mmv08
Copy link
Member

@mmv08 mmv08 commented Jan 11, 2021

This PR:

  • Fixes inconsistency between the type and actual returned value for network prop in getSafeInfo

@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2021

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 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@mmv08 mmv08 requested a review from rmeissner January 11, 2021 14:21
@mmv08 mmv08 requested a review from germartinez January 11, 2021 16:24
@@ -59,11 +59,6 @@ export interface SdkInstance {
}

export interface SafeInfo {
safeAddress: string;
network: LowercaseNetworks;
Copy link
Member

Choose a reason for hiding this comment

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

Should line 22 be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch

network: LowercaseNetworks;
}

export interface SafeInfoV1 {
safeAddress: string;
network: UppercaseNetworks;
Copy link
Member

Choose a reason for hiding this comment

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

Why is it not possible to have case insensitive networks?

Copy link
Member Author

Choose a reason for hiding this comment

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

Safe interface stores network names in uppercase and we want the type to be a list of constants (e.g "rinkeby", "mainnet", etc)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think to have it truly case insensitive we need to switch to chain id :P

@mmv08 mmv08 merged commit 2768402 into development Jan 12, 2021
@mmv08 mmv08 deleted the bug/fix-network-type branch January 12, 2021 10:52
mmv08 added a commit that referenced this pull request May 13, 2021
* fix network type:

* Revert change to format-dist

* update package.json versions

* one more pkg version fix for react-sdk

* also readme update for react sdk

* bump sdk version in react sdk

* remove uppercase/lowercase type and use one networks type

* dep updates
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.

3 participants