sygmaprotocol / sygma-widget

Transfer widget for the sygmaprotocol
5 stars 2 forks source link

Address validation, still allows transfer to move forward if address format is incorrect #164

Closed LyonSsS closed 2 months ago

LyonSsS commented 2 months ago

Priority: Medium | Severity: Medium

Short context:

"Send to" field validation should block transfer if an address is invalid. Currently it is not.

STR:

  1. Connect an EVM wallet and select source Sepolia.
  2. Select destination as Cronos and select the available token type from the drop down.
  3. Input a valid amount.
  4. Input an invalid ETH format address into the "Send to" field ( use a substrate format one)

Exp: The Allow spending/Transfer button should be blocked ( disable). Act: The user can use the Allow Spending & Transfer button to move forward with the flow.

Note: This works the other way around - entering an EVM address for the Substrate format. image image

LyonSsS commented 2 months ago

Tested on PR branch and it passed EVM to EVM - using substrate address image EVM-EVM - faulty address image EVM-Substrate - using EVM address image EVM-Substrate - faulty Substrate address image