# 20220622 UI incident report (RIO)
###### tags: `Incident`
## Incident report:
RIO Client report this error on the test server:
https://testnet.zmorph.io:8080/

## Root cause:
It is a old code issue which exposed by recent changing.
On last weekend, we update the RIO test server with new codes:
https://github.com/DelphinusLab/delphinus-deployment/pull/3
https://github.com/DelphinusLab/delphinus-solidity/pull/19
The purpose of them is to move those changing address from solidity repo to deployment repo.
The code changing in:
https://github.com/DelphinusLab/delphinus-solidity/pull/19/commits/8d87ae65491fd416da0d66dab09a8b9679d15d05
change the token's interface from TokenContract (Token.sol) to ERC20.
This is correct as token should be ERC20 without mint function.
However, this expose our pre-existing UI bug in faucet.
In the UI faucet, we was wrongly using getTokenContract instead of correct getGasContract.

This means we are trying to using token contract ABI which do not have mint function after our new code.
To summary, we have several issues:
1. In UI repo, UI faucet is using wrong getTokenContract instead of correct getGasContract
2. In solidity repo, the Token.sol in fact is unnecessary and it is as same as Gas.sol. (however we do not want to remove it currently as some existing code is using it.) Only Gas.sol should have mint function and UI faucet should use it.
## Short term fix:
1. https://testnet.zmorph.io:8080/ had been fixed by changing the code in this commit:
https://github.com/DelphinusLab/delphinus-solidity/pull/19/commits/21ca0272d4572a3939c628f7b21e14da04d17947
It is temp work round to set the token ABI to be gas's to make the server work.
2. We need fix the UI code (in fact, it is in ts-sdk) to use getGasContract for faucet
3. How we can self finding such things before Client report it when we do not have auot UI testing?
Do manual sanity checking after re-deployment.
## Long term fix:
1. In fact, we should not have Token.sol, so maybe no token.ts in solidity?
Future fix item.
3. How we can self finding such things before Client report it for long term?
We need UI auto testing