Skip to content

Commit

Permalink
Fix Native Deposits matching
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsereda committed Mar 27, 2024
1 parent e6580ca commit 915782f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bridge_indexer/handlers/bridge_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from bridge_indexer.models import TezosWithdrawOperation

LAYERS_TIMESTAMP_GAP = timedelta(minutes=5)
LAYERS_TIMESTAMP_GAP_MIN = timedelta(seconds=7)
LAYERS_TIMESTAMP_GAP_MAX = timedelta(seconds=17)


class BridgeMatcher:
Expand Down Expand Up @@ -100,8 +102,10 @@ async def check_pending_etherlink_xtz_deposits():
l2_transaction=None,
l1_transaction__inbox_message_id__gt=0,
l1_transaction__ticket=l2_deposit.l2_token.ticket,
l1_transaction__timestamp__gt=l2_deposit.timestamp - LAYERS_TIMESTAMP_GAP,
l1_transaction__timestamp__lt=l2_deposit.timestamp + LAYERS_TIMESTAMP_GAP,
# l1_transaction__timestamp__gt=l2_deposit.timestamp - LAYERS_TIMESTAMP_GAP,
# l1_transaction__timestamp__lt=l2_deposit.timestamp + LAYERS_TIMESTAMP_GAP,
l1_transaction__timestamp__gt=l2_deposit.timestamp + LAYERS_TIMESTAMP_GAP_MIN,
l1_transaction__timestamp__lt=l2_deposit.timestamp + LAYERS_TIMESTAMP_GAP_MAX,
l1_transaction__l2_account=l2_deposit.l2_account,
l1_transaction__amount=l2_deposit.amount[:-12],
)
Expand Down

0 comments on commit 915782f

Please sign in to comment.