Update [address].vue

This commit is contained in:
Georges KABBOUCHI 2022-06-09 18:07:17 +03:00
parent 84f15e2b2f
commit 0707b305c8

View File

@ -156,9 +156,7 @@ const detectedNetworks = computed(() => [
...new Set( ...new Set(
taskResults.value.flatMap(({ networkResults }) => { taskResults.value.flatMap(({ networkResults }) => {
if (networkResults) { if (networkResults) {
return Object return Object.keys(networkResults).filter(
.keys(networkResults)
.filter(
(network) => !!networkResults[network].metadata (network) => !!networkResults[network].metadata
); );
} }
@ -181,6 +179,15 @@ onMounted(async () => {
return; return;
} }
if (address.value) {
mainnetProvider
.lookupAddress(address.value)
.then(async (result) => {
ens.value = result;
})
.catch((err) => {});
}
for (let index = 0; index < tasks.length; index++) { for (let index = 0; index < tasks.length; index++) {
const task = tasks[index]; const task = tasks[index];
@ -228,10 +235,6 @@ onMounted(async () => {
: "error"; : "error";
taskResults.value[index].loading = false; taskResults.value[index].loading = false;
} }
if (address.value) {
ens.value = await mainnetProvider.lookupAddress(address.value);
}
}); });
</script> </script>