Conversation
WalkthroughThis update refines the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SendModalTokensTabView
participant FeeAssetSelector
participant PaymasterLogic
User->>SendModalTokensTabView: Opens Send Modal
SendModalTokensTabView->>FeeAssetSelector: Display fee asset options (with balances)
User->>FeeAssetSelector: Selects fee asset
FeeAssetSelector->>SendModalTokensTabView: Updates selectedFeeAsset (with balance)
User->>SendModalTokensTabView: Enters send details and triggers onSend
SendModalTokensTabView->>PaymasterLogic: Calculates amountLeft and checks eligibility
PaymasterLogic-->>SendModalTokensTabView: Returns eligibility result
SendModalTokensTabView->>User: Proceeds or shows insufficient balance warning
Possibly related PRs
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm error Exit handler never called! 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
✨ Finishing Touches
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
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/components/BottomMenuModal/SendModal/SendModalTokensTabView.tsx (1)
42-42: Remove unused imports and destructured variables.The following imports and destructured variables are not used in the component and should be removed:
AccountBalancesContext(line 42)useAccountBalances(line 46)addressesEqualfromuseEtherspotUtils(line 125)-import { AccountBalancesContext } from '../../../providers/AccountBalancesProvider'; import { AccountNftsContext } from '../../../providers/AccountNftsProvider'; // hooks -import useAccountBalances from '../../../hooks/useAccountBalances'; import useAccountTransactionHistory from '../../../hooks/useAccountTransactionHistory'; - const { addressesEqual } = useEtherspotUtils();Also applies to: 46-46, 125-125
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/BottomMenuModal/SendModal/SendModalTokensTabView.tsx(9 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: lint
- GitHub Check: unit-tests
- GitHub Check: build
- GitHub Check: Cloudflare Pages: x
🔇 Additional comments (3)
src/components/BottomMenuModal/SendModal/SendModalTokensTabView.tsx (3)
513-525: Excellent fix for the gasless transaction balance calculation!This logic correctly handles the edge case where users send the same token used for gas fees, preventing the "insufficient balance" error. The case-insensitive comparison is a good practice for contract addresses.
150-150: Good consistency in tracking fee asset balance.The balance property is now consistently included in the
selectedFeeAssetstate across initialization and updates, which is essential for the gasless transaction fix to work correctly.Also applies to: 267-267, 849-849
1087-1115: Good UI structure improvements.The form groups are now properly organized with the fee selection and send-to address in separate groups. Making the send-to input conditional on
selectedAssetimproves the user experience by showing fields in the correct order.
Deploying x with
|
| Latest commit: |
a53f2d9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://df2d8dba.x-e62.pages.dev |
| Branch Preview URL: | https://paymaster-send-token-bug-fix.x-e62.pages.dev |
| let amountLeft = 0; | ||
| if ( | ||
| selectedAsset?.type === 'token' && | ||
| selectedAsset.asset.contract === selectedFeeAsset?.token?.toLowerCase() |
There was a problem hiding this comment.
both might need to be in lowercase no? For the comparison to work
There was a problem hiding this comment.
yes so selectedAsset contract address comes from mobula which is always lowercase
There was a problem hiding this comment.
and selectedFeeAsset comes from arka which is all checksummed address
There was a problem hiding this comment.
OK, but then there is a risk that mobula changes that in the near future...
There was a problem hiding this comment.
okay will do lowercase for both
It is building normally on local Can anyone pls check the logs and report back with the error? @RanaBug @IAmKio @sankhavaramsaitulasiram |
|
this is an issue on CF Pages due to the assets being too large in the public folder. @RanaBug and myself are dealing with it and will let you know when to pull in the fix |

Description
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Summary by CodeRabbit
Bug Fixes
Refactor