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: allow no admin in instantiation through proposal #828

Merged

Conversation

jhernandezb
Copy link
Contributor

@jhernandezb jhernandezb commented Apr 30, 2022

currently is not possible to instantiate without admin through governance proposal.

@jhernandezb jhernandezb requested a review from alpe as a code owner April 30, 2022 01:00
@codecov
Copy link

codecov bot commented Apr 30, 2022

Codecov Report

Merging #828 (e5060dc) into main (bfb4d31) will increase coverage by 0.07%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #828      +/-   ##
==========================================
+ Coverage   59.28%   59.36%   +0.07%     
==========================================
  Files          51       51              
  Lines        5883     5884       +1     
==========================================
+ Hits         3488     3493       +5     
+ Misses       2143     2141       -2     
+ Partials      252      250       -2     
Impacted Files Coverage Δ
x/wasm/keeper/proposal_handler.go 64.28% <50.00%> (+1.69%) ⬆️
x/wasm/keeper/keeper.go 87.74% <0.00%> (+0.35%) ⬆️

@alpe alpe added the bug Something isn't working label May 2, 2022
Copy link
Member

@alpe alpe left a comment

Choose a reason for hiding this comment

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

Thanks for finding and fixing this 🐛 !
LGTM 💯

if err != nil {
return sdkerrors.Wrap(err, "admin")
var adminAddr sdk.AccAddress
if p.Admin != "" {
Copy link
Member

Choose a reason for hiding this comment

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

👍 this was a bug

@@ -123,6 +123,80 @@ func TestInstantiateProposal(t *testing.T) {
require.NotEmpty(t, em.Events()[2].Attributes[0])
}

func TestInstantiateProposal_NoAdmin(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for covering the additional cases! If you feel table tests are a better fit, then please feel free to refactor tests as well.

@alpe alpe merged commit 591ff72 into CosmWasm:main May 2, 2022
@jhernandezb jhernandezb deleted the jhernandezb/fix-no-admin-gov-proposal branch May 6, 2022 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants