-
Notifications
You must be signed in to change notification settings - Fork 20
refactor: reduce code from polkadot lib by replacing BN and HexString import from @polkadot/util #3075
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
base: v2
Are you sure you want to change the base?
Conversation
… polkadot/util lib
… remove the use of formatBalance function from polkadot/util lib
- Merged origin/v2 branch containing Tangle v2 EVM migration - Resolved 80 conflicts (49 modify/delete + 31 content) - Applied BN refactoring from linh/refactor/update-bn to v2 - Removed all @polkadot/util BN dependencies - All BN types now use @tangle-network/tangle-shared-ui/bn - Credits system converted from bigint to BN - Deprecated Substrate features accept v2 stubs - Active EVM features use BN for consistency
- Fixed bigint comparisons to use BN.isZero() method - Updated CreditsButtonProps to use BN instead of bigint - Removed non-existent utils export from dapp-config - All credits-related types now consistently use BN
- Fixed unnecessary dependency 'applicationName' in useCallback (WebbProvider) - Removed useless Fragment in NetworkGuard component - Created .nxignore to exclude forge lib directories from NX inference - All TypeScript projects now pass linting without warnings
NetworkType is a string union type ('MAINNET' | 'TESTNET'), not an enum.
Changed default parameter from NetworkType.Mainnet to 'MAINNET' string literal.
Fixes TS2693: 'NetworkType' only refers to a type, but is being used as a value
|
Claude finished @vutuanlinh2k2's task —— View job PR Review: BN and HexString RefactorI've completed a comprehensive review of this refactoring PR. Here's my analysis: ✅ Overall Assessment: Good RefactorThis is a well-executed refactoring that reduces dependency on 📋 Code Quality & Best Practices✅ Strengths:
✅ Good utility implementations:
🔍 Potential Issues Found
|
Summary of changes
BN,HexStringtypes usage from@polkadot/utilto internal andviemProposed area of change
Put an
xin the boxes that apply.apps/tangle-dappapps/tangle-cloudapps/leaderboardlibs/tangle-shared-uilibs/ui-componentsAssociated issue(s)
Specify any issues that can be closed from these changes (e.g.
Closes #233).