@@ -34,14 +34,21 @@ export class Transaction extends BaseTransaction {
3434 * @param coinConfig The coin configuration object
3535 * @param common network commons
3636 * @param serializedTx The serialized tx string with which to initialize the transaction
37+ * @param isFirstSigner whether the transaction is being signed by the first signer
3738 * @returns a new transaction object
3839 */
3940 public static fromSerialized (
4041 coinConfig : Readonly < CoinConfig > ,
4142 common : EthereumCommon ,
42- serializedTx : string
43+ serializedTx : string ,
44+ isFirstSigner ?: boolean
4345 ) : Transaction {
44- return new Transaction ( coinConfig , common , EthTransactionData . fromSerialized ( serializedTx , common ) . toJson ( ) ) ;
46+ return new Transaction (
47+ coinConfig ,
48+ common ,
49+ EthTransactionData . fromSerialized ( serializedTx , common ) . toJson ( ) ,
50+ isFirstSigner
51+ ) ;
4552 }
4653
4754 /**
@@ -50,19 +57,21 @@ export class Transaction extends BaseTransaction {
5057 * @param {Readonly<CoinConfig> } coinConfig
5158 * @param common the network commons
5259 * @param {TxData } txData The object transaction data or encoded transaction data
60+ * @param {boolean } isFirstSigner whether the transaction is being signed by the first signer
5361 */
54- constructor ( coinConfig : Readonly < CoinConfig > , common : EthereumCommon , txData ?: TxData ) {
62+ constructor ( coinConfig : Readonly < CoinConfig > , common : EthereumCommon , txData ?: TxData , isFirstSigner ?: boolean ) {
5563 super ( coinConfig ) ;
5664 this . _common = common ;
5765 if ( txData ) {
58- this . setTransactionData ( txData ) ;
66+ this . setTransactionData ( txData , isFirstSigner ) ;
5967 }
6068 }
6169
6270 /**
6371 * Set the transaction data
6472 *
6573 * @param {TxData } txData The transaction data to set
74+ * @param {boolean } isFirstSigner Whether the transaction is being signed by the first signer
6675 */
6776 setTransactionData ( txData : TxData , isFirstSigner ?: boolean ) : void {
6877 this . _transactionData = EthTransactionData . fromJson ( txData , this . _common ) ;
0 commit comments