From b58d7b1cb7ba0ffc844c1b167fa93464d5a58b74 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Fri, 1 Oct 2021 10:43:41 +0200 Subject: [PATCH] Add quorum information to org Signed-off-by: Alexis Sellier --- src/base/orgs/Org.ts | 5 +++++ src/base/orgs/View.svelte | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/base/orgs/Org.ts b/src/base/orgs/Org.ts index 35a31cbb2..b92a08a96 100644 --- a/src/base/orgs/Org.ts +++ b/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 { + return utils.getSafe(this.owner, config); + } + async isMember(address: string, config: Config): Promise { const members = await this.getMembers(config); return members.includes(ethers.utils.getAddress(address)); diff --git a/src/base/orgs/View.svelte b/src/base/orgs/View.svelte index cf1794fc2..8736a75fd 100644 --- a/src/base/orgs/View.svelte +++ b/src/base/orgs/View.svelte @@ -260,6 +260,20 @@ {/await} {/if} + +
Quorum
+
+ {#await org.getSafe(config)} + + {:then safe} + {#if safe} + {safe.threshold} of {safe.owners.length} + {:else} + N/A + {/if} + {/await} +
+
{#await org.getMembers(config)}