Skip to content

Commit

Permalink
Fix issues #168, #199 (#201)
Browse files Browse the repository at this point in the history
* Better error for event parsin

* Format

* Added Osmosis-1
  • Loading branch information
Kayanski authored Sep 4, 2023
1 parent 93e5e0b commit 040cb04
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
4 changes: 1 addition & 3 deletions cw-orch-daemon/src/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,7 @@ impl Sender<All> {
let suggested_fee = parse_suggested_fee(&tx_response.raw_log);

let Some(new_fee) = suggested_fee else {
return Err(DaemonError::InsufficientFee(
tx_response.raw_log,
));
return Err(DaemonError::InsufficientFee(tx_response.raw_log));
};

// update the fee and try again
Expand Down
5 changes: 4 additions & 1 deletion packages/cw-orch-core/src/environment/index_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ impl IndexResponse for AppResponse {
}
}
}
Err(StdError::generic_err("missing "))
Err(StdError::generic_err(format!(
"missing combination (event: {}, attribute: {})",
event_type, attr_key
)))
}
}

Expand Down
6 changes: 1 addition & 5 deletions packages/cw-orch-fns-derive/src/execute_fns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ pub fn execute_fns_derive(input: DeriveInput) -> TokenStream {
let (maybe_into, entrypoint_msg_type, type_generics) =
process_impl_into(&input.attrs, name, input.generics);

let syn::Data::Enum(syn::DataEnum {
variants,
..
}) = input.data
else {
let syn::Data::Enum(syn::DataEnum { variants, .. }) = input.data else {
unimplemented!();
};

Expand Down
11 changes: 11 additions & 0 deletions packages/cw-orch-networks/src/networks/osmosis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ pub const OSMO_NETWORK: NetworkInfo = NetworkInfo {
coin_type: 118u32,
};

pub const OSMOSIS_1: ChainInfo = ChainInfo {
kind: ChainKind::Mainnet,
chain_id: "osmois-1",
gas_denom: "uosmo",
gas_price: 0.025,
grpc_urls: &["http://grpc.osmosis.zone:9090"],
network_info: OSMO_NETWORK,
lcd_url: None,
fcd_url: None,
};

pub const OSMO_5: ChainInfo = ChainInfo {
kind: ChainKind::Testnet,
chain_id: "osmo-test-5",
Expand Down

0 comments on commit 040cb04

Please sign in to comment.