Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Reduce calls to IDX profile streams
Sebastian Martinez committed 4 years ago
commit 5015018b6eac312877b7941415836daa63c68d40
parent 75983dc98ee0654f9af2aed7e08119527cfa4a3a
1 file changed +4 -7
modified src/profile.ts
@@ -100,13 +100,10 @@ export class Profile {
    }

    try {
-
      const [ens, idx] = await Promise.allSettled([
-
        resolveEnsProfile(address, profileType, config),
-
        resolveIdxProfile(formatCAIP10Address(address, "eip155", config.network.chainId), config)
-
      ]);
-

-
      if (ens.status == "fulfilled") profile.ens = ens.value;
-
      if (idx.status == "fulfilled") profile.idx = idx.value;
+
      profile.ens = await resolveEnsProfile(address, profileType, config);
+
      if (!profile.ens) {
+
        profile.idx = await resolveIdxProfile(formatCAIP10Address(address, "eip155", config.network.chainId), config);
+
      }
    } catch (error) {
      console.error(error);
    }