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

Eth Mainnet shows 2 Dai by default If the user is not logged in to MetaMask or Nifty Wallet #154

Closed SiddigZeidan closed 5 years ago

SiddigZeidan commented 5 years ago

Issue Affected only on https://dai-bridge.poa.network/ not http://bridge.poa.net

ETH Mainnet shows my balance to be 2 Dai, however I am not logged in. It should show 0 Dai. image

akolotov commented 5 years ago

I saw similar issue during testing with other networks. Could it relate that some value from the browser storage are used?

patitonar commented 5 years ago

The issue is produced by making the call to get the token balance of the user even if user is not logged in, so we need to fix this. In this case, since we don't have the user account, it's making the call with an empty address. It turns out that 0x0000000000000000000000000000000000000000 address has a balance of 2 Dai.