Showing 1,971 of 13,422 total issues
Function ConnectWalletButton
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ConnectWalletButton() {
const [clientReady, setClientReady] = useState<boolean>(false)
const { address } = useAccount()
const t = useTranslations('Wallet')
Method Guard.handleReceiptAccepted
has 18 return statements (exceeds 4 allowed). Open
Open
func (g Guard) handleReceiptAccepted(ctx context.Context, log ethTypes.Log) error {
fraudReceipt, err := g.inboxParser.ParseReceiptAccepted(log)
if err != nil {
return fmt.Errorf("could not parse receipt accepted: %w", err)
}
Method Executor.Execute
has 18 return statements (exceeds 4 allowed). Open
Open
func (e Executor) Execute(parentCtx context.Context, message types.Message) (_ bool, err error) {
originDomain := message.OriginDomain()
destinationDomain := message.DestinationDomain()
ctx, span := e.handler.Tracer().Start(parentCtx, "Execute", trace.WithAttributes(
Consider simplifying this complex logical expression. Open
Open
if coinGeckoID != "" && !(coinGeckoID == "xjewel" && *timeStamp < 1649030400) && !(coinGeckoID == "synapse-2" && *timeStamp < 1630281600) && !(coinGeckoID == "governance-ohm" && *timeStamp < 1638316800) && !(coinGeckoID == "highstreet" && *timeStamp < 1634263200) {
Function TestValidatePath
has 66 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func TestValidatePath(t *testing.T) {
// Create a temporary directory for testing
tmpDir := os.TempDir()
cacheDir := filepath.Join(tmpDir, "cache")
Method Relayer.runChainIndexer
has 66 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (r *Relayer) runChainIndexer(ctx context.Context, chainID int) (err error) {
chainListener := r.chainListeners[chainID]
parser, err := fastbridge.NewParser(chainListener.Address())
if err != nil {
Method BridgeParser.MatureLogs
has 66 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (p *BridgeParser) MatureLogs(ctx context.Context, bridgeEvent *model.BridgeEvent, iFace bridgeTypes.EventLog, chainID uint32) (interface{}, error) {
g, groupCtx := errgroup.WithContext(ctx)
var err error
var sender *string
var timeStamp *uint64
Method MessageBusParser.Parse
has 66 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (m *MessageBusParser) Parse(ctx context.Context, log ethTypes.Log, chainID uint32) (interface{}, error) {
logTopic := log.Topics[0]
iFace, err := func(log ethTypes.Log) (messageBusTypes.EventLog, error) {
switch logTopic {
case messagebus.Topic(messageBusTypes.ExecutedEvent):
Method ScribeSuite.TestSimulatedScribe
has 66 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (s *ScribeSuite) TestSimulatedScribe() {
if os.Getenv("CI") != "" {
s.T().Skip("Test flake: 20 sec of livefilling may fail on CI")
}
const numberOfContracts = 3
Function commify
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const commify = (value: string | number): string => {
const comps = String(value).split('.')
if (
comps.length > 2 ||
Function formatAmount
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatAmount = (
amount: string,
options?: FormatOptions
): string => {
if (amount === '') return ''
Function constructor
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor({
addresses,
wrapperAddresses,
decimals,
symbol,
Function getSynapsePauseData
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getSynapsePauseData = () => {
const fetchAndStoreData = async () => {
if (isFetching) {
return
}
Function ConnectWalletButton
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ConnectWalletButton() {
const [clientReady, setClientReady] = useState<boolean>(false)
const { address } = useAccount()
const t = useTranslations('Wallet')
Method queryResolver.LogsRange
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (r *queryResolver) LogsRange(ctx context.Context, contractAddress *string, chainID int, blockNumber *int, txHash *string, txIndex *int, blockHash *string, index *int, confirmed *bool, startBlock int, endBlock int, page int, asc *bool) ([]*model.Log, error) {
Method Guard.updateAgentStatus
has 65 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (g Guard) updateAgentStatus(ctx context.Context, chainID uint32) error {
eligibleAgentTrees, err := g.guardDB.GetRelayableAgentStatuses(ctx, chainID)
if err != nil {
return fmt.Errorf("could not get update agent status parameters: %w", err)
}
Function getChainBackfiller
has 65 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func getChainBackfiller(consumerDB db.ConsumerDB, chainConfig indexerConfig.ChainConfig, fetcher fetcherpkg.ScribeFetcher, client bind.ContractBackend, tokenDataService tokendata.Service, priceDataService tokenprice.Service) (*backfill.ChainBackfiller, error) {
var err error
var bridgeParser *parser.BridgeParser
var messageBusParser *parser.MessageBusParser
var cctpParser *parser.CCTPParser
Function use_TransactionsListener
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const use_TransactionsListener = () => {
const dispatch = useAppDispatch()
const { pendingBridgeTransactions } = useTransactionsState()
const { transactions } = use_TransactionsState()
const { address } = useAccount()
Function recentInvalidRelaysController
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const recentInvalidRelaysController = async (
req: Request,
res: Response
) => {
try {
Function Instructions
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function Instructions() {
return (
<article>
<h2>
<Install />