fix waiting component to be rendered by adding the function to render listing component on unMounted lifecycle
This commit is contained in:
parent
34c5ce3b87
commit
309c57b808
@ -10,7 +10,7 @@ import type { ValidDeposit } from "@/model/ValidDeposit";
|
|||||||
import type { WalletTransaction } from "@/model/WalletTransaction";
|
import type { WalletTransaction } from "@/model/WalletTransaction";
|
||||||
import { useEtherStore } from "@/store/ether";
|
import { useEtherStore } from "@/store/ether";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import ListingComponent from "../ListingComponent/ListingComponent.vue";
|
import ListingComponent from "../ListingComponent/ListingComponent.vue";
|
||||||
|
|
||||||
// props
|
// props
|
||||||
@ -65,16 +65,17 @@ const callWithdraw = async (amount: string) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
await getWalletTransactions();
|
|
||||||
|
|
||||||
// Emits
|
// Emits
|
||||||
const emit = defineEmits(["makeAnotherTransaction"]);
|
const emit = defineEmits(["makeAnotherTransaction"]);
|
||||||
|
|
||||||
// observer
|
// observer
|
||||||
watch(props, async (): Promise<void> => {
|
watch(props, async (): Promise<void> => {
|
||||||
console.log(props);
|
|
||||||
if (props.isCurrentStep) await getWalletTransactions();
|
if (props.isCurrentStep) await getWalletTransactions();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await getWalletTransactions();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -11,6 +11,7 @@ import { addLock, releaseLock } from "@/blockchain/buyerMethods";
|
|||||||
import { updateWalletStatus, checkUnreleasedLock } from "@/blockchain/wallet";
|
import { updateWalletStatus, checkUnreleasedLock } from "@/blockchain/wallet";
|
||||||
import { getNetworksLiquidity } from "@/blockchain/events";
|
import { getNetworksLiquidity } from "@/blockchain/events";
|
||||||
import type { ValidDeposit } from "@/model/ValidDeposit";
|
import type { ValidDeposit } from "@/model/ValidDeposit";
|
||||||
|
import router from "@/router";
|
||||||
|
|
||||||
enum Step {
|
enum Step {
|
||||||
Search,
|
Search,
|
||||||
@ -67,7 +68,7 @@ const releaseTransaction = async (e2eId: string) => {
|
|||||||
e2eId,
|
e2eId,
|
||||||
lockID.value
|
lockID.value
|
||||||
);
|
);
|
||||||
release.wait();
|
await release.wait();
|
||||||
|
|
||||||
await updateWalletStatus();
|
await updateWalletStatus();
|
||||||
loadingRelease.value = false;
|
loadingRelease.value = false;
|
||||||
@ -87,10 +88,6 @@ const checkForUnreleasedLocks = async (): Promise<void> => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (walletAddress.value) {
|
|
||||||
await checkForUnreleasedLocks();
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(walletAddress, async () => {
|
watch(walletAddress, async () => {
|
||||||
await checkForUnreleasedLocks();
|
await checkForUnreleasedLocks();
|
||||||
});
|
});
|
||||||
@ -101,6 +98,7 @@ watch(networkName, async () => {
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getNetworksLiquidity();
|
await getNetworksLiquidity();
|
||||||
|
if (walletAddress.value) await checkForUnreleasedLocks();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user