From ea02c76261852d9be95285829028713838c6a1a9 Mon Sep 17 00:00:00 2001 From: Chase Fleming <1666730+chasefleming@users.noreply.github.com> Date: Mon, 16 Sep 2024 09:50:11 -0700 Subject: [PATCH] Remove previewnet on dependency manager --- .../dependencymanager/dependencyinstaller.go | 18 +++++------------- .../dependencyinstaller_test.go | 14 ++++++-------- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/internal/dependencymanager/dependencyinstaller.go b/internal/dependencymanager/dependencyinstaller.go index 5fb562bd3..d6c3b63ac 100644 --- a/internal/dependencymanager/dependencyinstaller.go +++ b/internal/dependencymanager/dependencyinstaller.go @@ -132,16 +132,10 @@ func NewDependencyInstaller(logger output.Logger, state *flowkit.State, saveStat return nil, fmt.Errorf("error creating mainnet gateway: %v", err) } - previewnetGateway, err := gateway.NewGrpcGateway(config.PreviewnetNetwork) - if err != nil { - return nil, fmt.Errorf("error creating previewnet gateway: %v", err) - } - gateways := map[string]gateway.Gateway{ - config.EmulatorNetwork.Name: emulatorGateway, - config.TestnetNetwork.Name: testnetGateway, - config.MainnetNetwork.Name: mainnetGateway, - config.PreviewnetNetwork.Name: previewnetGateway, + config.EmulatorNetwork.Name: emulatorGateway, + config.TestnetNetwork.Name: testnetGateway, + config.MainnetNetwork.Name: mainnetGateway, } return &DependencyInstaller{ @@ -508,11 +502,9 @@ func (di *DependencyInstaller) updateDependencyAlias(contractName, aliasNetwork switch aliasNetwork { case config.MainnetNetwork.Name: - missingNetworks = []string{config.TestnetNetwork.Name, config.PreviewnetNetwork.Name} + missingNetworks = []string{config.TestnetNetwork.Name} case config.TestnetNetwork.Name: - missingNetworks = []string{config.MainnetNetwork.Name, config.PreviewnetNetwork.Name} - case config.PreviewnetNetwork.Name: - missingNetworks = []string{config.MainnetNetwork.Name, config.TestnetNetwork.Name} + missingNetworks = []string{config.MainnetNetwork.Name} } for _, missingNetwork := range missingNetworks { diff --git a/internal/dependencymanager/dependencyinstaller_test.go b/internal/dependencymanager/dependencyinstaller_test.go index 5f89d597d..6850f2d7d 100644 --- a/internal/dependencymanager/dependencyinstaller_test.go +++ b/internal/dependencymanager/dependencyinstaller_test.go @@ -70,10 +70,9 @@ func TestDependencyInstallerInstall(t *testing.T) { di := &DependencyInstaller{ Gateways: map[string]gateway.Gateway{ - config.EmulatorNetwork.Name: gw.Mock, - config.TestnetNetwork.Name: gw.Mock, - config.MainnetNetwork.Name: gw.Mock, - config.PreviewnetNetwork.Name: gw.Mock, + config.EmulatorNetwork.Name: gw.Mock, + config.TestnetNetwork.Name: gw.Mock, + config.MainnetNetwork.Name: gw.Mock, }, Logger: logger, State: state, @@ -118,10 +117,9 @@ func TestDependencyInstallerAdd(t *testing.T) { di := &DependencyInstaller{ Gateways: map[string]gateway.Gateway{ - config.EmulatorNetwork.Name: gw.Mock, - config.TestnetNetwork.Name: gw.Mock, - config.MainnetNetwork.Name: gw.Mock, - config.PreviewnetNetwork.Name: gw.Mock, + config.EmulatorNetwork.Name: gw.Mock, + config.TestnetNetwork.Name: gw.Mock, + config.MainnetNetwork.Name: gw.Mock, }, Logger: logger, State: state,