@@ -67,10 +67,10 @@ class LazyTxSigner implements UnsignedTx {
6767 async inspect ( ) : Promise < TxInspection > {
6868 const {
6969 tx,
70- ctx : { ownAddresses, auxiliaryData, handles } ,
70+ ctx : { ownAddresses, auxiliaryData, handleResolutions } ,
7171 inputSelection
7272 } = await this . #build( ) ;
73- return { ...tx , auxiliaryData, handles , inputSelection, ownAddresses } ;
73+ return { ...tx , auxiliaryData, handleResolutions , inputSelection, ownAddresses } ;
7474 }
7575
7676 async sign ( ) : Promise < SignedTx > {
@@ -89,7 +89,7 @@ export class GenericTxBuilder implements TxBuilder {
8989 #requestedPortfolio?: TxBuilderStakePool [ ] ;
9090 #logger: Logger ;
9191 #handleProvider?: HandleProvider ;
92- #handles : HandleResolution [ ] ;
92+ #handleResolutions : HandleResolution [ ] ;
9393
9494 constructor ( dependencies : TxBuilderDependencies ) {
9595 this . #outputValidator =
@@ -105,7 +105,7 @@ export class GenericTxBuilder implements TxBuilder {
105105 } ;
106106 this . #logger = dependencies . logger ;
107107 this . #handleProvider = dependencies . handleProvider ;
108- this . #handles = [ ] ;
108+ this . #handleResolutions = [ ] ;
109109 }
110110
111111 async inspect ( ) : Promise < PartialTx > {
@@ -118,16 +118,16 @@ export class GenericTxBuilder implements TxBuilder {
118118 }
119119
120120 addOutput ( txOut : OutputBuilderTxOut ) : TxBuilder {
121- if ( txOut . handle ) {
122- this . #handles = [ ...this . #handles , txOut . handle ] ;
121+ if ( txOut . handleResolution ) {
122+ this . #handleResolutions = [ ...this . #handleResolutions , txOut . handleResolution ] ;
123123 }
124- const txOutNoHandle = omit ( txOut , 'handle' ) ;
124+ const txOutNoHandle = omit ( txOut , [ 'handle' , 'handleResolution' ] ) ;
125125 this . partialTxBody = { ...this . partialTxBody , outputs : [ ...( this . partialTxBody . outputs || [ ] ) , txOutNoHandle ] } ;
126126 return this ;
127127 }
128128
129129 removeOutput ( txOut : OutputBuilderTxOut ) : TxBuilder {
130- this . #handles = this . #handles . filter ( ( handle ) => handle !== txOut . handle ) ;
130+ this . #handleResolutions = this . #handleResolutions . filter ( ( hndRes ) => hndRes . handle !== txOut . handle ) ;
131131 this . partialTxBody = {
132132 ...this . partialTxBody ,
133133 outputs : this . partialTxBody . outputs ?. filter ( ( output ) => ! deepEquals ( output , txOut ) )
@@ -215,7 +215,7 @@ export class GenericTxBuilder implements TxBuilder {
215215 {
216216 auxiliaryData,
217217 certificates : this . partialTxBody . certificates ,
218- handles : this . #handles ,
218+ handleResolutions : this . #handleResolutions ,
219219 outputs : new Set ( this . partialTxBody . outputs || [ ] ) ,
220220 signingOptions,
221221 witness : { extraSigners }
@@ -225,7 +225,7 @@ export class GenericTxBuilder implements TxBuilder {
225225 return {
226226 ctx : {
227227 auxiliaryData,
228- handles : this . #handles ,
228+ handleResolutions : this . #handleResolutions ,
229229 ownAddresses,
230230 signingOptions,
231231 witness : { extraSigners }
0 commit comments