Skip to content
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

Adds ability to create multiple tokens and watch all of them. #259

Merged
merged 5 commits into from
Oct 6, 2023

Conversation

tmashuang
Copy link
Contributor

@tmashuang tmashuang commented Oct 4, 2023

Adds ability to create multiple tokens and watch all of them. Shouldn't effect other token methods, they will use the latest created token address for approval and transfers.

For context: https://github.com/MetaMask/MetaMask-planning/issues/1407

src/index.js Outdated Show resolved Hide resolved
jiexi
jiexi previously approved these changes Oct 5, 2023
Copy link
Contributor

@jiexi jiexi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit. LGTM otherwise

Copy link
Contributor

@adonesky1 adonesky1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I follow how this enables us to test multiple different batched token addresses. Could you include a video of the expected UX?

@tmashuang
Copy link
Contributor Author

tmashuang commented Oct 6, 2023

Currently in the test dapp, when creating a token we create a instance of the ERC20 token and use that address watchAsset, but any subsequent token creation would override the previous one. In this pr when we create a new token we append that address to the tokens label which we can call wallet_watchAsset on all of them now.

test-dapp-pr-259.mov

jiexi
jiexi previously approved these changes Oct 6, 2023
src/index.html Outdated Show resolved Hide resolved
src/index.html Outdated Show resolved Hide resolved
adonesky1
adonesky1 previously approved these changes Oct 6, 2023
@tmashuang tmashuang dismissed stale reviews from adonesky1 and jiexi via 5ec2fec October 6, 2023 20:07
tmashuang and others added 2 commits October 6, 2023 13:07
Co-authored-by: Alex Donesky <adonesky@gmail.com>
Co-authored-by: Alex Donesky <adonesky@gmail.com>
@tmashuang tmashuang merged commit b6e2e97 into main Oct 6, 2023
3 checks passed
@tmashuang tmashuang deleted the multi-erc20-watchAsset branch October 6, 2023 20:37
@seaona seaona mentioned this pull request Oct 10, 2023
@adonesky1 adonesky1 mentioned this pull request Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants