Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Sep 25, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR enhances the PublishContractPage by introducing logic to handle scenarios where contract metadata lacks a version. It fetches published contracts and merges their data with the fetched metadata to ensure the latest version is used.

Detailed summary

  • Added import for getPublishedContractsWithPublisherMapping.
  • Renamed publishMetadata to publishMetadataFromUri.
  • Introduced logic to check for a version in publishMetadataFromUri.
  • If no version exists, fetch and merge data from published contracts.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Sep 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 25, 2024 9:46pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Sep 25, 2024 9:46pm
thirdweb_playground ⬜️ Skipped (Inspect) Sep 25, 2024 9:46pm
wallet-ui ⬜️ Skipped (Inspect) Sep 25, 2024 9:46pm

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 25, 2024 21:06 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 September 25, 2024 21:06 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 25, 2024 21:06 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Sep 25, 2024

⚠️ No Changeset found

Latest commit: 3e8c074

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 25, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Sep 25, 2024
@MananTank MananTank marked this pull request as ready for review September 25, 2024 21:06
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @MananTank and the rest of your teammates on Graphite Graphite

@MananTank MananTank force-pushed the 09-26-fix_publish_page_not_prepopulated_with_older_version_metadata branch from aa5abc0 to 38b0081 Compare September 25, 2024 21:07
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 25, 2024 21:07 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 September 25, 2024 21:07 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 25, 2024 21:07 Inactive
@MananTank MananTank force-pushed the 09-26-fix_publish_page_not_prepopulated_with_older_version_metadata branch from 38b0081 to cd592e6 Compare September 25, 2024 21:09
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 25, 2024 21:09 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 September 25, 2024 21:09 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 25, 2024 21:09 Inactive
@MananTank MananTank force-pushed the 09-26-fix_publish_page_not_prepopulated_with_older_version_metadata branch from cd592e6 to 5de6961 Compare September 25, 2024 21:10
@vercel vercel bot temporarily deployed to Preview – docs-v2 September 25, 2024 21:10 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 25, 2024 21:10 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 25, 2024 21:10 Inactive
@codecov
Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.13%. Comparing base (206340c) to head (3e8c074).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4806   +/-   ##
=======================================
  Coverage   49.13%   49.13%           
=======================================
  Files        1051     1051           
  Lines       56681    56681           
  Branches     3889     3889           
=======================================
  Hits        27850    27850           
  Misses      28198    28198           
  Partials      633      633           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 206340c
packages 45.20% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 41.93 KB (0%) 839 ms (0%) 432 ms (+45.73% 🔺) 1.3 s
thirdweb (cjs) 101.56 KB (0%) 2.1 s (0%) 714 ms (-4.08% 🔽) 2.8 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 81 ms (+137% 🔺) 177 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 52 ms (+894.58% 🔺) 62 ms
thirdweb/react (minimal + tree-shaking) 16.78 KB (0%) 336 ms (0%) 140 ms (+88.18% 🔺) 476 ms

@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 25, 2024

Merge activity

@MananTank MananTank changed the title Fix Publish page not prepopulated with older version metadata Fix Publish page not prepopulated with latest published version metadata Sep 25, 2024
…ata (#4806)

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `PublishContractPage` by adding logic to handle cases where published contract metadata lacks a version. It fetches existing contracts associated with a publisher and merges their data with the fetched metadata.

### Detailed summary
- Imported `getPublishedContractsWithPublisherMapping` utility.
- Renamed variable `publishMetadata` to `publishMetadataFromUri`.
- Added logic to check if `publishMetadataFromUri` lacks a version.
- Fetched existing published contracts for the publisher.
- Merged existing contract data with `publishMetadataFromUri` if applicable.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 09-26-fix_publish_page_not_prepopulated_with_older_version_metadata branch from 5de6961 to 3e8c074 Compare September 25, 2024 21:34
@vercel vercel bot temporarily deployed to Preview – wallet-ui September 25, 2024 21:34 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 25, 2024 21:34 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 September 25, 2024 21:34 Inactive
@graphite-app graphite-app bot merged commit 3e8c074 into main Sep 25, 2024
@graphite-app graphite-app bot deleted the 09-26-fix_publish_page_not_prepopulated_with_older_version_metadata branch September 25, 2024 21:46
@vercel vercel bot temporarily deployed to Production – thirdweb_playground September 25, 2024 21:46 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 September 25, 2024 21:46 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui September 25, 2024 21:46 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants