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

@tmashuangtmashuang 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 threadsrc/index.js Outdated
jiexi
jiexi previously approved these changes Oct 5, 2023

@jiexijiexi 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

@adonesky1adonesky1 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
ContributorAuthor

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 threadsrc/index.html Outdated
Comment threadsrc/index.html Outdated
adonesky1
adonesky1 previously approved these changes Oct 6, 2023
@tmashuang
tmashuang dismissed stale reviews from adonesky1 and jiexi via 5ec2fecOctober 6, 2023 20:07
tmashuangand 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 mainOct 6, 2023
@tmashuang
tmashuang deleted the multi-erc20-watchAsset branch October 6, 2023 20:37
@seaonaseaona mentioned this pull request Oct 10, 2023
@adonesky1adonesky1 mentioned this pull request Oct 10, 2023
Sign up for freeto 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

@tmashuang@jiexi@adonesky1