mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
parent
20a27f1eb0
commit
43f06f0705
6
Cargo.lock
generated
6
Cargo.lock
generated
@ -220,9 +220,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base64"
|
name = "base64"
|
||||||
version = "0.20.0"
|
version = "0.21.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5"
|
checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bdk"
|
name = "bdk"
|
||||||
@ -4022,7 +4022,7 @@ dependencies = [
|
|||||||
"async-trait",
|
"async-trait",
|
||||||
"atty",
|
"atty",
|
||||||
"backoff",
|
"backoff",
|
||||||
"base64 0.20.0",
|
"base64 0.21.0",
|
||||||
"bdk",
|
"bdk",
|
||||||
"big-bytes",
|
"big-bytes",
|
||||||
"bitcoin",
|
"bitcoin",
|
||||||
|
@ -14,7 +14,7 @@ async-compression = { version = "0.3", features = [ "bzip2", "tokio" ] }
|
|||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
atty = "0.2"
|
atty = "0.2"
|
||||||
backoff = { version = "0.4", features = [ "tokio" ] }
|
backoff = { version = "0.4", features = [ "tokio" ] }
|
||||||
base64 = "0.20"
|
base64 = "0.21"
|
||||||
bdk = "0.25"
|
bdk = "0.25"
|
||||||
big-bytes = "1"
|
big-bytes = "1"
|
||||||
bitcoin = { version = "0.29", features = [ "rand", "serde" ] }
|
bitcoin = { version = "0.29", features = [ "rand", "serde" ] }
|
||||||
|
@ -187,6 +187,9 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn seed_from_pem_works() {
|
fn seed_from_pem_works() {
|
||||||
|
use base64::engine::general_purpose;
|
||||||
|
use base64::Engine;
|
||||||
|
|
||||||
let payload: &str = "syl9wSYaruvgxg9P5Q1qkZaq5YkM6GvXkxe+VYrL/XM=";
|
let payload: &str = "syl9wSYaruvgxg9P5Q1qkZaq5YkM6GvXkxe+VYrL/XM=";
|
||||||
|
|
||||||
// 32 bytes base64 encoded.
|
// 32 bytes base64 encoded.
|
||||||
@ -195,7 +198,7 @@ syl9wSYaruvgxg9P5Q1qkZaq5YkM6GvXkxe+VYrL/XM=
|
|||||||
-----END SEED-----
|
-----END SEED-----
|
||||||
";
|
";
|
||||||
|
|
||||||
let want = base64::decode(payload).unwrap();
|
let want = general_purpose::STANDARD.decode(payload).unwrap();
|
||||||
let pem = pem::parse(pem_string).unwrap();
|
let pem = pem::parse(pem_string).unwrap();
|
||||||
let got = Seed::from_pem(pem).unwrap();
|
let got = Seed::from_pem(pem).unwrap();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user