Skip to content

Commit

Permalink
Update bip322
Browse files Browse the repository at this point in the history
  • Loading branch information
raphjaph committed Oct 19, 2024
1 parent f635306 commit bd64ae3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 70 deletions.
81 changes: 15 additions & 66 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async-trait = "0.1.72"
axum = { version = "0.6.1", features = ["http2"] }
axum-server = "0.5.0"
base64 = "0.22.0"
bip322 = "0.0.7"
bip322 = { version = "0.0.8", path = "../bip322" }
bip39 = "2.0.0"
bitcoin = { version = "0.32.3", features = ["rand"] }
bitcoincore-rpc = "0.19.0"
Expand Down
6 changes: 3 additions & 3 deletions src/subcommand/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1177,13 +1177,13 @@ impl Server {
Ok(if accept_json && server_config.index_signals {
let Some(address) = index
.get_output_info(utxo_signal.outpoint)?
.and_then(|(a, b)| a.address)
.and_then(|(a, _)| a.address)
else {
return Ok(StatusCode::NOT_FOUND.into_response());
};

let message = utxo_signal.signal.message;
let signature = utxo_signal.signal.signature;
let message = utxo_signal.signal.message.clone();
let signature = utxo_signal.signal.signature.clone();

if bip322::verify_simple(&address.assume_checked(), message.as_slice(), signature).is_ok() {
Json(index.set_signal(utxo_signal.outpoint, utxo_signal.signal)?).into_response()
Expand Down

0 comments on commit bd64ae3

Please sign in to comment.