refactored network selection

This commit is contained in:
hueso
2025-10-11 02:17:07 -03:00
parent 7ec73e8c6f
commit a906fa136d
23 changed files with 174 additions and 336 deletions

View File

@@ -16,7 +16,7 @@ import type { WalletTransaction } from "@/model/WalletTransaction";
import router from "@/router/index";
const user = useUser();
const { walletAddress, networkName, selectedToken } = user;
const { walletAddress, network, selectedToken } = user;
const loadingWithdraw = ref<boolean>(false);
const showAlert = ref<boolean>(false);
@@ -29,7 +29,9 @@ const callWithdraw = async (amount: string) => {
loadingWithdraw.value = true;
let withdraw;
try {
withdraw = await withdrawDeposit(amount, selectedToken.value);
withdraw = await withdrawDeposit(
amount,
network.value.tokens[selectedToken.value].address);
} catch {
loadingWithdraw.value = false;
}
@@ -79,7 +81,7 @@ watch(walletAddress, async () => {
await getWalletTransactions();
});
watch(networkName, async () => {
watch(network, async () => {
await getWalletTransactions();
});
</script>