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 {
48
48
}
49
49
}
50
50
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
+
51
58
pub fn amount ( & self ) -> & Value {
52
59
match self {
53
60
Self :: AlonzoFormatTxOut ( tx_out) => & tx_out. amount ,
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ impl TransactionOutput {
31
31
self . 0 . address ( ) . clone ( ) . into ( )
32
32
}
33
33
34
+ pub fn set_address ( & mut self , addr : & Address ) {
35
+ self . 0 . set_address ( addr. clone ( ) . into ( ) )
36
+ }
37
+
34
38
pub fn amount ( & self ) -> Value {
35
39
self . 0 . amount ( ) . clone ( ) . into ( )
36
40
}
You can’t perform that action at this time.
0 commit comments