Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wasm): fix the wasm config path #134

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading