Skip to content

Commit

Permalink
update Init: check map
Browse files Browse the repository at this point in the history
  • Loading branch information
DongLieu committed Dec 2, 2024
1 parent 3a202ca commit 8f0ae9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion x/accounts/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ func (k Keeper) initFromMsg(ctx context.Context, initMsg *v1.MsgInit) (transacti
return nil, nil, err
}

schema := v1.MakeAccountSchema(k.accounts[initMsg.AccountType])
impl, ok := k.accounts[initMsg.AccountType]
if !ok {
return nil, nil, err
}
schema := v1.MakeAccountSchema(impl)

// decode message bytes into the concrete boxed message type
msg, err := implementation.EncodeMsgJSONToProto(schema.InitSchema.Request, initMsg.JsonMessage)
Expand Down

0 comments on commit 8f0ae9d

Please sign in to comment.