Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhea committed May 6, 2024
1 parent fb727b1 commit 60471c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bindings/hyperdrivepy/src/hyperdrive_state_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ impl HyperdriveState {
let (result_fp1, result_fp2, result_fp3) = self
.state
.calculate_pool_deltas_after_add_liquidity(contribution_fp, true)
.unwrap();
.map_err(|err| {
PyErr::new::<PyValueError, _>(format!(
"calculate_pool_deltas_after_add_liquidity returned the error: {:?}",
err
))
})?;
let result1 = U256::from(result_fp1).to_string();
let result2 = I256::from(result_fp2).to_string();
let result3 = U256::from(result_fp3).to_string();
Expand Down

0 comments on commit 60471c9

Please sign in to comment.