Skip to content

Commit

Permalink
fix: type
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Jan 27, 2025
1 parent 9e5d729 commit 3e715e5
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 121 deletions.
157 changes: 89 additions & 68 deletions api/poktroll/migration/tx.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion proto/poktroll/migration/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "poktroll/migration/params.proto";
import "poktroll/migration/types.proto";

option go_package = "github.com/pokt-network/poktroll/x/migration/types";
option (gogoproto.stable_marshaler_all) = true;
Expand Down Expand Up @@ -43,7 +44,7 @@ message MsgUpdateParamsResponse {}
message MsgUploadMorseState {
option (cosmos.msg.v1.signer) = "authority";
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
bytes state = 2;
MorseAccountState state = 2 [(gogoproto.nullable) = false];
}

message MsgUploadMorseStateResponse {}
Expand Down
17 changes: 8 additions & 9 deletions x/migration/types/message_upload_morse_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@ import (

var _ sdk.Msg = &MsgUploadMorseState{}

func NewMsgUploadMorseState(authority string, state string) *MsgUploadMorseState {
return &MsgUploadMorseState{
func NewMsgUploadMorseState(authority string, state MorseAccountState) *MsgUploadMorseState {
return &MsgUploadMorseState{
Authority: authority,
State: state,
State: state,
}
}

func (msg *MsgUploadMorseState) ValidateBasic() error {
_, err := sdk.AccAddressFromBech32(msg.Authority)
if err != nil {
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid authority address (%s)", err)
}
return nil
_, err := sdk.AccAddressFromBech32(msg.Authority)
if err != nil {
return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid authority address (%s)", err)
}
return nil
}

Loading

0 comments on commit 3e715e5

Please sign in to comment.