Repository navigation
Hide duplicate native USDC balance on Arc in Splits Kit - #99
Closed
eltontay-circle wants to merge 1 commit into
Closed
eltontay-circle wants to merge 1 commit into
eltontay-circle wants to merge 1 commit into
Conversation
|
This pull request has been inactive for 5 days, closing. If you are still working on this you can reopen. |
Author
|
For splits team to review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Arc, USDC is the native gas token. The native balance (18 decimals) and the USDC ERC20 at
0x3600000000000000000000000000000000000000(6 decimals) are the same funds, soSplitBalancesshows USDC twice for one balance. Distributing either row pays out the same funds. I mentioned this in 0xSplits/splits-lite#166.This adds an optional
erc20Addressto a chain'snativeCurrencyinCHAIN_INFO, set for Arc and Arc Testnet. When a Split's balances include that ERC20,SplitBalanceshides the native row. If the token list doesn't include USDC, the native row still shows. Other chains are unchanged.One limit: the native row also includes native USDC the Split holds in the Warehouse, so that part is hidden too. That only happens when another Pull Split pays this Split in native USDC. Happy to handle it differently if you prefer.
Tested with Split
0x557548d99010d9ffa4144ab164661fa02b883381on Arc Testnet, which holds 10 USDC:10 USDC(native) and10 USDC(0x3600…)10 USDC(0x3600…)pnpm run lerna-build, ESLint and Prettier pass. Splits Lite picks this up after the next splits-kit release.