@@ -193,7 +193,6 @@ func (b *TransactionBodyBase) Utxorpc() *utxorpc.Tx {
193
193
// TransactionBodyToUtxorpc is a common helper for converting TransactionBody to utxorpc.Tx
194
194
func TransactionBodyToUtxorpc (tx TransactionBody ) * utxorpc.Tx {
195
195
txi := []* utxorpc.TxInput {}
196
- txri := []* utxorpc.TxInput {}
197
196
txo := []* utxorpc.TxOutput {}
198
197
for _ , i := range tx .Inputs () {
199
198
input := i .Utxorpc ()
@@ -206,24 +205,30 @@ func TransactionBodyToUtxorpc(tx TransactionBody) *utxorpc.Tx {
206
205
}
207
206
txo = append (txo , output )
208
207
}
209
- for _ , ri := range tx .ReferenceInputs () {
210
- input := ri .Utxorpc ()
211
- txri = append (txri , input )
212
- }
213
208
ret := & utxorpc.Tx {
214
209
Inputs : txi ,
215
210
Outputs : txo ,
216
- // Certificates: tx.Certificates(),
217
- // Withdrawals: tx.Withdrawals(),
218
- // Mint: tx.Mint(),
219
- ReferenceInputs : txri ,
220
- // Witnesses: tx.Witnesses(),
221
- // Collateral: tx.Collateral(),
211
+ // Certificates: tx.Certificates(),
212
+ // Withdrawals: tx.Withdrawals(),
213
+ // Mint: tx.Mint(),
214
+ // ReferenceInputs: tx.ReferenceInputs() ,
215
+ // Witnesses: tx.Witnesses(),
216
+ // Collateral: tx.Collateral(),
222
217
Fee : tx .Fee (),
223
- // Successful : tx.Successful (),
224
- // Auxiliary : tx.AuxData (),
225
- // Validity : tx.Validity (),
218
+ // Validity : tx.Validity (),
219
+ // Successful : tx.Successful (),
220
+ // Auxiliary : tx.AuxData (),
226
221
Hash : tx .Hash ().Bytes (),
222
+ // Proposals: tx.ProposalProcedures(),
223
+ }
224
+ for _ , ri := range tx .ReferenceInputs () {
225
+ input := ri .Utxorpc ()
226
+ ret .ReferenceInputs = append (ret .ReferenceInputs , input )
227
227
}
228
+ for _ , c := range tx .Certificates () {
229
+ cert := c .Utxorpc ()
230
+ ret .Certificates = append (ret .Certificates , cert )
231
+ }
232
+
228
233
return ret
229
234
}
0 commit comments