Skip to content

Commit bc10401

Browse files
committed
psbt: add AddressNetwork to PsbtMeta
1 parent 28ffbe6 commit bc10401

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

psbt/src/constructor.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ use std::num::ParseIntError;
2424
use std::str::FromStr;
2525

2626
use derive::{
27-
Address, AddressParseError, Keychain, LockTime, Network, NormalIndex, Outpoint, Sats,
28-
ScriptPubkey, SeqNo, Terminal, Vout,
27+
Address, AddressNetwork, AddressParseError, Keychain, LockTime, Network, NormalIndex, Outpoint,
28+
Sats, ScriptPubkey, SeqNo, Terminal, Vout,
2929
};
3030
use descriptors::Descriptor;
3131

@@ -183,6 +183,7 @@ pub struct ChangeInfo {
183183

184184
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
185185
pub struct PsbtMeta {
186+
pub network: AddressNetwork,
186187
pub fee: Sats,
187188
pub weight: u32,
188189
pub size: u32,
@@ -300,6 +301,7 @@ pub trait PsbtConstructor {
300301
};
301302

302303
let meta = PsbtMeta {
304+
network: self.network().into(),
303305
fee: params.fee,
304306
weight: 0, // TODO: Implement weight/size computation
305307
size: 0,

0 commit comments

Comments
 (0)