Skip to content

Commit

Permalink
pcli: fix ics20 withdrawal timeout rounding (#4111)
Browse files Browse the repository at this point in the history
The rounding math was wrong previously (it wasn't actually rounding)
  • Loading branch information
avahowell authored Mar 27, 2024
1 parent 0505885 commit d17c4bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bin/pcli/src/command/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ impl TxCmd {
}

// round to the nearest 10 minutes
timeout_timestamp += timeout_timestamp % 600_000_000_000;
timeout_timestamp += 600_000_000_000 - (timeout_timestamp % 600_000_000_000);

fn parse_denom_and_amount(value_str: &str) -> anyhow::Result<(Amount, Metadata)> {
let denom_re = Regex::new(r"^([0-9.]+)(.+)$").context("denom regex invalid")?;
Expand Down

0 comments on commit d17c4bc

Please sign in to comment.