Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthpun committed Jan 17, 2024
1 parent 1aad1cb commit 60627b8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions internal/config/add-contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (
)

type flagsAddContract struct {
Name string `flag:"name" info:"Name of the contract"`
Filename string `flag:"filename" info:"Filename of the contract source"`
EmulatorAlias string `flag:"emulator-alias" info:"Address for the emulator alias"`
TestnetAlias string `flag:"testnet-alias" info:"Address for the testnet alias"`
MainnetAlias string `flag:"mainnet-alias" info:"Address for the mainnet alias"`
Name string `flag:"name" info:"Name of the contract"`
Filename string `flag:"filename" info:"Filename of the contract source"`
EmulatorAlias string `flag:"emulator-alias" info:"Address for the emulator alias"`
TestnetAlias string `flag:"testnet-alias" info:"Address for the testnet alias"`
MainnetAlias string `flag:"mainnet-alias" info:"Address for the mainnet alias"`
CrescendoAlias string `flag:"crescendo-alias" info:"Address for the crescendo alias"`
}

Expand Down Expand Up @@ -148,11 +148,11 @@ func flagsToContractData(flags flagsAddContract) (*util.ContractData, bool, erro
}

return &util.ContractData{
Name: flags.Name,
Source: flags.Filename,
Emulator: flags.EmulatorAlias,
Testnet: flags.TestnetAlias,
Mainnet: flags.MainnetAlias,
Name: flags.Name,
Source: flags.Filename,
Emulator: flags.EmulatorAlias,
Testnet: flags.TestnetAlias,
Mainnet: flags.MainnetAlias,
Crescendo: flags.CrescendoAlias,
}, true, nil
}
2 changes: 1 addition & 1 deletion internal/transactions/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,5 @@ func parseAddress(value string) (flowsdk.Address, bool) {
return address, address.IsValid(flowsdk.Mainnet) ||
address.IsValid(flowsdk.Testnet) ||
address.IsValid(flowsdk.Emulator)
//|| address.IsValid(flowsdk.Crescendo) //TODO: add crescendo, it is missing in flowsdk
//|| address.IsValid(flowsdk.Crescendo) //TODO: add crescendo, it is missing in flowsdk
}
16 changes: 8 additions & 8 deletions internal/util/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,11 @@ func NewAccountPrompt() *AccountData {
}

type ContractData struct {
Name string
Source string
Emulator string
Testnet string
Mainnet string
Name string
Source string
Emulator string
Testnet string
Mainnet string
Crescendo string
}

Expand Down Expand Up @@ -624,9 +624,9 @@ func ReportCrash() bool {

func CreateAccountNetworkPrompt() (string, config.Network) {
networkMap := map[string]config.Network{
"Emulator": config.EmulatorNetwork,
"Testnet": config.TestnetNetwork,
"Mainnet": config.MainnetNetwork,
"Emulator": config.EmulatorNetwork,
"Testnet": config.TestnetNetwork,
"Mainnet": config.MainnetNetwork,
"Crescendo": config.CrescendoNetwork,
}

Expand Down

0 comments on commit 60627b8

Please sign in to comment.