Closed vldkhh closed 11 months ago
@L03TJ3 this is a bug, because we no longer listen to "withdraw" events of payment links. as we rely on the TX history from the explorers API. The explorer API is only able to give us TX the user did, but the withdraw is done by the recipient.
We need to also query the logs for withdraw from the explorers API
https://docs.blockscout.com/for-users/api/rpc-endpoints/logs
https://docs.celoscan.io/api-endpoints/logs
The logs needs to be filtered with the "from" equal to the user (ie sender)
event PaymentWithdraw(
address indexed from,
address indexed to,
address indexed paymentId,
uint256 amount
);
Thats means that topic0 should equal the event hash 0x39ca68a9f5d8038e871ef25a6622a56579cda4a6eedf63813574d23652e94048
and topic1 should equal the bytes32 padded address of the user. see fo example:
@L03TJ3 it still shows as pending
@vldkhh did you test it with a new payment? or are you looking at an older one?
verified on prod
@L03TJ3 please re-check this, looks like latest fixes broke something. It still reproduces with send via link Private Zenhub Image
@vldkhh i dont understand the image. Also please describe the exact flow to reproduce and explain the new issue, because from what I understand the previous flow you described is fixed, but now you experience something new.
@sirpy The flow is the same as described above. Completed Payment feed card showing as pending after executing the TX. And it reproduces only with the "SEND via LINK" method. It was fixed last week but not it still showing as pending for me
Steps: 1) send a tx via Link from 1st to 2nd account 2) open the payment link via 2nd account 3) observe the result for both accounts
Expected: The feed tx card is showing as pending on the account who sent the amount Actual: The feed tx card showing as completed on the account who received the amount
@sirpy
@L03TJ3 vlad is now showing that regular payment links are not being updated, you shared a video of a receive link. That suggests that the update you did for checking withdraw events is not fully working, or has some kind of a bug. Please debug it.
@sirpy yes placed the vid on wrong ticket
looks like it was a cache issue, it working fine now
[BUG] Completed Payment feed card showing as pending after executing the TX
Also reproduced on prod!
Preconditions: 2 accounts available
Steps: 1) send a tx from 1st to 2nd account 2) open the payment link via 2nd account 3) observe the result for both accounts
Actual result: The feed tx card is showing as pending on the account who sent the amount The feed tx card showing as completed on the account who received the amount
Expected result: The feed tx cards show as red and green after executing the payment for both accounts
Env: dev.gooddollar.org 2.25.0
Device: Windows 10 // Google Chrome
Attachments:
Private Zenhub Video
Private Zenhub Image