Skip to content

Commit

Permalink
refactor: rename name to zrc20_address for MsgRemoveForeignCoin (#2484)
Browse files Browse the repository at this point in the history
* rename name to zrc20_address for MsgRemoveForeignCoin

* update variable name
  • Loading branch information
mohitsethia authored Jul 17, 2024
1 parent 0f95277 commit abc15c8
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 83 deletions.
2 changes: 1 addition & 1 deletion docs/spec/fungible/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Authorized: admin policy group 2.
```proto
message MsgRemoveForeignCoin {
string creator = 1;
string name = 2;
string zrc20_address = 2;
}
```

Expand Down
2 changes: 1 addition & 1 deletion proto/zetachain/zetacore/fungible/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ message MsgDeployFungibleCoinZRC20Response { string address = 1; }

message MsgRemoveForeignCoin {
string creator = 1;
string name = 2;
string zrc20_address = 2;
}

message MsgRemoveForeignCoinResponse {}
Expand Down
4 changes: 2 additions & 2 deletions typescript/zetachain/zetacore/fungible/tx_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ export declare class MsgRemoveForeignCoin extends Message<MsgRemoveForeignCoin>
creator: string;

/**
* @generated from field: string name = 2;
* @generated from field: string zrc20_address = 2;
*/
name: string;
zrc20Address: string;

constructor(data?: PartialMessage<MsgRemoveForeignCoin>);

Expand Down
2 changes: 1 addition & 1 deletion x/fungible/keeper/msg_server_remove_foreign_coin.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (k msgServer) RemoveForeignCoin(
if err != nil {
return nil, cosmoserrors.Wrap(authoritytypes.ErrUnauthorized, err.Error())
}
index := msg.Name
index := msg.Zrc20Address
_, found := k.GetForeignCoins(ctx, index)
if !found {
return nil, cosmoserrors.Wrapf(sdkerrors.ErrInvalidRequest, "foreign coin not found")
Expand Down
6 changes: 3 additions & 3 deletions x/fungible/types/message_remove_foreign_coin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const TypeMsgRemoveForeignCoin = "remove_foreign_coin"

var _ sdk.Msg = &MsgRemoveForeignCoin{}

func NewMsgRemoveForeignCoin(creator string, name string) *MsgRemoveForeignCoin {
func NewMsgRemoveForeignCoin(creator string, zrc20Address string) *MsgRemoveForeignCoin {
return &MsgRemoveForeignCoin{
Creator: creator,
Name: name,
Creator: creator,
Zrc20Address: zrc20Address,
}
}

Expand Down
149 changes: 74 additions & 75 deletions x/fungible/types/tx.pb.go

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

0 comments on commit abc15c8

Please sign in to comment.