Add watch to network when user is on manage bids or transaction history
Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import type { ValidDeposit } from "@/model/ValidDeposit";
|
||||
|
||||
const etherStore = useEtherStore();
|
||||
|
||||
const { walletAddress } = storeToRefs(etherStore);
|
||||
const { walletAddress, networkName } = storeToRefs(etherStore);
|
||||
const depositList = ref<ValidDeposit[]>([]);
|
||||
|
||||
if (walletAddress.value) {
|
||||
@@ -46,6 +46,12 @@ watch(walletAddress, async () => {
|
||||
depositList.value = walletDeposits;
|
||||
}
|
||||
});
|
||||
|
||||
watch(networkName, async () => {
|
||||
await listValidDepositTransactionsByWalletAddress(walletAddress.value).then((res) => {
|
||||
if (res) depositList.value = res;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user