Skip to content

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

Merged
tmashuang merged 5 commits into
mainfrom
multi-erc20-watchAsset
Oct 6, 2023
Merged

Adds ability to create multiple tokens and watch all of them.#259
tmashuang merged 5 commits into
mainfrom
multi-erc20-watchAsset

Conversation

@tmashuang

@tmashuang tmashuang commented Oct 4, 2023

Copy link
Copy Markdown
Contributor

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

Comment thread src/index.js Outdated
jiexi
jiexi previously approved these changes Oct 5, 2023

@jiexi jiexi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

small nit. LGTM otherwise

@adonesky1 adonesky1 left a comment

Copy link
Copy Markdown
Contributor

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

tmashuang commented Oct 6, 2023

Copy link
Copy Markdown
Contributor Author

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
Comment thread src/index.html Outdated
Comment thread src/index.html Outdated
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 requested review from adonesky1 and jiexi October 6, 2023 20:19
@tmashuang
tmashuang merged commit b6e2e97 into main Oct 6, 2023
@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