Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Jan 8, 2025
1 parent 341ff8e commit 5f5621b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ignite/cmd/scaffold_chain_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Read more about the assets.json at https://github.com/cosmos/chain-registry?tab=
return c
}

func scaffoldChainRegistryFiles(cmd *cobra.Command, args []string) error {
func scaffoldChainRegistryFiles(cmd *cobra.Command, _ []string) error {
session := cliui.New(cliui.StartSpinnerWithText(statusScaffolding))
defer session.End()

Expand Down
18 changes: 9 additions & 9 deletions ignite/services/scaffolder/chain_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (c chainJSON) SaveJSON(out string) error {
return err
}

return os.WriteFile(out, bz, 0o666)
return os.WriteFile(out, bz, 0o600)
}

// https://raw.githubusercontent.com/cosmos/chain-registry/master/assetlist.schema.json
Expand Down Expand Up @@ -156,7 +156,7 @@ func (c assetListJSON) SaveJSON(out string) error {
return err
}

return os.WriteFile(out, bz, 0o666)
return os.WriteFile(out, bz, 0o600)
}

// AddChainRegistryFiles generates the chain registry files in the scaffolded chains.
Expand Down Expand Up @@ -218,7 +218,7 @@ func (s Scaffolder) AddChainRegistryFiles(chain *chain.Chain, cfg *chainconfig.C
}
}

chainJson := chainJSON{
chainData := chainJSON{
ChainName: chain.Name(),
PrettyName: chain.Name(),
ChainType: DefaultChainType,
Expand Down Expand Up @@ -263,19 +263,19 @@ func (s Scaffolder) AddChainRegistryFiles(chain *chain.Chain, cfg *chainconfig.C
},
}

assetListJson := assetListJSON{
ChainName: chainJson.ChainName,
assetListData := assetListJSON{
ChainName: chainData.ChainName,
Assets: []asset{
{
Description: fmt.Sprintf("The native token of the %s chain", chainJson.ChainName),
Description: fmt.Sprintf("The native token of the %s chain", chainData.ChainName),
DenomUnits: []denomUnit{
{
Denom: defaultDenom,
Exponent: 0,
},
},
Base: defaultDenom,
Name: chainJson.ChainName,
Name: chainData.ChainName,
Symbol: strings.ToUpper(defaultDenom),
TypeAsset: "sdk.coin",
Socials: socials{
Expand All @@ -286,11 +286,11 @@ func (s Scaffolder) AddChainRegistryFiles(chain *chain.Chain, cfg *chainconfig.C
},
}

if err := chainJson.SaveJSON(chainFilename); err != nil {
if err := chainData.SaveJSON(chainFilename); err != nil {
return err
}

if err := assetListJson.SaveJSON(assetListFilename); err != nil {
if err := assetListData.SaveJSON(assetListFilename); err != nil {
return err
}

Expand Down

0 comments on commit 5f5621b

Please sign in to comment.