Skip to content

Commit

Permalink
apply coderabbit comment
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Oct 4, 2024
1 parent 21699a1 commit 94e040c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions contrib/launchtools/steps/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,17 @@ func initializeRelayerKeyring(config *launchtools.Config) func(*Relayer) error {
}
}

func marshalIBCFeeMetadata(appVersion string) ([]byte, error) {
return json.Marshal(ibcfeetypes.Metadata{
FeeVersion: ibcfeetypes.Version,
AppVersion: appVersion,
})
}

// link creates a default transfer channel between the chains
// it does all the heavy lifting of creating the channel, connection, and client
func link(r *Relayer) error {
versionBz, err := json.Marshal(ibcfeetypes.Metadata{
FeeVersion: ibcfeetypes.Version,
AppVersion: ibctransfertypes.Version,
})
versionBz, err := marshalIBCFeeMetadata(ibctransfertypes.Version)
if err != nil {
return err
}
Expand All @@ -262,10 +266,7 @@ func link(r *Relayer) error {
// linkWithports is the same as link, however ports are specified
func linkWithPorts(srcPort string, dstPort string, version string) func(*Relayer) error {
return func(r *Relayer) error {
versionBz, err := json.Marshal(ibcfeetypes.Metadata{
FeeVersion: ibcfeetypes.Version,
AppVersion: version,
})
versionBz, err := marshalIBCFeeMetadata(version)
if err != nil {
return err
}
Expand Down

0 comments on commit 94e040c

Please sign in to comment.