chainInfo from server, routes, wallet rework
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
:label="label"
|
||||
v-bind="modelValue" @update:modelValue="updateValue"
|
||||
variant="outlined"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
>
|
||||
<template v-slot:prepend><slot name="prepend"/></template>
|
||||
<template v-slot:item="{props,item}">
|
||||
@@ -76,8 +77,6 @@ function updateValue(v) {
|
||||
|
||||
<script>
|
||||
import {ethers} from "ethers";
|
||||
import wallet from "@/blockchain/wallet.js";
|
||||
import {erc20Abi} from "@/blockchain/abi.js";
|
||||
import {useStore} from "@/store/store.js";
|
||||
import {socket} from "@/socket.js";
|
||||
|
||||
@@ -85,14 +84,14 @@ const s = useStore()
|
||||
|
||||
async function addExtraToken(addr) {
|
||||
const prom = new Promise((resolve)=>{
|
||||
socket.emit('lookupToken', s.chain.id, addr, (info) => {
|
||||
socket.emit('lookupToken', s.chainId, addr, (info) => {
|
||||
if( info === null )
|
||||
return resolve(null)
|
||||
s.$patch((state)=>{
|
||||
let extras = state.extraTokens[state.chain.id]
|
||||
let extras = state.extraTokens[state.chainId]
|
||||
if( extras === undefined ) {
|
||||
extras = {}
|
||||
state.extraTokens[state.chain.id] = extras
|
||||
state.extraTokens[state.chainId] = extras
|
||||
}
|
||||
extras[info.address] = info
|
||||
})
|
||||
@@ -106,5 +105,4 @@ async function addExtraToken(addr) {
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "src/styles/vars" as *;
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user