Skip to content
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: escrow detector class #773

Merged
merged 35 commits into from Mar 10, 2022
Merged

feat: escrow detector class #773

merged 35 commits into from Mar 10, 2022

Conversation

KolevDarko
Copy link
Contributor

@KolevDarko KolevDarko commented Feb 14, 2022

Detection of Escrow events from the graph

There is not separate payment network for Escrow because escrow is just an intermediary phase of the existing payment networks, but currently Escrow is only implemented for ERC20FeeProxy PN.

The way escrow detection works is we get the escrow events from the graph, together with our payment/refund events.

Then the balance object returned from getBalance function in our Payment detectors contains an additional array called escrowEvents.

There are changes in multiple files here because the return type of getTransferEvents() and getEvents() was previously just an array of payment events, but now it is an object with two arrays:
{ paymentEvents: [], escrowEvents: [] }

@benjlevesque benjlevesque changed the title feat: Ivo escrow detector class feat: escrow detector class Feb 14, 2022
@coveralls
Copy link

coveralls commented Feb 17, 2022

Coverage Status

Coverage remained the same at 87.842% when pulling a4afa0f on ivo-escrow-detector-class into 04d99ff on master.

packages/payment-detection/src/eth/input-data.ts Outdated Show resolved Hide resolved
packages/payment-detection/src/eth/input-data.ts Outdated Show resolved Hide resolved
packages/payment-detection/src/eth/input-data.ts Outdated Show resolved Hide resolved
packages/payment-detection/src/near-detector.ts Outdated Show resolved Hide resolved
packages/payment-detection/src/eth/input-data.ts Outdated Show resolved Hide resolved
packages/payment-detection/src/eth/input-data.ts Outdated Show resolved Hide resolved
packages/payment-detection/src/eth/input-data.ts Outdated Show resolved Hide resolved
packages/payment-detection/src/erc20/custom-detector.ts Outdated Show resolved Hide resolved
packages/request-client.js/src/api/request.ts Outdated Show resolved Hide resolved
packages/request-client.js/src/api/escrow.ts Outdated Show resolved Hide resolved
packages/request-client.js/src/api/escrow.ts Outdated Show resolved Hide resolved
@KolevDarko KolevDarko merged commit c4c2276 into master Mar 10, 2022
@KolevDarko KolevDarko deleted the ivo-escrow-detector-class branch March 10, 2022 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants