From 13b456b639882882ac98bf99a1dd3b0c4d700276 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Tue, 23 Jan 2024 13:30:29 +0800 Subject: [PATCH] tweak --- bridge-history-api/internal/logic/l1_event_parser.go | 2 +- bridge-history-api/internal/logic/l2_event_parser.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bridge-history-api/internal/logic/l1_event_parser.go b/bridge-history-api/internal/logic/l1_event_parser.go index 03bd8ec3ec..352920b303 100644 --- a/bridge-history-api/internal/logic/l1_event_parser.go +++ b/bridge-history-api/internal/logic/l1_event_parser.go @@ -122,7 +122,7 @@ func (e *L1EventParser) ParseL1CrossChainEventLogs(ctx context.Context, logs []t return nil, nil, err } from := event.Sender.String() - if event.Sender.String() == e.cfg.GatewayRouterAddr { + if from == e.cfg.GatewayRouterAddr { tx, isPending, rpcErr := e.client.TransactionByHash(ctx, vlog.TxHash) if rpcErr != nil || isPending { log.Warn("Failed to get tx or the tx is still pending", "rpcErr", rpcErr, "isPending", isPending) diff --git a/bridge-history-api/internal/logic/l2_event_parser.go b/bridge-history-api/internal/logic/l2_event_parser.go index 28dc9428d9..6fb1bf574e 100644 --- a/bridge-history-api/internal/logic/l2_event_parser.go +++ b/bridge-history-api/internal/logic/l2_event_parser.go @@ -127,7 +127,7 @@ func (e *L2EventParser) ParseL2EventLogs(ctx context.Context, logs []types.Log, return nil, nil, err } from := event.Sender.String() - if event.Sender.String() == e.cfg.GatewayRouterAddr { + if from == e.cfg.GatewayRouterAddr { tx, isPending, rpcErr := e.client.TransactionByHash(ctx, vlog.TxHash) if err != nil || isPending { log.Warn("Failed to get tx or the tx is still pending", "rpcErr", rpcErr, "isPending", isPending)