From fb1bbe9c43db39d578914c1ee761d43301d1b05c Mon Sep 17 00:00:00 2001 From: danijelTxFusion Date: Tue, 5 Nov 2024 07:14:48 +0100 Subject: [PATCH] feat(accounts): rename `Transaction` method BREAKING CHANGE: Rename `Transaction.ToTransaction712` to `Transaction.ToTransaction`. --- accounts/types.go | 4 ++-- accounts/wallet_l2.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/accounts/types.go b/accounts/types.go index f4e4951..2885544 100644 --- a/accounts/types.go +++ b/accounts/types.go @@ -691,8 +691,8 @@ type Transaction struct { PaymasterParams *types.PaymasterParams `json:"paymasterParams,omitempty"` } -// ToTransaction712 transforms Transaction to types.Transaction. -func (t *Transaction) ToTransaction712(from common.Address) *types.Transaction { +// ToTransaction transforms Transaction to types.Transaction. +func (t *Transaction) ToTransaction(from common.Address) *types.Transaction { return &types.Transaction{ Nonce: t.Nonce, GasTipCap: t.GasTipCap, diff --git a/accounts/wallet_l2.go b/accounts/wallet_l2.go index 4067689..b67075c 100644 --- a/accounts/wallet_l2.go +++ b/accounts/wallet_l2.go @@ -341,7 +341,7 @@ func (w *WalletL2) PopulateTransaction(ctx context.Context, tx Transaction) (*ty if tx.Data == nil { tx.Data = hexutil.Bytes{} } - return tx.ToTransaction712(w.auth.From), nil + return tx.ToTransaction(w.auth.From), nil } // SignTransaction returns a signed transaction that is ready to be broadcast to