Skip to content

Commit

Permalink
Merge pull request #49 from ChainSafe/41-at-web3zksyncts-the-method-e…
Browse files Browse the repository at this point in the history
…stimategasl1tol2-needs-the-sent-data-to-be-formatted-similar-to-the-formatting-done-at-estimategas

Tiny fix
  • Loading branch information
Muhammad-Altabba authored Sep 2, 2024
2 parents 2e7d928 + 0b1c91f commit 8de590d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/web3zksync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,10 @@ export class Web3ZkSync extends Web3.Web3 {
): web3Types.FormatType<Eip712TxData, typeof returnFormat> {
const tx = format(transactionSchema, transaction, returnFormat);

if (!tx.customData) {
if (!transaction.customData) {
return tx;
}
tx.type = web3Utils.toHex(EIP712_TX_TYPE);
const { customData } = transaction;
tx.eip712Meta = {
gasPerPubdata: web3Utils.toHex(customData?.gasPerPubdata ?? 0),
Expand Down

0 comments on commit 8de590d

Please sign in to comment.