-
Notifications
You must be signed in to change notification settings - Fork 277
Use tokenId instead of currencyCode #5855
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: develop
Are you sure you want to change the base?
Conversation
We can leave currency code filtering for scenes like the coin ranking details
We do add getWalletTokenId use in the SwapDetailsCard and that's ok because it seems that only the cosmosibc swap provider even provides uses it
Only EdgeProvider remains, which relies on selectedCurrencyCode
They are low volume or dead
| plugin, | ||
| refundAddress | ||
| } = swapData | ||
| } = upgradeSwapData(wallet, swapData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Wrong wallet passed to upgradeSwapData function
The upgradeSwapData function is called with wallet (the source wallet) instead of destinationWallet (the payout wallet). This causes the function to look up payoutTokenId or payoutCurrencyCode in the wrong wallet's currency configuration, potentially returning incorrect token information for the swap destination asset.
| "detect-bundler": "^1.1.0", | ||
| "disklet": "^0.5.2", | ||
| "edge-core-js": "^2.35.0", | ||
| "edge-core-js": "file:../edge-core-js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Local file dependency in package.json
The edge-core-js dependency is changed to "file:../edge-core-js", which is a local file reference for development. This breaks the build for anyone without that specific directory structure and should not be committed to the repository. The dependency should reference a published version or a git URL instead.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
EdgeApp/edge-core-js#688
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Replace currencyCode usage with tokenId across state, selectors, components, staking, loans, providers, and utils; update tests and bump edge-core-js to 2.36.0.
selectedCurrencyCodewithselectedTokenIdin UI state and actions (UI/WALLETS/SELECT_WALLET,ACCOUNT_INIT_COMPLETE).selectDisplayDenomByCurrencyCodeandgetExchangeDenomByCurrencyCode; useselectDisplayDenomandgetExchangeDenom(tokenId).getCurrencyCodeMultiplierto accepttokenId(null for parent).tokenId.SettingsReducerandWalletsReducerpayloads to carrytokenId.tokenId(includingAddressTile2,SwapDetailsCard,TransactionListTop, etc.).tokenId; update adapters/policies (Cardano, Coreum, Ethereum, Filecoin, Optimism/Tarot, Thorchain, Tron) and filtering logic.enableTokensand token-aware allocations/fees.LOAN_TOKEN_IDS; useenableTokens; remove currencyCode lookups; hard-code required tokenIds.tokenId.CryptoAmountnow requirestokenId(no currencyCode path).enableTokenCurrencyCode, currencyCode-based denomination lookups); update balance/fiat calcs to accepttokenId.tokenId; snapshot reflectsselectedTokenId.edge-core-jsto 2.36.0 (local file); lockfiles updated.Written by Cursor Bugbot for commit 9ff151b. This will update automatically on new commits. Configure here.