diff --git a/content/resources/dev-tools/toml-checker/ListTomlFields.tsx b/content/resources/dev-tools/toml-checker/ListTomlFields.tsx index 3a17f1b18eb..de5af0ee4dc 100644 --- a/content/resources/dev-tools/toml-checker/ListTomlFields.tsx +++ b/content/resources/dev-tools/toml-checker/ListTomlFields.tsx @@ -1,13 +1,11 @@ import { clsx } from 'clsx' import { Client } from 'xrpl' - -// Decode a hexadecimal string into a regular string, assuming 8-bit characters. -// Not proper unicode decoding, but it'll work for domains which are supposed - import React = require("react"); import { CLASS_GOOD } from "../components/LogEntry"; import { AccountFields } from "./XrplToml"; +// Decode a hexadecimal string into a regular string, assuming 8-bit characters. +// Not proper unicode decoding, but it'll work for domains which are supposed // to be a subset of ASCII anyway. function decodeHex(hex) { let str = ''; @@ -135,19 +133,26 @@ export async function getListEntries(fields: Object[], filter?: Function, domain }) const key = `entry-${formattedEntries.length}` + const promises = [] if(domainToVerify) { const accountEntry = entry as AccountFields if(accountEntry.address) { const net = accountEntry.network ?? "main" - const domainIsValid = await validateAddressDomainOnNet(accountEntry.address, domainToVerify, net) + const domainIsValid = validateAddressDomainOnNet(accountEntry.address, domainToVerify, net) - if(domainIsValid) { - displayedFields.push( -
  • DOMAIN VALIDATED
  • - ) - } + domainIsValid.then((wasValidated) => { + if(wasValidated) { + displayedFields.push( +
  • DOMAIN VALIDATED
  • + ) + } + }) + + promises.push(domainIsValid) } } + + await Promise.all(promises) formattedEntries.push((
    • {displayedFields}
    diff --git a/content/resources/dev-tools/toml-checker/ValidateTomlSteps.tsx b/content/resources/dev-tools/toml-checker/ValidateTomlSteps.tsx index df4f855670b..fbd4959b389 100644 --- a/content/resources/dev-tools/toml-checker/ValidateTomlSteps.tsx +++ b/content/resources/dev-tools/toml-checker/ValidateTomlSteps.tsx @@ -45,7 +45,7 @@ async function validateAndDisplayFields( status: { followUpMessage: (
      - {formattedEntries} + {formattedEntries}
    ), icon: icon