Skip to content

Commit

Permalink
fix: fix sender addr
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond committed Apr 25, 2024
1 parent 7494702 commit fdc20f1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions x/leveragelp/client/wasm/msg_close.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ func (m *Messenger) msgClose(ctx sdk.Context, contractAddr sdk.AccAddress, msgCl
}

brokerAddress := m.parameterKeeper.GetParams(ctx).BrokerAddress
if contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "contract address must be broker address"}
}

if msgClose.Creator != contractAddr.String() {
if msgClose.Creator != contractAddr.String() && contractAddr.String() != brokerAddress {
return nil, nil, wasmvmtypes.InvalidRequest{Err: "close wrong sender"}
}

Expand Down

0 comments on commit fdc20f1

Please sign in to comment.