-
Notifications
You must be signed in to change notification settings - Fork 589
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
feat(superfluid/gov): configure unpool whitelist via gov prop #3512
Changes from all commits
4460a80
abb8b8b
611e273
680e4fd
06bb0c3
861cf9d
8c046f8
a4aa501
ca2412e
f00782f
0e700d7
e4c0ee2
0a116d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,23 +10,25 @@ import ( | |
func ProposalSetSuperfluidAssetsRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { | ||
return govrest.ProposalRESTHandler{ | ||
SubRoute: "set-superfluid-assets", | ||
Handler: newSetSuperfluidAssetsHandler(clientCtx), | ||
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. idk whats going on here, but IIRC this REST folder doesn't matter for anything / should be deleted, so not blocking 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. For each of these, the handler is the same - no-op. I just made a shared no-op function for all of these but yes it's unimportant 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. ah that makes sense! Nice :) |
||
Handler: emptyHandler(clientCtx), | ||
} | ||
} | ||
|
||
func newSetSuperfluidAssetsHandler(clientCtx client.Context) http.HandlerFunc { | ||
return func(w http.ResponseWriter, r *http.Request) { | ||
func ProposalRemoveSuperfluidAssetsRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { | ||
return govrest.ProposalRESTHandler{ | ||
SubRoute: "remove-superfluid-assets", | ||
Handler: emptyHandler(clientCtx), | ||
} | ||
} | ||
|
||
func ProposalRemoveSuperfluidAssetsRESTHandler(clientCtx client.Context) govrest.ProposalRESTHandler { | ||
func ProposalUpdateUnpoolWhitelistProposal(clientCtx client.Context) govrest.ProposalRESTHandler { | ||
return govrest.ProposalRESTHandler{ | ||
SubRoute: "remove-superfluid-assets", | ||
Handler: newRemoveSuperfluidAssetsHandler(clientCtx), | ||
SubRoute: "update-unpool-whitelist", | ||
Handler: emptyHandler(clientCtx), | ||
} | ||
} | ||
|
||
func newRemoveSuperfluidAssetsHandler(clientCtx client.Context) http.HandlerFunc { | ||
func emptyHandler(clientCtx client.Context) http.HandlerFunc { | ||
return func(w http.ResponseWriter, r *http.Request) { | ||
} | ||
} |
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.
Can be changed later / can discuss in an issue, should not block this PR. Perhaps this should be called
HasWithType
?e.g. if we were masters of the store interface
Has to indicate its a bool (rather than assuming you'd get the object back)
OR is proto.Message here actually mutated? If so lets update the comment, but this doesn't actually make sense to me as an API.
Why don't just make a method called
Get
thats the same as MustGet, but returns an error instead of panics?