Skip to content

[SDK] Feature: Update sdk bridge functions with new schema #6830

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

Merged

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Apr 23, 2025


PR-Codex overview

This PR enhances the SDK Bridge functionality by standardizing parameter naming, adding detailed quote structures, and supporting purchaseData. It improves the API interactions and status responses to include more comprehensive information for buy/sell operations.

Detailed summary

  • Standardized parameter naming: buyAmountWei and sellAmountWei changed to amount.
  • Introduced optional purchaseData parameter for Buy and Sell functions.
  • Added steps array to quote responses for detailed transaction information.
  • Enhanced status responses to include purchaseData.
  • Updated API interactions from query parameters to JSON body for prepare functions.

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

@gregfromstl gregfromstl requested review from a team as code owners April 23, 2025 19:26
Copy link

linear bot commented Apr 23, 2025

Copy link

vercel bot commented Apr 23, 2025

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 8:50pm
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 8:50pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 8:50pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 8:50pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 8:50pm

Copy link

changeset-bot bot commented Apr 23, 2025

🦋 Changeset detected

Latest commit: e526f75

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
thirdweb Minor
@thirdweb-dev/wagmi-adapter Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Contributor

graphite-app bot commented Apr 23, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

github-actions bot commented Apr 23, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 51.07 KB (+0.29% 🔺) 1.1 s (+0.29% 🔺) 474 ms (+59.39% 🔺) 1.5 s
thirdweb (cjs) 143.6 KB (-0.1% 🔽) 2.9 s (-0.1% 🔽) 777 ms (-0.35% 🔽) 3.7 s
thirdweb (minimal + tree-shaking) 5.66 KB (0%) 114 ms (0%) 39 ms (+73.19% 🔺) 152 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 42 ms (+334.45% 🔺) 52 ms
thirdweb/react (minimal + tree-shaking) 19.33 KB (0%) 387 ms (0%) 79 ms (+67.72% 🔺) 465 ms

Copy link

codecov bot commented Apr 23, 2025

Codecov Report

Attention: Patch coverage is 91.42857% with 6 lines in your changes missing coverage. Please review.

Project coverage is 55.20%. Comparing base (f912e42) to head (e526f75).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/bridge/Routes.ts 25.00% 3 Missing ⚠️
packages/thirdweb/src/bridge/Buy.ts 93.93% 2 Missing ⚠️
packages/thirdweb/src/bridge/Sell.ts 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6830      +/-   ##
==========================================
+ Coverage   55.18%   55.20%   +0.01%     
==========================================
  Files         896      896              
  Lines       56953    56986      +33     
  Branches     3946     3950       +4     
==========================================
+ Hits        31429    31458      +29     
- Misses      25428    25432       +4     
  Partials       96       96              
Flag Coverage Δ
packages 55.20% <91.42%> (+0.01%) ⬆️
Files with missing lines Coverage Δ
packages/thirdweb/src/bridge/Status.ts 44.23% <100.00%> (+1.09%) ⬆️
packages/thirdweb/src/bridge/Sell.ts 97.22% <96.87%> (+0.41%) ⬆️
packages/thirdweb/src/bridge/Buy.ts 96.29% <93.93%> (-0.52%) ⬇️
packages/thirdweb/src/bridge/Routes.ts 93.18% <25.00%> (-6.82%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label Apr 23, 2025
Copy link
Member Author

gregfromstl commented Apr 23, 2025

Merge activity

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR enhances the SDK Bridge functionality by standardizing parameter naming, introducing a `purchaseData` field, and improving quote structures with a `steps` array. It also updates API interactions to use JSON bodies for complex data.

### Detailed summary
- Standardized parameter naming: `buyAmountWei` and `sellAmountWei` changed to `amount`.
- Added optional `purchaseData` parameter to Buy and Sell functions.
- Introduced `steps` array in quotes for detailed transaction information.
- Enhanced status responses to include `purchaseData`.
- Updated API interactions to use JSON body instead of query parameters for prepare functions.

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

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants