omni / bridge-ui

UI for TokenBridge, an interoperability solution between Ethereum networks for native and ERC tokens
https://bridge.poa.net/
41 stars 51 forks source link

Warn the user if a token transfer could exceed the limit on the token bridge #178

Open akolotov opened 5 years ago

akolotov commented 5 years ago

As part of https://github.com/poanetwork/poa-bridge-contracts/pull/117 the new functionality was introduced. It does not allow accepting the tokens relays if the amount of tokens is above the limits.

Test case for the erc20-to-native bridge mode:

  1. set the daily limit for the bridge in 50 ether.
  2. try to transfer 55 tokens from the Foreign chain to the Home chain by using the Bridge UI The results: the Bridge UI warns the end user that even if the transaction with transfer will not be reverted, relaying of tokens will not mint new coins on the Home chain since the transfer amount exceeds the limit.

Similar is applicable for erc20-to-erc20 bridge.