Skip to content

Commit

Permalink
Merge pull request #8 from DanGould/rust-bitcoin-v0.29
Browse files Browse the repository at this point in the history
Upgrade bitcoin v0.29
  • Loading branch information
Kixunil authored Oct 18, 2022
2 parents 6a617b2 + 5b23ade commit 846c7c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ non-compliant-bytes = ["either"]
[dependencies]
either = { version = "1.6.1", optional = true }
percent-encoding-rfc3986 = "0.1.3"
bitcoin = "0.27.1"
bitcoin = "0.29.0"
8 changes: 2 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,7 @@ mod tests {
#[allow(clippy::inconsistent_digit_grouping)] // Use sats/bitcoin when grouping.
#[test]
fn request_20_point_30_btc_to_luke_dash_jr() {
// See https://github.com/rust-bitcoin/rust-bitcoin/issues/709
// let input = "bitcoin:1andreas3batLhQa2FawWjeyjCqyBzypd?amount=20.3&label=Luke-Jr";
let input = "bitcoin:1andreas3batLhQa2FawWjeyjCqyBzypd?amount=20.30000000&label=Luke-Jr";
let input = "bitcoin:1andreas3batLhQa2FawWjeyjCqyBzypd?amount=20.3&label=Luke-Jr";
let uri = input.parse::<Uri<'_>>().unwrap();
let label: Cow<'_, str> = uri.label.clone().unwrap().try_into().unwrap();
assert_eq!(uri.address.to_string(), "1andreas3batLhQa2FawWjeyjCqyBzypd");
Expand All @@ -374,9 +372,7 @@ mod tests {
#[allow(clippy::inconsistent_digit_grouping)] // Use sats/bitcoin when grouping.
#[test]
fn request_50_btc_with_message() {
// See https://github.com/rust-bitcoin/rust-bitcoin/issues/709
// let input = "bitcoin:1andreas3batLhQa2FawWjeyjCqyBzypd?amount=50&label=Luke-Jr&message=Donation%20for%20project%20xyz";
let input = "bitcoin:1andreas3batLhQa2FawWjeyjCqyBzypd?amount=50.00000000&label=Luke-Jr&message=Donation%20for%20project%20xyz";
let input = "bitcoin:1andreas3batLhQa2FawWjeyjCqyBzypd?amount=50&label=Luke-Jr&message=Donation%20for%20project%20xyz";
let uri = input.parse::<Uri<'_>>().unwrap();
let label: Cow<'_, str> = uri.label.clone().unwrap().try_into().unwrap();
let message: Cow<'_, str> = uri.message.clone().unwrap().try_into().unwrap();
Expand Down

0 comments on commit 846c7c5

Please sign in to comment.