Open memoyil opened 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
aptos-web | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 13, 2024 10:03am |
gamification | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 13, 2024 10:03am |
web | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 13, 2024 10:03am |
Latest commit: 4f2e59104105dedada8099edbb594cfa7959c45f
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
PR-Codex overview
This PR focuses on enhancing the type safety and immutability of token-related data structures in the
@pancakeswap/tokens
package by exporting thecreateEmptyList
function and updating the return types ofEMPTY_LIST
andcreateEmptyList
.Detailed summary
createEmptyList
from a private to an exported function.createEmptyList
to return aReadonly<TokenAddressMap<ChainId>>
.EMPTY_LIST
to be of typeReadonly<TokenAddressMap<ChainId>>
.combineTokenMaps
to check forurls?.length
.newTokens
incombineTokenMaps
for improved clarity.listCache
to store aMap<string, TokenAddressMap>
instead ofTokenAddressMap
.listToTokenMap
to require akey
parameter and adjusted its logic to handle the newlistCache
structure.