From 007140ca554c653b91628684808205530a5bb67d Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Sat, 29 May 2021 19:48:47 +0200 Subject: [PATCH] Fix issue with serializing tx with null type --- packages/transactions/src.ts/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/transactions/src.ts/index.ts b/packages/transactions/src.ts/index.ts index f5c433a9c4..8943e1921f 100644 --- a/packages/transactions/src.ts/index.ts +++ b/packages/transactions/src.ts/index.ts @@ -256,7 +256,8 @@ export function serialize(transaction: UnsignedTransaction, signature?: Signatur if (transaction.accessList != null) { logger.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction); } - return _serialize(transaction, signature); + const { type, ...nonTypedTransaction } = transaction; + return _serialize(nonTypedTransaction, signature); } // Typed Transactions (EIP-2718)