Skip to content

Commit

Permalink
Rename function for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
piersy committed Jul 5, 2024
1 parent 81f4f2e commit 80be3da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/types/celo_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"github.com/ethereum/go-ethereum/common/exchange"
)

// CeloLegacy returns true if the transaction is a legacy celo transaction.
// IsCeloLegacy returns true if the transaction is a legacy celo transaction.
// I.E. it has the fields feeCurrency, gatewayFee and gatewayFeeRecipient.
func (tx *Transaction) CeloLegacy() bool {
func (tx *Transaction) IsCeloLegacy() bool {
switch t := tx.inner.(type) {
case *LegacyTx:
return t.CeloLegacy
Expand Down
4 changes: 2 additions & 2 deletions core/types/celo_transaction_signing_forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (c *cel2) equal(other fork) bool {
func (c *cel2) txFuncs(tx *Transaction) *txFuncs {
t := tx.Type()
switch {
case t == LegacyTxType && tx.CeloLegacy():
case t == LegacyTxType && tx.IsCeloLegacy():
return deprecatedTxFuncs
case t == CeloDenominatedTxType:
return deprecatedTxFuncs
Expand Down Expand Up @@ -92,7 +92,7 @@ func (c *celoLegacy) equal(other fork) bool {
func (c *celoLegacy) txFuncs(tx *Transaction) *txFuncs {
t := tx.Type()
switch {
case t == uint8(LegacyTxType) && tx.CeloLegacy():
case t == uint8(LegacyTxType) && tx.IsCeloLegacy():
if tx.Protected() {
return celoLegacyProtectedTxFuncs
}
Expand Down

0 comments on commit 80be3da

Please sign in to comment.