Skip to content

Commit

Permalink
fix(wasm): fix the wasm config path (#134)
Browse files Browse the repository at this point in the history
* fix the app config toml

* add changelog
  • Loading branch information
Pantani authored Sep 12, 2024
1 parent dae5643 commit 003d645
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions wasm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

## [`v0.2.1`](https://github.com/ignite/apps/releases/tag/wasm/v0.2.1)

### Fixes

* [#134](https://github.com/ignite/apps/pull/134) Fix the wasm config path

## [`v0.2.0`](https://github.com/ignite/apps/releases/tag/wasm/v0.2.0)

### Features
Expand Down
6 changes: 3 additions & 3 deletions wasm/services/scaffolder/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ func (s Scaffolder) AddWasm(
return xgenny.SourceModification{}, err
}

configTOML, err := s.chain.ConfigTOMLPath()
appTOMLPath, err := s.chain.AppTOMLPath()
if err != nil {
return xgenny.SourceModification{}, err
}
if _, err := os.Stat(configTOML); os.IsNotExist(err) {
if _, err := os.Stat(appTOMLPath); os.IsNotExist(err) {
s.session.Printf(`Cannot find the chain config. If the chain %[1]v is not initialized yet, run "%[1]vd init" or "ignite chain serve" to init the chain.
After, run the "ignite wasm config" command to add the wasm config
Expand All @@ -115,7 +115,7 @@ After, run the "ignite wasm config" command to add the wasm config
} else if err == nil {
// Add wasm options to the chain config.
if err := config.AddWasm(
configTOML,
appTOMLPath,
config.WithSimulationGasLimit(scaffoldingOpts.simulationGasLimit),
config.WithSmartQueryGasLimit(scaffoldingOpts.smartQueryGasLimit),
config.WithMemoryCacheSize(scaffoldingOpts.memoryCacheSize),
Expand Down

0 comments on commit 003d645

Please sign in to comment.