diff --git a/src/components/ListingComponent.vue b/src/components/ListingComponent.vue index 2166135..c58c07c 100644 --- a/src/components/ListingComponent.vue +++ b/src/components/ListingComponent.vue @@ -43,6 +43,18 @@ const loadMore = (): void => { ); }; +const getEventName = (event: string | undefined): string => { + if (!event) return "Desconhecido"; + + const possibleEventName: { [key: string]: string } = { + DepositAdded: "Oferta", + LockAdded: "Compra", + LockReleased: "Reserva", + }; + + return possibleEventName[event]; +}; + // watch props changes watch(props, async (): Promise => { const itemsToShowQty = itemsToShow.value.length; @@ -95,6 +107,19 @@ showInitialItems(); 20 out 2022 + + {{ getEventName((item as Event).event) }} + + +
+ Etherscan + Redirect image +
+
- - {{ "Oferta" }} - - - - {{ "Reserva" }} - - - - {{ "Compra" }} - -
Retirar Cancel image
- -
- Etherscan - Redirect image -
([]); 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; + }); +});