MetaMask / test-dapp

The sample dapp used for e2e testing and metamask-extension QA
https://metamask.github.io/test-dapp/
MIT License
596 stars 349 forks source link

feat: add get allowance support for ERC20 tokens #312

Closed seaona closed 7 months ago

seaona commented 7 months ago

Description

This PR adds support for querying the allowance(address owner, address spender) → uint256 function for ERC20 tokens. This will enable testing more effectively the Approve and Increase Allowance functionalities.

Screenshots

Screenshot from 2024-04-08 12-44-11

https://github.com/MetaMask/test-dapp/assets/54408225/4f8d18ba-f02f-431b-bc8e-7f1f5fdb7e41

Manual Testing Steps

  1. Deploy an ERC20 token contract
  2. Add owner and spender addresses
  3. Click get allowance
  4. Perform an approve or increase allowance to the same spender and owner
  5. Click get allowance
  6. See how the amount changed