-
Notifications
You must be signed in to change notification settings - Fork 557
Add Bridge.Onramp functions + port old functions #7076
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
Conversation
- Changes the behavior of buyWithCrypto to use the Universal Bridge service instead of the legacy API - Updates getQuote and getTransfer implementation to use Bridge.Buy and Bridge.Sell - Adds a new Transfer module to the Bridge namespace for token transfers - Removes the legacy API endpoints from definitions.ts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Adds new Transfer module for direct token transfers - Implements prepare function for getting transfer quotes and transactions - Adds tests for the Transfer module 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Switch useSendTransaction and useSwapSupportedChains to use Bridge.routes endpoint for retrieving supported destinations. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Changed import from Bridge to Transfer for better clarity and consistency. - Updated the usage of the Transfer module in the getBuyWithCryptoTransfer function.
…b.com/thirdweb-dev/js into greg/tool-4506-update-routes-endpoint
<!-- ## 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 introduces documentation and assets for integrating thirdweb tools into the Stylus contract development workflow, specifically for Rust. It includes setup instructions, publishing and deployment commands, and images to enhance the documentation. ### Detailed summary - Added new sections in `page.mdx` for Arbitrum Stylus. - Included prerequisites for Rust and Solidity installations. - Provided setup commands for creating a Stylus project. - Added commands for publishing and deploying Stylus contracts. - Included images (`stylus-publish-page.png`, `stylus-deploy-page.png`) to illustrate the process. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
Signed-off-by: samina <[email protected]>
Signed-off-by: Maximilian Hubert <[email protected]>
Signed-off-by: samina <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
<!-- start pr-codex --> ## PR-Codex overview This PR focuses on updating the pricing plans and features for the embedded wallets in the dashboard application. It adjusts the plan requirements and modifies the features associated with different plans. ### Detailed summary - Changed `authRequiredPlan` from `"accelerate"` to `"growth"`. - Added `"Custom Wallet Branding & Auth"` to the features list. - Removed `"Custom Wallet Branding & Auth"` from the `TEAM_PLANS` features. - Increased `$400 Usage Credits` to `$500 Usage Credits` in the `TEAM_PLANS` features. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
// onrampChainId: 1, // chain to initially onramp to | ||
// currency: "USD", | ||
// maxSteps: 2, | ||
// purchaseData: { customId: "123" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should include an optional country param in case calling from the server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw i dont think the ip country detection works, its letting me see stripe stuff which is not available in NZ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it does either and I don't know why
.changeset/tidy-seas-sing.md
Outdated
}); | ||
|
||
console.log(preparedOnramp.link); // URL to redirect the user to | ||
console.log(preparedOnramp.destinationAmount); // Amount of token user will receive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of destination amount (since they inputted that) I would highlight the currencyAmount, how much they'll pay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -16,7 +16,7 @@ Developers can turn on Test Mode to test both fiat-to-crypto transactions and cr | |||
|
|||
## Buy With Fiat | |||
|
|||
By setting `testMode` to `true` for Buy With Fiat, you can enable test experiences for our underlying providers (Stripe, Kado, and Transak). | |||
By setting `testMode` to `true` for Buy With Fiat, you can enable test experiences for our underlying providers (Coinbase, Stripe, and Transak). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't true at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we'll have to fix that :D pretty important
); | ||
return toBuyWithFiatStatus({ intentId: params.intentId, result }); | ||
} catch (error) { | ||
// If the session is not found, the Onramp.status endpoint will return a 404 which we map to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should never happen since the onramps are stored on quote and if it does we should throw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i wasn't sure. fixed
PR-Codex overview
This PR primarily focuses on enhancing the
Onramp
functionality within thethirdweb
library, including the addition of new features, updates to existing types, and the removal of deprecated components related to fiat transactions.Detailed summary
.tsx
files related to fiat transaction screens.Bridge.Onramp.prepare
andBridge.Onramp.status
functions for managing onramp transactions.priceUsd
toToken
type andBridgeAction
type for transaction actions.KADO
.useOnRampStatus
.