-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Improve output when transfers are approved/cancelled and event data in sync #399
Conversation
IDXTransferApproval Possible State
IDXTransferApproval outer joined with TransferApprovalHistory Matrix
|
( | ||
and_(IDXTransferApproval.escrow_finished == True, | ||
IDXTransferApproval.transfer_approved == None, | ||
TransferApprovalHistory.operation_type == None), | ||
1 | ||
), # EscrowFinish(escrow_finished) | ||
( | ||
and_(IDXTransferApproval.transfer_approved == None, | ||
TransferApprovalHistory.operation_type == TransferApprovalOperationType.APPROVE.value), | ||
2 | ||
), # Approve(operation completed, event synchronizing) | ||
( | ||
IDXTransferApproval.transfer_approved == True, | ||
2 | ||
), # Approve(transferred) | ||
( | ||
and_(IDXTransferApproval.cancelled == None, | ||
TransferApprovalHistory.operation_type == TransferApprovalOperationType.CANCEL.value), | ||
3 | ||
), # Cancel(operation completed, event synchronizing) | ||
( | ||
IDXTransferApproval.cancelled == True, | ||
3 | ||
), # Cancel(canceled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From this perspective found no problems. LGTM.
(It is more intuitive to match "transferred" event first.)
batch/indexer_transfer_approval.py
Outdated
import config | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be written after root path import.
close #390
The following modifications have been made to resolve #390 issues.
Please provide feedback.
transfer_approval_history
). The record is added only when the approval or cancellation is successful. Note that this TBL was converted from one that already existed and was not being used.