withdraw fix

This commit is contained in:
Tim
2024-03-27 22:19:33 -04:00
parent 0271494846
commit 0fc6fc7168
2 changed files with 8 additions and 7 deletions

View File

@@ -97,6 +97,7 @@ import {vaultAddress} from "@/blockchain/contract.js";
import {ensureVault} from "@/blockchain/wallet.js";
import CopyButton from "@/components/CopyButton.vue";
import Withdraw from "@/components/Withdraw.vue";
import {getToken} from "@/blockchain/token.js";
const TokenRow = defineAsyncComponent(()=>import('./TokenRow.vue'))
const s = useStore()
@@ -113,8 +114,8 @@ const exists = computed(()=>s.vaults.length>0)
const withdrawToken = ref(null)
const withdrawShow = ref(false)
function onWithdraw(addr) {
const token = s.tokens[addr]
async function onWithdraw(addr) {
const token = await getToken(s.chainId, addr)
console.log('withdraw', addr, token)
withdrawToken.value = token
withdrawShow.value = true