fuels-wallet
fuels-wallet copied to clipboard
Verify that address is not a contract
Motivation
Right now, if the user creates a normal transfer to a contract, it will transfer to the contract address, but the contract will not be able to access that balance, burning the amount transferred.
To improve this, we could add a check on the review transaction phase to verify if the address on the output coin is a contract we could display or throw an error, letting the user know that the amount will be lost.
To check if an address is a contract, we can query the network and see if the contract exists on the chain if query returns a contract id, them we show/throw the error.