Skip to content

Commit

Permalink
feat(accounts): rename Transaction method
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Rename `Transaction.ToTransaction712` to
`Transaction.ToTransaction`.
  • Loading branch information
danijelTxFusion committed Nov 5, 2024
1 parent df98211 commit fb1bbe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions accounts/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion accounts/wallet_l2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fb1bbe9

Please sign in to comment.