mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-03 18:50:30 +08:00
Add quorum information to org
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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)}
|
||||
|
||||
Reference in New Issue
Block a user