Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix indentation
Alexis Sellier committed 4 years ago
commit 8d91e480c5bb7723de369ad13ad6527e372a0433
parent 821e4c363d4967a8f6d137693234e616b1a8e703
1 file changed +9 -9
modified src/utils.ts
@@ -127,16 +127,16 @@ export function formatProjectHash(hash: Uint8Array, format: number): string {

// Identify an address by checking whether it's a contract or an externally-owned address.
export async function identifyAddress(address: string, config: Config): Promise<AddressType> {
-
    let code = await config.provider.getCode(address);
-
    let bytes = ethers.utils.arrayify(code);
-

-
    if (bytes.length > 0) {
-
      if (ethers.utils.keccak256(bytes) === config.orgs.contractHash) {
-
        return AddressType.Org;
-
      }
-
      return AddressType.Contract;
+
  let code = await config.provider.getCode(address);
+
  let bytes = ethers.utils.arrayify(code);
+

+
  if (bytes.length > 0) {
+
    if (ethers.utils.keccak256(bytes) === config.orgs.contractHash) {
+
      return AddressType.Org;
    }
-
    return AddressType.EOA;
+
    return AddressType.Contract;
+
  }
+
  return AddressType.EOA;
}

// Resolve a label under the radicle domain.