Catch list deposit wallet address error to set empty array to wallet transactions
This commit is contained in:
parent
358659efca
commit
59538d23d0
@ -41,20 +41,23 @@ const handleWithDrawDeposit = async (depositID: BigNumber, index: number) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
watch(walletAddress, async () => {
|
watch(walletAddress, async () => {
|
||||||
const walletDeposits = await listValidDepositTransactionsByWalletAddress(
|
await listValidDepositTransactionsByWalletAddress(walletAddress.value)
|
||||||
walletAddress.value
|
.then((res) => {
|
||||||
);
|
if (res) depositList.value = res;
|
||||||
if (walletDeposits) {
|
})
|
||||||
depositList.value = walletDeposits;
|
.catch(() => {
|
||||||
}
|
depositList.value = [];
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(networkName, async () => {
|
watch(networkName, async () => {
|
||||||
await listValidDepositTransactionsByWalletAddress(walletAddress.value).then(
|
await listValidDepositTransactionsByWalletAddress(walletAddress.value)
|
||||||
(res) => {
|
.then((res) => {
|
||||||
if (res) depositList.value = res;
|
if (res) depositList.value = res;
|
||||||
}
|
})
|
||||||
);
|
.catch(() => {
|
||||||
|
depositList.value = [];
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -20,14 +20,22 @@ onMounted(async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
watch(walletAddress, async (newValue) => {
|
watch(walletAddress, async (newValue) => {
|
||||||
await listAllTransactionByWalletAddress(newValue).then((res) => {
|
await listAllTransactionByWalletAddress(newValue)
|
||||||
|
.then((res) => {
|
||||||
if (res) allUserTransactions.value = res;
|
if (res) allUserTransactions.value = res;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
allUserTransactions.value = [];
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(networkName, async () => {
|
watch(networkName, async () => {
|
||||||
await listAllTransactionByWalletAddress(walletAddress.value).then((res) => {
|
await listAllTransactionByWalletAddress(walletAddress.value)
|
||||||
|
.then((res) => {
|
||||||
if (res) allUserTransactions.value = res;
|
if (res) allUserTransactions.value = res;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
allUserTransactions.value = [];
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user