From 3165ef3c2206a368be5c0f66d75cdf2963eb9153 Mon Sep 17 00:00:00 2001 From: Chase Fleming <1666730+chasefleming@users.noreply.github.com> Date: Tue, 11 Jun 2024 10:09:59 -0700 Subject: [PATCH] Remove account from standard generate --- internal/super/generate.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/super/generate.go b/internal/super/generate.go index fc786c970..655c50484 100644 --- a/internal/super/generate.go +++ b/internal/super/generate.go @@ -110,7 +110,7 @@ func generateContract( state *flowkit.State, ) (result command.Result, err error) { generator := NewGenerator("", state, logger, false, true) - contract := Contract{Name: args[0], Account: args[0]} + contract := Contract{Name: args[0], Account: ""} err = generator.Create(TemplateMap{ContractType: []TemplateItem{contract}}) return nil, err } @@ -334,6 +334,8 @@ func (g *Generator) generate(templateType, templateName, name, account string, d return fmt.Errorf("invalid template type: %s", templateType) } + fmt.Println("account: ", account) + directoryWithBasePath := filepath.Join(rootDir, basePath, account) filenameWithBasePath := filepath.Join(rootDir, basePath, account, filename) relativeFilenameWithBasePath := filepath.Join(basePath, account, filename) @@ -381,6 +383,9 @@ func (g *Generator) generate(templateType, templateName, name, account string, d } if templateType == ContractType { + fmt.Println("directoryWithBasePath: ", directoryWithBasePath) + fmt.Println("filenameWithBasePath: ", filenameWithBasePath) + fmt.Println("relativeFilenameWithBasePath: ", relativeFilenameWithBasePath) err := g.updateContractsState(name, relativeFilenameWithBasePath) if err != nil { return err