Added different types of tokens.

This commit is contained in:
Filipe Soccol
2024-08-07 14:09:23 -03:00
parent 0a51a80e0c
commit f15361599f
19 changed files with 244 additions and 76 deletions

View File

@@ -17,8 +17,7 @@ import type { WalletTransaction } from "@/model/WalletTransaction";
import router from "@/router/index";
const etherStore = useEtherStore();
const { walletAddress, networkName } = storeToRefs(etherStore);
const { walletAddress, networkName, selectedToken } = storeToRefs(etherStore);
const loadingWithdraw = ref<boolean>(false);
const showAlert = ref<boolean>(false);
@@ -31,7 +30,7 @@ const callWithdraw = async (amount: string) => {
loadingWithdraw.value = true;
let withdraw;
try {
withdraw = await withdrawDeposit(amount);
withdraw = await withdrawDeposit(amount, selectedToken.value);
} catch {
loadingWithdraw.value = false;
}