@@ -135,10 +135,6 @@ export abstract class Transaction extends BaseTransaction {
135135 return this . _feePayerAddress ;
136136 }
137137
138- set feePayerAddress ( value : string ) {
139- this . _feePayerAddress = value ;
140- }
141-
142138 set transactionType ( transactionType : TransactionType ) {
143139 this . _type = transactionType ;
144140 }
@@ -235,15 +231,15 @@ export abstract class Transaction extends BaseTransaction {
235231 this . _rawTransaction = rawTxn ;
236232
237233 this . loadInputsAndOutputs ( ) ;
238- const authenticator = signedTxn . authenticator as any ;
234+ const authenticator = signedTxn . authenticator as TransactionAuthenticatorFeePayer ;
239235 this . _feePayerAddress = authenticator . fee_payer . address . toString ( ) ;
240- const senderSignature = Buffer . from ( authenticator . sender . signature . toUint8Array ( ) ) ;
241- this . addSenderSignature ( { pub : authenticator . sender . public_key . toString ( ) } , senderSignature ) ;
242- const feePayerSignature = Buffer . from ( authenticator . fee_payer . authenticator . signature . toUint8Array ( ) ) ;
243- this . addFeePayerSignature (
244- { pub : authenticator . fee_payer . authenticator . public_key . toString ( ) } ,
245- feePayerSignature
246- ) ;
236+ const senderAuthenticator = authenticator . sender as AccountAuthenticatorEd25519 ;
237+ const senderSignature = Buffer . from ( senderAuthenticator . signature . toUint8Array ( ) ) ;
238+ this . addSenderSignature ( { pub : senderAuthenticator . public_key . toString ( ) } , senderSignature ) ;
239+
240+ const feePayerAuthenticator = authenticator . fee_payer . authenticator as AccountAuthenticatorEd25519 ;
241+ const feePayerSignature = Buffer . from ( feePayerAuthenticator . signature . toUint8Array ( ) ) ;
242+ this . addFeePayerSignature ( { pub : feePayerAuthenticator . public_key . toString ( ) } , feePayerSignature ) ;
247243 } catch ( e ) {
248244 console . error ( 'invalid signed transaction' , e ) ;
249245 throw new Error ( 'invalid signed transaction' ) ;
@@ -312,6 +308,7 @@ export abstract class Transaction extends BaseTransaction {
312308 ! this . _senderSignature ||
313309 ! this . _senderSignature . publicKey ||
314310 ! this . _senderSignature . signature ||
311+ ! this . _feePayerSignature ||
315312 ! this . _feePayerSignature . publicKey ||
316313 ! this . _feePayerSignature . signature
317314 ) {
0 commit comments