Skip to content

Commit 970e9e8

Browse files
committed
fix comments and method name
1 parent 2bf58d7 commit 970e9e8

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

x/bandtss/client/cli/tx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
flagFeeLimit = "fee-limit"
2424
)
2525

26-
// NewTxCmd returns the transaction commands for this module
26+
// GetTxCmd returns the transaction commands for this module
2727
func GetTxCmd(requestSignatureCmds []*cobra.Command) *cobra.Command {
2828
txCmd := &cobra.Command{
2929
Use: types.ModuleName,

x/tss/keeper/member.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (k Keeper) GetMemberByAddress(ctx sdk.Context, groupID tss.GroupID, address
2727
}
2828

2929
for _, member := range members {
30-
if member.Verify(address) {
30+
if member.IsAddress(address) {
3131
return member, nil
3232
}
3333
}

x/tss/keeper/msg_server.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func (k msgServer) SubmitDKGRound1(
5050
if err != nil {
5151
return nil, err
5252
}
53-
if !member.Verify(req.Address) {
53+
if !member.IsAddress(req.Address) {
5454
return nil, types.ErrMemberNotAuthorized.Wrapf(
5555
"memberID %d address %s is not match in this group",
5656
memberID,
@@ -153,7 +153,7 @@ func (k msgServer) SubmitDKGRound2(
153153
if err != nil {
154154
return nil, err
155155
}
156-
if !member.Verify(req.Address) {
156+
if !member.IsAddress(req.Address) {
157157
return nil, types.ErrMemberNotAuthorized.Wrapf(
158158
"memberID %d address %s is not match in this group",
159159
memberID,
@@ -226,7 +226,7 @@ func (k msgServer) Complain(goCtx context.Context, req *types.MsgComplain) (*typ
226226
if err != nil {
227227
return nil, err
228228
}
229-
if !member.Verify(req.Address) {
229+
if !member.IsAddress(req.Address) {
230230
return nil, types.ErrMemberNotAuthorized.Wrapf(
231231
"memberID %d address %s is not match in this group",
232232
memberID,
@@ -337,7 +337,7 @@ func (k msgServer) Confirm(
337337
if err != nil {
338338
return nil, err
339339
}
340-
if !member.Verify(req.Address) {
340+
if !member.IsAddress(req.Address) {
341341
return nil, types.ErrMemberNotAuthorized.Wrapf(
342342
"memberID %d address %s is not match in this group",
343343
memberID,

x/tss/types/member.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"github.com/bandprotocol/chain/v2/pkg/tss"
55
)
66

7-
// Verify checks if the address of the Member matches the given address
8-
func (m Member) Verify(address string) bool {
7+
// IsAddress checks if the address of the Member matches the given address
8+
func (m Member) IsAddress(address string) bool {
99
return m.Address == address
1010
}
1111

x/tss/types/member_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestVerify(t *testing.T) {
3838
// Run the test cases
3939
for _, tc := range testCases {
4040
t.Run(tc.name, func(t *testing.T) {
41-
result := tc.member.Verify(tc.address)
41+
result := tc.member.IsAddress(tc.address)
4242
require.Equal(t, tc.expectedMatch, result)
4343
})
4444
}

0 commit comments

Comments
 (0)