@@ -605,15 +605,15 @@ impl From<&BdkTxIn> for TxIn {
605605#[ derive( Debug , Clone , uniffi:: Record ) ]
606606pub struct TxOut {
607607 /// The value of the output, in satoshis.
608- pub value : u64 ,
608+ pub value : Arc < Amount > ,
609609 /// The script which must be satisfied for the output to be spent.
610610 pub script_pubkey : Arc < Script > ,
611611}
612612
613613impl From < & BdkTxOut > for TxOut {
614614 fn from ( tx_out : & BdkTxOut ) -> Self {
615615 TxOut {
616- value : tx_out. value . to_sat ( ) ,
616+ value : Arc :: new ( Amount ( tx_out. value ) ) ,
617617 script_pubkey : Arc :: new ( Script ( tx_out. script_pubkey . clone ( ) ) ) ,
618618 }
619619 }
@@ -622,7 +622,7 @@ impl From<&BdkTxOut> for TxOut {
622622impl From < BdkTxOut > for TxOut {
623623 fn from ( tx_out : BdkTxOut ) -> Self {
624624 Self {
625- value : tx_out. value . to_sat ( ) ,
625+ value : Arc :: new ( Amount ( tx_out. value ) ) ,
626626 script_pubkey : Arc :: new ( Script ( tx_out. script_pubkey ) ) ,
627627 }
628628 }
@@ -631,7 +631,7 @@ impl From<BdkTxOut> for TxOut {
631631impl From < TxOut > for BdkTxOut {
632632 fn from ( tx_out : TxOut ) -> Self {
633633 Self {
634- value : BdkAmount :: from_sat ( tx_out. value ) ,
634+ value : tx_out. value . 0 ,
635635 script_pubkey : tx_out. script_pubkey . 0 . clone ( ) ,
636636 }
637637 }
0 commit comments