feat: include coinbase quote in cost breakdown#2352
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
The type |
|
Claude finished @broody's task —— View job Documentation Analysis and Updates Complete ✅I've successfully analyzed the merged PR changes and updated the documentation accordingly. Completed Tasks:
Analysis Summary:The PR adds significant new Coinbase quote functionality:
Documentation Updates Made:Updated
Result:The documentation now accurately reflects the new transparency features that allow users to see exactly what they'll pay, including separate Coinbase fees and cross-chain bridge fees. The changes are staged and ready for commit in the docs repository. Note: The documentation updates require git user configuration to be committed. The files have been successfully modified and staged, but will need to be committed by someone with appropriate git configuration access. |
Updates documentation to reflect changes made in:
feat: include coinbase quote in cost breakdown
Related controller PR: cartridge-gg/controller#2352
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This PR enhances the transparency of Apple Pay purchases by fetching and displaying a detailed cost breakdown from the Coinbase Onramp API, including both provider-specific fees and cross-chain bridging fees.
Key Changes:
Enhanced
useCoinbaseHook:getQuoteto fetch real-time pricing and fee data from the Coinbase Onramp API.sandboxmode, automatically toggled based on the network (Mainnet vs. Testnet).coinbaseQuoteandisFetchingQuotestate for consumption by UI components.Updated
OnchainPurchaseContext:coinbaseQuoteinto the global on-chain purchase state.Improved Cost Transparency in UI:
OnchainCostBreakdown: Now displays the final total from Coinbase when Apple Pay is active, replacing the simple on-chain price with the actual amount charged.OnchainFeesTooltip: Added a detailed fee schedule for Apple Pay, explicitly showing the "Coinbase Fee" and "Bridge Fee" (Layerswap) so users understand the full cost of the transaction.Developer Experience & Build Stability:
CoinbaseQuoteResulttype for consistent usage across the monorepo.onchain-cost.stories.tsxandwallet.stories.tsx) with mock context values to resolve build errors and ensure visual testing remains accurate.Data Flow:
When a user selects Apple Pay, the system now automatically fetches a quote for the total purchase amount. This quote is then decomposed in the UI to show exactly how much goes towards the base price, how much is taken as a service fee by Coinbase, and how much is required for the cross-chain bridge to Starknet.