route price lookup fixes
This commit is contained in:
@@ -109,7 +109,7 @@ function discoverVaults() {
|
||||
if( result.length )
|
||||
flushOrders(result[0])
|
||||
else
|
||||
ensureVault()
|
||||
ensureVault2(s.chainId, owner, 0)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -136,15 +136,20 @@ async function _discoverVaults(owner) {
|
||||
|
||||
export function ensureVault() {
|
||||
const s = useStore()
|
||||
if( !s.chain ) {
|
||||
ensureVault2(s.chainId, s.account, 0)
|
||||
}
|
||||
|
||||
|
||||
export function ensureVault2(chainId, owner, num) {
|
||||
if( !chainId ) {
|
||||
console.log('cannot create vault: no chain selected')
|
||||
return
|
||||
}
|
||||
if( !s.account ) {
|
||||
if( !owner ) {
|
||||
console.log('cannot create vault: no account logged in')
|
||||
return
|
||||
}
|
||||
socket.emit('ensureVault', s.chainId, s.account, 0)
|
||||
socket.emit('ensureVault', chainId, owner, num)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user