Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add quorum information to org
Alexis Sellier committed 4 years ago
commit b58d7b1cb7ba0ffc844c1b167fa93464d5a58b74
parent 6d447622a2b496dba629984f604eb8cb0b872b12
2 files changed +19 -0
modified src/base/orgs/Org.ts
@@ -6,6 +6,7 @@ import { OperationType } from "@gnosis.pm/safe-core-sdk-types";
import { Profile, ProfileType } from '@app/profile';
import { assert } from '@app/error';
import * as utils from '@app/utils';
+
import type { Safe } from '@app/utils';
import type { Config } from '@app/config';
import type { Project } from '@app/project';

@@ -115,6 +116,10 @@ export class Org {
    return [];
  }

+
  async getSafe(config: Config): Promise<Safe | null> {
+
    return utils.getSafe(this.owner, config);
+
  }
+

  async isMember(address: string, config: Config): Promise<boolean> {
    const members = await this.getMembers(config);
    return members.includes(ethers.utils.getAddress(address));
modified src/base/orgs/View.svelte
@@ -260,6 +260,20 @@
              {/await}
            </div>
          {/if}
+
          <!-- Quorum -->
+
          <div class="label">Quorum</div>
+
          <div>
+
            {#await org.getSafe(config)}
+
              <Loading small />
+
            {:then safe}
+
              {#if safe}
+
                {safe.threshold} <span class="faded">of</span> {safe.owners.length}
+
              {:else}
+
                N/A
+
              {/if}
+
            {/await}
+
          </div>
+
          <div></div>
        </div>

        {#await org.getMembers(config)}