Troubleshooting
Common mistakes and solutions when implementing RozoAI Intent Pay SDK.
β οΈ COMMON MISTAKES TO AVOID
β Missing getAddress() Wrapper
Problem:
// β DON'T DO THIS - Raw strings
toAddress = "0x742d35Cc6634C0532925a3b8D454A3fE1C11C4e2";
toToken = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";Solution:
// β
DO THIS - Wrapped with getAddress()
toAddress={getAddress("0x742d35Cc6634C0532925a3b8D454A3fE1C11C4e2")}
toToken={getAddress(baseUSDC.token)}Why it happens: TypeScript requires proper Address types from viem.
β Wrong Stellar Configuration
Problem:
// β DON'T DO THIS - Wrong chain/token for Stellar payout
<RozoPayButton
appId="rozoDemo"
toChain={8453} // β Wrong chain for Stellar
toToken={getAddress(baseUSDC.token)} // β Wrong token for Stellar
toAddress={getAddress("GABC123...")} // β Don't use getAddress() for Stellar
/>Solution:
Why it happens: Stellar payouts require Stellar chain ID (1500) and Stellar token format. Stellar addresses should not be wrapped with getAddress().
β Not Calling resetPayment() When Payment Params Change
Problem:
Solution:
Why it happens: You must call resetPayment() from useRozoPayUI() hook whenever toChain, toAddress, toToken, or toUnits values change to update the payment state.
β Using parseFloat() for toUnits
Problem:
Solution:
Why it happens: The toUnits prop accepts human-readable amounts as strings (e.g., "10" for 10 USDC). No parseFloat() conversion is needed.
π Debugging Tools
Enable Debug Mode
This will log:
Payment flow steps
API requests/responses
Wallet connection status
Error details
Browser Developer Tools
Console Logs:
Check for RozoAI debug messages
Look for wallet connection errors
Monitor network requests
Network Tab:
Verify API calls to
intentapi.rozo.aiCheck for CORS errors
Monitor WebSocket connections
Application Tab:
Check localStorage for cached data
Verify wallet connection status
Common Error Messages
Provider not found
Missing RozoPayProvider
Wrap app with providers
Invalid address format
Raw string address
Use getAddress() wrapper
Chain not supported
Wrong chain ID
Use supported chain (8453, 137, 56)
Token not found
Wrong token address
Verify token address for chain
Wallet not connected
No wallet connection
User needs to connect wallet
Payment not updating
Missing resetPayment()
Call resetPayment() when params change
π Getting Help
If you're still experiencing issues:
Check Documentation:
Examples - Working code examples
API Reference - Complete prop reference
Community Support:
π¬ Discord: discord.gg/rozoai
π GitHub Issues: GitHub Issues
Direct Support:
π§ Email: [email protected]
When reporting issues, please include:
Code snippet showing the problem
Error messages from browser console
Steps to reproduce the issue
Framework/version information
π Next Steps
View complete examples for working implementations
Check API reference for all available options
Use AI prompts for code generation
Last updated