Skip to content

Commit

Permalink
fix(plugin): parsing of the regtest network
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Aug 29, 2024
1 parent 4666f25 commit 1465688
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion barq-plugin/src/methods/pay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ pub fn barq_pay(
// SAFETY: the plugin set always the network, otherwise is a bug
let router = Router::new(state.network.as_ref().unwrap());

// FIXME: the decodepay is deprecated, we should use `decode`.
let b11: Bolt11 = state
.call(
"decodepay",
Expand All @@ -127,7 +128,7 @@ pub fn barq_pay(
"bc" => Network::Bitcoin,
"tb" => Network::Testnet,
"tbs" => Network::Signet,
"bcrt" => Network::Signet,
"bcrt" => Network::Regtest,
_ => return Err(error!("Unknown currency: {}", b11.currency)),
};

Expand Down

0 comments on commit 1465688

Please sign in to comment.