denormalized PairEntry, cleaned up console logs

This commit is contained in:
Tim Olson
2023-10-04 18:05:43 -04:00
parent 7239987867
commit c206607547
7 changed files with 84 additions and 139 deletions

View File

@@ -5,14 +5,14 @@ export let provider = null
function onChainChanged(chainId) {
chainId = Number(chainId)
console.log('chain changed', chainId)
// console.log('chain changed', chainId)
const store = useStore()
store.chainId = chainId
provider = new ethers.BrowserProvider(window.ethereum, chainId)
}
function onAccountsChanged(accounts) {
console.log('accounts changed', accounts)
// console.log('accounts changed', accounts)
const store = useStore()
if( accounts.length === 0 ) {
store.account = null
@@ -47,12 +47,12 @@ const errorHandlingProxy = {
if( x.code === 'NETWORK_ERROR' ) {
// todo available chain names
// store.error('Wrong Blockchain', 'Your wallet is connected to a different blockchain. Please select Arbitrum in your wallet.') // todo hardcoded arb
console.log('wallet chain error', x)
console.error('wallet chain error', x)
// store.chainId = store.chainInfo[]
throw x
}
else {
console.log('wallet error')
console.error('wallet error')
throw x
}
}