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

Collectibles -> Nfts #237

Merged
merged 1 commit into from
Jun 13, 2023
Merged

Collectibles -> Nfts #237

merged 1 commit into from
Jun 13, 2023

Conversation

adonesky1
Copy link
Contributor

@adonesky1 adonesky1 commented Jun 13, 2023

In the extension we have dropped use of the term collectible in favor of nft. This PR simply updates the test-dapp to unify our terminology.

This will require updating our e2e tests to look grab the new text.

@adonesky1 adonesky1 requested a review from a team as a code owner June 13, 2023 20:38
Comment on lines +689 to +714
watchNFTsButton.onclick = async () => {
const currentTokenId = await nftsContract.currentTokenId();
const nftsContractAddress = nftsContract.address;
let watchNftsResult;
try {
watchNftsResult = await ethereum.sendAsync(
Array.from({ length: currentTokenId }, (_, i) => i + 1).map(
(tokenId) => {
return {
method: 'wallet_watchAsset',
params: {
type: 'ERC721',
options: {
address: nftsContractAddress,
tokenId,
},
},
};
},
),
);
} catch (error) {
console.error(error);
}
console.log(watchNftsResult);
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is slightly unrelated. It is simply moving this onclick handler outside of the mintButton onclick handler so that it can be used to watch already minted NFTs when you pass a contract address to the dapp via url query string (without calling a new mint in that session).

@adonesky1 adonesky1 merged commit ba32407 into main Jun 13, 2023
@adonesky1 adonesky1 deleted the collectibles-nfts branch June 13, 2023 20:55
This was referenced Jun 13, 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