Skip to content

Commit 805670d

Browse files
committed
fix bridge history GetL2UnclaimedWithdrawalsByAddress
1 parent 9dceae1 commit 805670d

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

bridge-history-api/internal/logic/history_logic.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ func (h *HistoryLogic) GetL2UnclaimedWithdrawalsByAddress(ctx context.Context, a
9797
return nil, 0, errors.New("unexpected error")
9898
}
9999

100+
if len(txHistoryInfos) == 0 {
101+
log.Error("failed to get L2 claimable withdrawals by address len = 0", "address", address)
102+
return nil, 0, errors.New("unexpected error")
103+
}
104+
100105
return h.processAndCacheTxHistoryInfo(ctx, cacheKey, txHistoryInfos, page, pageSize)
101106
}
102107

bridge-history-api/internal/orm/cross_message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (c *CrossMessage) GetL2UnclaimedWithdrawalsByAddress(ctx context.Context, s
157157
db = db.Where("tx_status in (?)", []types.TxStatusType{types.TxStatusTypeSent, types.TxStatusTypeFailedRelayed, types.TxStatusTypeRelayTxReverted})
158158
db = db.Where("sender = ?", sender)
159159
db = db.Order("block_timestamp desc")
160-
db = db.Limit(500)
160+
db = db.Limit(10000)
161161
if err := db.Find(&messages).Error; err != nil {
162162
return nil, fmt.Errorf("failed to get L2 claimable withdrawal messages by sender address, sender: %v, error: %w", sender, err)
163163
}

common/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"runtime/debug"
66
)
77

8-
var tag = "v4.7.1"
8+
var tag = "v4.7.2"
99

1010
var commit = func() string {
1111
if info, ok := debug.ReadBuildInfo(); ok {

0 commit comments

Comments
 (0)