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: show deal info from w3up #2573

Merged
merged 6 commits into from
Apr 15, 2024
Merged

feat: show deal info from w3up #2573

merged 6 commits into from
Apr 15, 2024

Conversation

travis
Copy link
Contributor

@travis travis commented Apr 10, 2024

Fetch deal information from w3up.

There's no way to "multi-get" deal info for more than one upload so I've reworked the deal info in the files list - if it has deals from dagcargo it will just use those, and if it doesn't, it will display a "load deals" button:

Screenshot 2024-04-12 at 12 07 20 PM

When clicked, it will find the shards of the upload and find filecoin info for each of them. If it doesn't find any filecoin info in w3up it will display the "queuing" status and tooltip as it did in the past:

Screenshot 2024-04-12 at 12 07 27 PM Screenshot 2024-04-12 at 12 07 34 PM

This required updating the "get NFT" API endpoint to look for filecoin info from w3up.

Copy link

cloudflare-workers-and-pages bot commented Apr 10, 2024

Deploying nft-storage with  Cloudflare Pages  Cloudflare Pages

Latest commit: c20ac7d
Status: ✅  Deploy successful!
Preview URL: https://34ae5703.nft-storage-1at.pages.dev
Branch Preview URL: https://feat-w3up-deal-info.nft-storage-1at.pages.dev

View logs

travis added 4 commits April 10, 2024 14:01
this seems to fix the build errors I was seeing, and necessitates a small code change
Add a test for fetching filecoin deal info from w3up.

This is definitely not my best work - ideally we'd abstract this w3up mocking logic in a way that makes it less stateful, but I'm hesitant to do that when we will likely not be making many changes here in the future.
this broke existing tests because it was returning w3up deals in all situations
packages/api/test/utils/w3up-testing.js Outdated Show resolved Hide resolved
@travis travis changed the title feat: in progress work on nft-get deals info feat: show deal info from w3up Apr 15, 2024
@travis travis merged commit 766a7c1 into main Apr 15, 2024
22 checks passed
@travis travis deleted the feat/w3up-deal-info branch April 15, 2024 17:58
travis pushed a commit that referenced this pull request Apr 17, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.8.0](api-v4.7.0...api-v4.8.0)
(2024-04-17)


### Features

* show deal info from w3up
([#2573](#2573))
([766a7c1](766a7c1))


### Bug Fixes

* more logging of upload get fail
([#2593](#2593))
([35cc344](35cc344))
* one more typo
([de5582e](de5582e))


### Other Changes

* more deals get debugging
([#2594](#2594))
([36a26f1](36a26f1))
* remove debugging
([#2595](#2595))
([3dc7916](3dc7916))
* remove legacy upload codepath
([#2580](#2580))
([88c05a9](88c05a9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
travis pushed a commit that referenced this pull request Apr 17, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.11.0](website-v2.10.0...website-v2.11.0)
(2024-04-15)


### Features

* show deal info from w3up
([#2573](#2573))
([766a7c1](766a7c1))
* tweak readme
([#2563](#2563))
([6a6298a](6a6298a))


### Bug Fixes

* use correct "nft get" endpoint
([#2589](#2589))
([27632d8](27632d8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

4 participants