-
Notifications
You must be signed in to change notification settings - Fork 14
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
Track colony versions in the database #163
Changes from 8 commits
abbf5c9
f838369
241bbf3
02acc4b
dcb4b28
e27a917
93b2f5c
e02b83c
9be3443
23cdf5c
aa65fa7
2d5a514
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,8 @@ const ExtensionActionButton = ({ extensionData }: Props) => { | |
); | ||
}; | ||
|
||
const isSupportedColonyVersion = colony.version >= 5; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There used to be a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd say have a constant const MIN_SUPPORTED_COLONY_VERSION = 5
const isSupportedColonyVersion = colony.version >= MIN_SUPPORTED_COLONY_VERSION; or similar |
||
|
||
if (!isInstalledExtensionData(extensionData)) { | ||
return ( | ||
<ActionButton | ||
|
@@ -51,6 +53,7 @@ const ExtensionActionButton = ({ extensionData }: Props) => { | |
extensionData, | ||
}} | ||
text={MSG.install} | ||
disabled={!isSupportedColonyVersion} | ||
/> | ||
); | ||
} | ||
|
@@ -65,7 +68,7 @@ const ExtensionActionButton = ({ extensionData }: Props) => { | |
appearance={{ theme: 'primary', size: 'medium' }} | ||
onClick={handleEnableButtonClick} | ||
text={MSG.enable} | ||
// disabled={!isSupportedColonyVersion} | ||
disabled={!isSupportedColonyVersion} | ||
/> | ||
); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ fragment Colony on Colony { | |
...Watcher | ||
} | ||
} | ||
version | ||
} | ||
|
||
fragment Watcher on WatchedColonies { | ||
|
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.
BigNumber.from...toNumber()
could live as a little utility e.g.numbers.ts
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.
Makes sense 👍