Skip to content

Commit

Permalink
fixed smartaccount test
Browse files Browse the repository at this point in the history
  • Loading branch information
freeelancer committed Mar 11, 2024
1 parent 67596fe commit 6af225b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe("Smartaccount Module (https://github.com/terra-money/core/tree/release/
}
});

test.only('Only controller should be able to sign', async () => {
test('Only controller should be able to sign', async () => {
try {
// signing with the controlledAccountAddress should now fail
let tx = await wallet.createAndSignTx({
Expand Down
1 change: 0 additions & 1 deletion x/smartaccount/ante/tests/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func (s *AnteTestSuite) TestAuthAnteHandler() {

// create initMsg
initMsg := smartaccounttypes.Initialization{
Senders: []string{},
Account: acc.String(),
Msg: pkEncoded,
}
Expand Down
5 changes: 4 additions & 1 deletion x/smartaccount/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ func (q Querier) Setting(
return nil, err
}
for _, auth := range setting.Authorization {
auth.InitMsg.Msg = []byte(base64.StdEncoding.EncodeToString(auth.InitMsg.Msg))
auth.InitMsg.Msg, err = base64.StdEncoding.DecodeString(string(auth.InitMsg.Msg))
if err != nil {
return nil, err
}
}
return &types.QuerySettingResponse{Setting: *setting}, nil
}
Binary file modified x/smartaccount/test_helpers/test_data/limit_send_only_hooks.wasm
Binary file not shown.
Binary file modified x/smartaccount/test_helpers/test_data/smart_auth_contract.wasm
Binary file not shown.

0 comments on commit 6af225b

Please sign in to comment.