order placement working
This commit is contained in:
@@ -9,10 +9,15 @@ export function onChainChanged(chainId) {
|
||||
chainId = Number(chainId)
|
||||
// console.log('chain changed', chainId)
|
||||
const store = useStore()
|
||||
store.chainId = chainId
|
||||
store.account = null
|
||||
provider = new ethers.BrowserProvider(window.ethereum, chainId)
|
||||
provider.listAccounts().then(onAccountsChanged)
|
||||
if( chainId !== store.chainId ) {
|
||||
store.chainId = chainId
|
||||
store.account = null
|
||||
provider = new ethers.BrowserProvider(window.ethereum, chainId)
|
||||
provider.listAccounts().then(onAccountsChanged)
|
||||
new ethers.Interface([
|
||||
// 'event DexorderSwapCreated' // todo
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
function onAccountsChanged(accounts) {
|
||||
|
||||
Reference in New Issue
Block a user