9
9
connTypes "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types"
10
10
chanTypes "github.com/cosmos/cosmos-sdk/x/ibc/04-channel/types"
11
11
tmclient "github.com/cosmos/cosmos-sdk/x/ibc/07-tendermint/types"
12
+ ibcTypes "github.com/cosmos/cosmos-sdk/x/ibc/types"
12
13
"github.com/iqlusioninc/relayer/relayer"
13
14
"github.com/spf13/cobra"
14
15
"gopkg.in/yaml.v2"
@@ -387,7 +388,7 @@ func pathsListCmd() *cobra.Command {
387
388
388
389
srcConn , err := ch [src ].QueryConnection (srch )
389
390
dstConn , _ := ch [dst ].QueryConnection (dsth )
390
- if err == nil && srcConn .Connection .State . String () == " OPEN" && dstConn .Connection .State . String () == " OPEN" {
391
+ if err == nil && srcConn .Connection .State == ibcTypes . OPEN && dstConn .Connection .State == ibcTypes . OPEN {
391
392
connection = "✔"
392
393
} else {
393
394
printPath (i , k , pth , chains , clients , connection , channel )
@@ -397,7 +398,7 @@ func pathsListCmd() *cobra.Command {
397
398
398
399
srcChan , err := ch [src ].QueryChannel (srch )
399
400
dstChan , _ := ch [dst ].QueryChannel (dsth )
400
- if err == nil && srcChan .Channel .State . String () == " OPEN" && dstChan .Channel .State . String () == " OPEN" {
401
+ if err == nil && srcChan .Channel .State == ibcTypes . OPEN && dstChan .Channel .State == ibcTypes . OPEN {
401
402
channel = "✔"
402
403
} else {
403
404
printPath (i , k , pth , chains , clients , connection , channel )
@@ -490,13 +491,13 @@ func pathsShowCmd() *cobra.Command {
490
491
491
492
srcConn , err := ch [src ].QueryConnection (srch )
492
493
dstConn , _ := ch [dst ].QueryConnection (dsth )
493
- if err == nil && srcConn .Connection .State . String () == " OPEN" && dstConn .Connection .State . String () == " OPEN" {
494
+ if err == nil && srcConn .Connection .State == ibcTypes . OPEN && dstConn .Connection .State == ibcTypes . OPEN {
494
495
connection = true
495
496
}
496
497
497
498
srcChan , err := ch [src ].QueryChannel (srch )
498
499
dstChan , _ := ch [dst ].QueryChannel (dsth )
499
- if err == nil && srcChan .Channel .State . String () == " OPEN" && dstChan .Channel .State . String () == " OPEN" {
500
+ if err == nil && srcChan .Channel .State == ibcTypes . OPEN && dstChan .Channel .State == ibcTypes . OPEN {
500
501
channel = true
501
502
}
502
503
0 commit comments