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

✨ feat: ERC1155 batch transfer #1110

Merged
merged 4 commits into from
Feb 28, 2024
Merged

✨ feat: ERC1155 batch transfer #1110

merged 4 commits into from
Feb 28, 2024

Conversation

matstyler
Copy link
Collaborator

@matstyler matstyler commented Feb 28, 2024

Motivation and context

E2e tests for the ERC1155 batch transfers.

Does it fix any issue?

https://linear.app/synpress/issue/SYN-64/erc1155-batch-transfers

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough e2e tests.

⚠️👆 Delete any section you see irrelevant before submitting the pull request 👆⚠️


Generated summary

TL;DR

This pull request introduces end-to-end tests for batch transfer functionality in the MetaMask wallet. It includes tests for confirming approval to transfer all from ERC1155 and performing batch ERC1155 transfers.

What changed

Two new test cases were added to batchTransfer.spec.ts:

  1. should confirm approval to transfer all from ERC1155: This test checks if the approval for transferring all tokens from ERC1155 is confirmed correctly.
  2. should perform batch ERC1155 transfer: This test checks if batch transfers of ERC1155 tokens are performed correctly.

In addition, a new helper function deployAndMintERC1155 was added to testWithMetaMask.ts. This function deploys and mints ERC1155 tokens, which are used in the new test cases.

How to test

To test these changes, run the end-to-end test suite with the command npm run test:e2e. Ensure that all tests pass, and specifically, that the new tests in batchTransfer.spec.ts are successful.

Why make this change

These changes are necessary to ensure that the batch transfer functionality in the MetaMask wallet is working as expected. By adding these tests, we can catch potential issues or regressions early, before they affect users.

@matstyler matstyler requested a review from drptbl February 28, 2024 18:13
Copy link

vercel bot commented Feb 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
synpress ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 28, 2024 10:26pm

@matstyler matstyler changed the base branch from feat/encryption to new-dawn February 28, 2024 18:17
@drptbl drptbl merged commit b1099c7 into new-dawn Feb 28, 2024
13 checks passed
@drptbl drptbl deleted the feat/erc1155-transfer branch February 28, 2024 22:27
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.

2 participants