Fix okx tx issue#730
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (3)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
This pull request updates the OKX provider integration in the
packages/swap/src/providers/okx/index.tsfile to enhance compatibility with Solana transactions, improve API request handling, and add better debugging and error handling. The most important changes include switching to legacy Solana transactions, updating API endpoints, refining parameter handling for quotes and swaps, and introducing a new method to process OKX transaction data into valid Solana transactions.Enhancements to Solana transaction handling:
legacyto accommodate OKX's custom instruction data, as opposed to standard Solana transactions.createSolanaTransactionFromOKXData, to convert OKX transaction data into valid Solana transactions, ensuring proper deserialization, fee payer updates, and blockhash assignment.API endpoint updates:
Improvements to parameter handling:
feePercentonly when valid (greater than 0 and less than or equal to 10).autoSlippage, and conditionally included fee-related fields.Debugging and logging enhancements: