Skip to content

Commit

Permalink
chore: move signer as final arg
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitrisJim committed Oct 3, 2024
1 parent 642a7ce commit c0ddded
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/core/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ func (suite *KeeperTestSuite) TestProvideCounterparty() {

signer := path.EndpointA.Chain.SenderAccount.GetAddress().String()
merklePrefix := commitmenttypesv2.NewMerklePath([]byte("mock-key"))
msg = packetservertypes.NewMsgProvideCounterparty(signer, path.EndpointA.ClientID, path.EndpointB.ClientID, merklePrefix)
msg = packetservertypes.NewMsgProvideCounterparty(path.EndpointA.ClientID, path.EndpointB.ClientID, merklePrefix, signer)

tc.malleate()

Expand Down
4 changes: 2 additions & 2 deletions modules/core/packet-server/types/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var (
)

// NewMsgProvideCounterparty creates a new MsgProvideCounterparty instance
func NewMsgProvideCounterparty(signer, clientID, counterpartyChannelID string, merklePathPrefix commitmenttypes.MerklePath) *MsgProvideCounterparty {
func NewMsgProvideCounterparty(clientID, counterpartyChannelID string, merklePathPrefix commitmenttypes.MerklePath, signer string) *MsgProvideCounterparty {
counterparty := NewCounterparty(clientID, counterpartyChannelID, merklePathPrefix)

return &MsgProvideCounterparty{
Expand Down Expand Up @@ -44,7 +44,7 @@ func (msg *MsgProvideCounterparty) ValidateBasic() error {
}

// NewMsgCreateChannel creates a new MsgCreateChannel instance
func NewMsgCreateChannel(signer, clientID string, merklePathPrefix commitmenttypes.MerklePath) *MsgCreateChannel {
func NewMsgCreateChannel(clientID string, merklePathPrefix commitmenttypes.MerklePath, signer string) *MsgCreateChannel {
return &MsgCreateChannel{
Signer: signer,
ClientId: clientID,
Expand Down
4 changes: 2 additions & 2 deletions modules/core/packet-server/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ func (s *TypesTestSuite) TestMsgProvideCounterpartyValidateBasic() {

for _, tc := range testCases {
msg = types.NewMsgProvideCounterparty(
ibctesting.TestAccAddress,
ibctesting.FirstClientID,
ibctesting.SecondClientID,
commitmenttypes.NewMerklePath([]byte("key")),
ibctesting.TestAccAddress,
)

tc.malleate()
Expand Down Expand Up @@ -113,9 +113,9 @@ func (s *TypesTestSuite) TestMsgCreateChannelValidateBasic() {

for _, tc := range testCases {
msg = types.NewMsgCreateChannel(
ibctesting.TestAccAddress,
ibctesting.FirstClientID,
commitmenttypes.NewMerklePath([]byte("key")),
ibctesting.TestAccAddress,
)

tc.malleate()
Expand Down
2 changes: 1 addition & 1 deletion testing/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func (endpoint *Endpoint) FreezeClient() {
func (endpoint *Endpoint) ProvideCounterparty() (err error) {
merklePath := commitmenttypes.NewMerklePath([]byte("ibc"), []byte(""))

msg := packetservertypes.NewMsgProvideCounterparty(endpoint.Chain.SenderAccount.GetAddress().String(), endpoint.ClientID, endpoint.Counterparty.ClientID, merklePath)
msg := packetservertypes.NewMsgProvideCounterparty(endpoint.ClientID, endpoint.Counterparty.ClientID, merklePath, endpoint.Chain.SenderAccount.GetAddress().String())

// setup counterparty
_, err = endpoint.Chain.SendMsgs(msg)
Expand Down

0 comments on commit c0ddded

Please sign in to comment.