-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
BREAKING: Token detection V2 #763
Conversation
…on to handle batch ignore, batch add, and mix batch add/ignore
…Clean up TokenDetectionController logic
067a76f
to
969ba69
Compare
@@ -77,7 +77,7 @@ export class PreferencesController extends BaseController< | |||
ipfsGateway: 'https://ipfs.io/ipfs/', | |||
lostIdentities: {}, | |||
selectedAddress: '', | |||
useStaticTokenList: false, | |||
useTokenDetection: false, |
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.
@Cal-L useStaticTokenList
used to depict that we are using the static token list instead of the dynamic token list since we have changed the name and the purpose of the flag I feel like the useTokenDetection
value as true
will make it less confusing for the condition token detection ON by default
. Would like to hear your thoughts on the same!?
…eature/3157-token-detection-v2-controllers
Closing in favor of #808 |
Description
Introduce detected tokens state in addition to existing states, added and ignored
Support token detection on Mainnet, BSC, Polygon, and Avalanche
Remove use of tokens from contract-metadata AKA static tokens
BREAKING:
onNetworkChange
to constructor for updatingchainId
in controller's configaddTokens
toimportTokens
. AddedignoreTokens
to batch ignore detected tokens. AddedaddDetectedTokens
to add detected tokens fromTokenDetectionController
.useStaticTokenList
andonPreferencesStateChange
from constructor. Removed static token list from under the hood. Format token images to use Codefi's proxy. Exposeaggregators
property on token object.onTokenListStateChange
to constructor to trigger token detection action whenever token list has changed.useStaticTokenList
touseTokenDetection
in constructor.isTokenDetectionEnabledForNetwork
helper function that takes achainId
and returns a boolean.Checklist
References
Notion - https://www.notion.so/Improve-token-detection-support-custom-networks-aka-TDF-v2-fb3ef7b7299c4ddb8e9481c2b22f1e87
Figma - https://www.figma.com/file/2h15YfvbT2q4q1FOMJFPP1/Token-Detection-V2?node-id=0%3A1