File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ impl TransactionOutput {
4848 }
4949 }
5050
51+ pub fn set_address ( & mut self , new_address : Address ) {
52+ match self {
53+ Self :: AlonzoFormatTxOut ( tx_out) => tx_out. address = new_address,
54+ Self :: ConwayFormatTxOut ( tx_out) => tx_out. address = new_address,
55+ }
56+ }
57+
5158 pub fn amount ( & self ) -> & Value {
5259 match self {
5360 Self :: AlonzoFormatTxOut ( tx_out) => & tx_out. amount ,
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ impl TransactionOutput {
3131 self . 0 . address ( ) . clone ( ) . into ( )
3232 }
3333
34+ pub fn set_address ( & mut self , addr : & Address ) {
35+ self . 0 . set_address ( addr. clone ( ) . into ( ) )
36+ }
37+
3438 pub fn amount ( & self ) -> Value {
3539 self . 0 . amount ( ) . clone ( ) . into ( )
3640 }
You can’t perform that action at this time.
0 commit comments