Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Replace Infura IPFS file upload in favor of Pinata #1864

Closed
ramirotw opened this issue Nov 16, 2021 · 0 comments
Closed

Replace Infura IPFS file upload in favor of Pinata #1864

ramirotw opened this issue Nov 16, 2021 · 0 comments
Assignees
Labels
app:CowSwap CowSwap app Critical Severity indicator for defects. ndicates complete shut-down of the process. Nothing can proceed furt Protofire Handled by Protofire development team

Comments

@ramirotw
Copy link
Contributor

Description
by @alfetopito

We have received reports of couple of users not having their affiliate data reflect/account for affiliate trades.
Upon investigation, the issue is that the file is not available on Pinata yet (see pic).
The file is on IPFS, but not yet propagated to Pinata.
When backend tries to fetch the doc to calculate the referrals it fails as the data is not yet available
We upload the file to an Infura endpoint and then later pin it with Pinata (

await pinByHash(cid)
)
Reading their docs, I assumed there was no way to upload files using Pinata, but @alex proved me wrong.
Their pinining services not only mark a hash as pinned, but can also upload files/json etc.
In fact there's even a dedicated endpoint for JSON files https://docs.pinata.cloud/api-pinning/pin-json
So, the request is: Let's replace the ipfs-http-client lib for IPFS upload (
const { create } = await import('ipfs-http-client')
) and use instead only Pinata.
With that hopefully the backend will have consistent data and no more users with missing data.
As soon as this is ready we should release it as a hotfix

@ramirotw ramirotw added app:CowSwap CowSwap app Protofire Handled by Protofire development team Critical Severity indicator for defects. ndicates complete shut-down of the process. Nothing can proceed furt labels Nov 16, 2021
@matextrem matextrem self-assigned this Nov 16, 2021
nenadV91 pushed a commit that referenced this issue Jan 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
app:CowSwap CowSwap app Critical Severity indicator for defects. ndicates complete shut-down of the process. Nothing can proceed furt Protofire Handled by Protofire development team
Projects
None yet
Development

No branches or pull requests

2 participants