-
Notifications
You must be signed in to change notification settings - Fork 128
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
Conversation
ESLint Summary View Full Report
Report generated by eslint-plus-action |
@@ -59,11 +59,6 @@ export interface SdkInstance { | |||
} | |||
|
|||
export interface SafeInfo { | |||
safeAddress: string; | |||
network: LowercaseNetworks; |
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.
Should line 22 be removed?
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.
good catch
packages/safe-apps-sdk/src/types.ts
Outdated
network: LowercaseNetworks; | ||
} | ||
|
||
export interface SafeInfoV1 { | ||
safeAddress: string; | ||
network: UppercaseNetworks; |
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.
Why is it not possible to have case insensitive networks?
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.
Safe interface stores network names in uppercase and we want the type to be a list of constants (e.g "rinkeby", "mainnet", etc)
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.
I think to have it truly case insensitive we need to switch to chain id :P
* 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
This PR:
network
prop ingetSafeInfo