major refactor of web store into vue setup style declaration; reactivity debugging; order view has known refresh issues
This commit is contained in:
@@ -3,14 +3,13 @@ import {Exchange} from "@/blockchain/orderlib.js";
|
||||
import {useStore} from "@/store/store.js";
|
||||
|
||||
|
||||
export async function findRoute(tokenA, tokenB) {
|
||||
export async function findRoute(chainId, tokenA, tokenB) {
|
||||
const helper = await queryHelperContract()
|
||||
if (!helper)
|
||||
throw Error('no helper')
|
||||
const chainId = useStore().chainId
|
||||
const rawRoutes = await helper.getRoutes(tokenA.address, tokenB.address)
|
||||
// todo expose all available pools
|
||||
// console.log('raw routes', rawRoutes)
|
||||
console.log('raw routes', rawRoutes)
|
||||
let result = null // we actually only find a single pool for now
|
||||
for (let [exchange, fee, pool] of rawRoutes) {
|
||||
exchange = Number(exchange)
|
||||
|
||||
Reference in New Issue
Block a user