Skip to content

Commit

Permalink
Remove account from standard generate
Browse files Browse the repository at this point in the history
  • Loading branch information
chasefleming committed Jun 11, 2024
1 parent b230940 commit 3165ef3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/super/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3165ef3

Please sign in to comment.