Skip to content

Ensure Cause donation data sent to GIVbacks is of origin tx information #2211

@divine-comedian

Description

@divine-comedian

reported by @GriffGreen
When we donate to a cause we use squid router to swap and bridge the user's donation into GIV on Polygon.

However the donation data that we use for GIVbacks calculation should be the origin tx - including the amount, currency and usdvalue. We need to check how that data is saved and how it is retrieved on https://github.com/Giveth/givback-calculation repo

Currently we are using the destination transaction information which is not useful for when doing fraud review on givbacks eligible donations.

related to: Giveth/givback-calculation#70

AC

test by making some givbacks eligible donations to Causesm including some donations that are GIV on Polygon and some from other tokens
origin tx = the transaction where user sent some funds to squid router
destionation tx = transaction where squid router sent converted funds to cause recipient address

we should check these queries

  • eligible-donations
    • donations returned show origin tx hash, amount, currency and usd value
    • donations with GIV on Polygon show correctly
  • not-eligible-donations
    • donations returned show origin tx hash, amount, currency and usd value
    • donations with GIV on Polygon show correctly
  • purpleList-donations-to-verifiedProjects
  • donations returned show origin tx hash, amount, currency and usd value
  • donations with GIV on Polygon show correctly

Metadata

Metadata

Assignees

Labels

GIVeconomyissues related to the GIVeconomy product

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions