diff --git a/cli/commands/bridge/bridge.go b/cli/commands/bridge/bridge.go index 9e43d455..a2407644 100644 --- a/cli/commands/bridge/bridge.go +++ b/cli/commands/bridge/bridge.go @@ -135,9 +135,16 @@ func btpBridgeCmd(diveContext *common.DiveContext) *cobra.Command { srcChainServiceResponse, dstChainServiceResponse, err := chains.getServicesResponse() if err != nil { - diveContext.FatalError("Failed To read ServiceFile", err.Error()) + diveContext.FatalError("failed to get service data", err.Error()) + } + + if chains.chainB == "icon" { + runBtpSetupForAlreadyRunningNodes(diveContext, enclaveCtx, runbridgeicon2ethhardhat, chains.chainB, chains.chainA, chains.chainBServiceName, chains.chainAServiceName, bridge, dstChainServiceResponse, srcChainServiceResponse) + } else { + + runBtpSetupForAlreadyRunningNodes(diveContext, enclaveCtx, runbridgeicon2ethhardhat, chains.chainA, chains.chainB, chains.chainAServiceName, chains.chainBServiceName, bridge, srcChainServiceResponse, dstChainServiceResponse) + } - runBtpSetupForAlreadyRunningNodes(diveContext, enclaveCtx, runbridgeicon2ethhardhat, chains.chainA, chains.chainB, chains.chainAServiceName, chains.chainBServiceName, bridge, srcChainServiceResponse, dstChainServiceResponse) } else if (chains.chainAServiceName == "" && chains.chainBServiceName != "") || (chains.chainAServiceName != "" && chains.chainBServiceName == "") { var chainAServiceResponse string @@ -147,35 +154,35 @@ func btpBridgeCmd(diveContext *common.DiveContext) *cobra.Command { serviceConfig, err := common.ReadServiceJsonFile() if err != nil { - diveContext.FatalError("Failed To Get Service Data", err.Error()) + diveContext.FatalError("failed to get service data", err.Error()) } if chains.chainAServiceName == "" { chainBserviceresponse, OK := serviceConfig[chains.chainBServiceName] if !OK { - diveContext.FatalError("Failed To Get Service Data", fmt.Sprint("service name not found:", chains.chainBServiceName)) + diveContext.FatalError("failed to get service data", fmt.Sprint("service name not found:", chains.chainBServiceName)) } chainBServiceName = chainBserviceresponse.ServiceName chainBServiceResponse, err = chainBserviceresponse.EncodeToString() if err != nil { - diveContext.FatalError("Failed To Get Service Data", err.Error()) + diveContext.FatalError("failed to get service data", err.Error()) } response := runChain[chains.chainA](diveContext) chainAServiceName = response.ServiceName chainAServiceResponse, err = response.EncodeToString() if err != nil { - diveContext.FatalError("Failed To Get Service Data", err.Error()) + diveContext.FatalError("failed to get service data", err.Error()) } } else if chains.chainBServiceName == "" { chainAserviceresponse, OK := serviceConfig[chains.chainAServiceName] if !OK { - diveContext.FatalError("Failed To Get Service Data", fmt.Sprint("service name not found:", chains.chainAServiceName)) + diveContext.FatalError("failed to get service data", fmt.Sprint("service name not found:", chains.chainAServiceName)) } chainAServiceName = chainAserviceresponse.ServiceName @@ -183,14 +190,14 @@ func btpBridgeCmd(diveContext *common.DiveContext) *cobra.Command { chainAServiceResponse, err = chainAserviceresponse.EncodeToString() if err != nil { - diveContext.FatalError("Failed To Get Service Data", err.Error()) + diveContext.FatalError("failed to get service data", err.Error()) } response := runChain[chains.chainB](diveContext) chainBServiceName = response.ServiceName chainBServiceResponse, err = response.EncodeToString() if err != nil { - diveContext.FatalError("Failed To Get Service Data", err.Error()) + diveContext.FatalError("failed to get service data", err.Error()) } } @@ -285,7 +292,7 @@ func (chains *Chains) getServicesResponse() (string, string, error) { if !OK { return "", "", fmt.Errorf("service name not found") } - chainBServiceResponse, OK := serviceConfig[chains.chainAServiceName] + chainBServiceResponse, OK := serviceConfig[chains.chainBServiceName] if !OK { return "", "", fmt.Errorf("service name not found") } diff --git a/cli/common/constants.go b/cli/common/constants.go index 533162d3..f7f341f7 100644 --- a/cli/common/constants.go +++ b/cli/common/constants.go @@ -3,7 +3,7 @@ package common var DiveLogs bool // !!!!!!!!!!! DO NOT UPDATE! WILL BE UPDATED DURING THE RELEASE PROCESS !!!!!!!!!!!!!!!!!!!!!! -var DiveVersion = "v0.0.5-beta" +var DiveVersion = "v0.0.6-beta" const ( DiveEnclave = "dive"