-
Notifications
You must be signed in to change notification settings - Fork 37
feat(checkout): Send new params to the create widget URL #2745
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
| transition: 'opacity 0.5s ease-out', | ||
| }} | ||
| onLoad={onLoad} | ||
| referrerPolicy="strict-origin-when-cross-origin" |
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 is based on their migration docs
https://docs.transak.com/docs/migration-to-api-based-transak-widget-url
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 is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on December 13
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Bug: useEffect missing dependency on getNFTCheckoutURL
The useEffect hook has an empty dependency array but calls getNFTCheckoutURL, which depends on contractId, environment, transakParams, and onError. When these dependencies change, getNFTCheckoutURL is recreated but the effect never re-runs to call the updated function, so the iframe will not refresh with new data.
packages/checkout/widgets-lib/src/components/Transak/useTransakIframe.ts#L127-L133
ts-immutable-sdk/packages/checkout/widgets-lib/src/components/Transak/useTransakIframe.ts
Lines 127 to 133 in dff8791
| useEffect(() => { | |
| (async () => { | |
| const checkoutUrl = await getNFTCheckoutURL(); | |
| setIframeSrc(checkoutUrl); | |
| })(); | |
| }, []); |
|
View your CI Pipeline Execution ↗ for commit 75ee338
☁️ Nx Cloud last updated this comment at |
Note
Switch to Immutable widget-url endpoint with new snake_case NFT params, remove Transak nft-transaction-id call, use numeric gas limit, and add strict referrerPolicy to iframes.
POST {IMMUTABLE_API_BASE_URL}/checkout/v1/widget-urlusing new snake_case fields:is_nft,contract_id,crypto_currency_code,calldata,nft_data,estimated_gas_limit, etc.; conditionally includeemailandexclude_fiat_currencies.nftDatato new schema (collection_address,image_url,nft_name,nft_type,price,quantity,token_id).nft-transaction-idAPI call and related param.MAX_GAS_LIMITand send numericestimated_gas_limit.referrerPolicy: strict-origin-when-cross-origintoTransakIframeand on-ramp iframe.Written by Cursor Bugbot for commit 75ee338. This will update automatically on new commits. Configure here.