Skip to content

Commit

Permalink
Nicolas/orc 130 orchestrator chainname panic (#395)
Browse files Browse the repository at this point in the history
* No panic

* Version change

* Fix

* Applied nit

* Clippy
  • Loading branch information
Kayanski authored May 15, 2024
1 parent 7613822 commit 33de752
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Added a test to make sure the derive macros stay compatible with new cw-orch versions
- Changed the derive macros import from cw_orch to cw_orch_core. This allows changing the cw-orch API without breaking the derive macros.
- Cw-orch mock env info doesn't error when using chain ids that don't match the `osmosis-1` pattern

### Breaking

Expand Down
2 changes: 1 addition & 1 deletion packages/cw-orch-mock/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cw-orch-mock"
version = "0.22.0"
version = "0.22.2"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion packages/cw-orch-mock/src/queriers/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ impl<A: Api, S: StateInterface> EnvironmentQuerier for MockBase<A, S> {
fn env_info(&self) -> EnvironmentInfo {
let block_info = self.block_info().unwrap();
let chain_id = block_info.chain_id.clone();
let chain_name = chain_id.rsplitn(2, '-').collect::<Vec<_>>()[1].to_string();
let chain_name = chain_id.rsplitn(2, '-').last().unwrap().to_string();

EnvironmentInfo {
chain_id,
chain_name,
Expand Down

0 comments on commit 33de752

Please sign in to comment.