From 309c57b8081a01e3a607626c5e3f0a1ca543da17 Mon Sep 17 00:00:00 2001 From: RcleydsonR Date: Mon, 27 Feb 2023 17:23:46 -0300 Subject: [PATCH] fix waiting component to be rendered by adding the function to render listing component on unMounted lifecycle --- .../BuyConfirmedComponent/BuyConfirmedComponent.vue | 9 +++++---- src/views/HomeView.vue | 8 +++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/components/BuyConfirmedComponent/BuyConfirmedComponent.vue b/src/components/BuyConfirmedComponent/BuyConfirmedComponent.vue index 08af84f..92ec39c 100644 --- a/src/components/BuyConfirmedComponent/BuyConfirmedComponent.vue +++ b/src/components/BuyConfirmedComponent/BuyConfirmedComponent.vue @@ -10,7 +10,7 @@ import type { ValidDeposit } from "@/model/ValidDeposit"; import type { WalletTransaction } from "@/model/WalletTransaction"; import { useEtherStore } from "@/store/ether"; import { storeToRefs } from "pinia"; -import { ref, watch } from "vue"; +import { onMounted, ref, watch } from "vue"; import ListingComponent from "../ListingComponent/ListingComponent.vue"; // props @@ -65,16 +65,17 @@ const callWithdraw = async (amount: string) => { } }; -await getWalletTransactions(); - // Emits const emit = defineEmits(["makeAnotherTransaction"]); // observer watch(props, async (): Promise => { - console.log(props); if (props.isCurrentStep) await getWalletTransactions(); }); + +onMounted(async () => { + await getWalletTransactions(); +});