diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 13c4580f..454150be 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -1462,7 +1462,7 @@ export type CreateDomainInput = { isRoot: Scalars['Boolean']; nativeFundingPotId: Scalars['Int']; nativeId: Scalars['Int']; - nativeSkillId: Scalars['Int']; + nativeSkillId: Scalars['String']; reputation?: InputMaybe; reputationPercentage?: InputMaybe; }; @@ -1890,7 +1890,7 @@ export type Domain = { * Native skill ID of the Domain * The native skill ID is assigned to a domain from the contract on creation */ - nativeSkillId: Scalars['Int']; + nativeSkillId: Scalars['String']; /** The amount of reputation in the domain */ reputation?: Maybe; /** The amount of reputation in the domain, as a percentage of the total in the colony */ @@ -3095,7 +3095,7 @@ export type ModelDomainConditionInput = { isRoot?: InputMaybe; nativeFundingPotId?: InputMaybe; nativeId?: InputMaybe; - nativeSkillId?: InputMaybe; + nativeSkillId?: InputMaybe; not?: InputMaybe; or?: InputMaybe>>; reputation?: InputMaybe; @@ -3115,7 +3115,7 @@ export type ModelDomainFilterInput = { isRoot?: InputMaybe; nativeFundingPotId?: InputMaybe; nativeId?: InputMaybe; - nativeSkillId?: InputMaybe; + nativeSkillId?: InputMaybe; not?: InputMaybe; or?: InputMaybe>>; reputation?: InputMaybe; @@ -3996,7 +3996,7 @@ export type ModelSubscriptionDomainFilterInput = { isRoot?: InputMaybe; nativeFundingPotId?: InputMaybe; nativeId?: InputMaybe; - nativeSkillId?: InputMaybe; + nativeSkillId?: InputMaybe; or?: InputMaybe>>; reputation?: InputMaybe; reputationPercentage?: InputMaybe; @@ -6156,7 +6156,7 @@ export type QueryGetDomainByNativeSkillIdArgs = { filter?: InputMaybe; limit?: InputMaybe; nativeId?: InputMaybe; - nativeSkillId: Scalars['Int']; + nativeSkillId: Scalars['String']; nextToken?: InputMaybe; sortDirection?: InputMaybe; }; @@ -8327,7 +8327,7 @@ export type UpdateDomainInput = { isRoot?: InputMaybe; nativeFundingPotId?: InputMaybe; nativeId?: InputMaybe; - nativeSkillId?: InputMaybe; + nativeSkillId?: InputMaybe; reputation?: InputMaybe; reputationPercentage?: InputMaybe; }; @@ -8769,7 +8769,7 @@ export type ColonyFragment = { items: Array<{ __typename?: 'Domain'; id: string; - nativeSkillId: number; + nativeSkillId: string; } | null>; } | null; }; @@ -9682,7 +9682,7 @@ export type GetColonyQuery = { items: Array<{ __typename?: 'Domain'; id: string; - nativeSkillId: number; + nativeSkillId: string; } | null>; } | null; } | null; @@ -9820,7 +9820,7 @@ export type GetDomainMetadataQuery = { }; export type GetDomainByNativeSkillIdQueryVariables = Exact<{ - nativeSkillId: Scalars['Int']; + nativeSkillId: Scalars['String']; }>; export type GetDomainByNativeSkillIdQuery = { @@ -9830,7 +9830,7 @@ export type GetDomainByNativeSkillIdQuery = { items: Array<{ __typename?: 'Domain'; id: string; - nativeSkillId: number; + nativeSkillId: string; nativeId: number; } | null>; } | null; @@ -11267,7 +11267,7 @@ export const GetDomainMetadataDocument = gql` } `; export const GetDomainByNativeSkillIdDocument = gql` - query GetDomainByNativeSkillId($nativeSkillId: Int!) { + query GetDomainByNativeSkillId($nativeSkillId: String!) { getDomainByNativeSkillId(nativeSkillId: $nativeSkillId) { items { id diff --git a/src/graphql/queries/domain.graphql b/src/graphql/queries/domain.graphql index c953edc6..dcf0b23e 100644 --- a/src/graphql/queries/domain.graphql +++ b/src/graphql/queries/domain.graphql @@ -16,7 +16,7 @@ query GetDomainMetadata($id: ID!) { } } -query GetDomainByNativeSkillId($nativeSkillId: Int!) { +query GetDomainByNativeSkillId($nativeSkillId: String!) { getDomainByNativeSkillId(nativeSkillId: $nativeSkillId) { items { id diff --git a/src/handlers/multiSig/multiSigCreated/helpers.ts b/src/handlers/multiSig/multiSigCreated/helpers.ts index cc390b13..989b03a9 100644 --- a/src/handlers/multiSig/multiSigCreated/helpers.ts +++ b/src/handlers/multiSig/multiSigCreated/helpers.ts @@ -140,7 +140,7 @@ export const getMultiSigData = async ({ }; const getDomainIdByNativeSkillId = async ( - nativeSkillId: number, + nativeSkillId: string, ): Promise => { const result = await query< GetDomainByNativeSkillIdQuery, @@ -192,7 +192,7 @@ export const createMultiSigInDB = async ( const motion = await multiSigClient.getMotion(multiSigId); const domainId = await getDomainIdByNativeSkillId( - motion.domainSkillId.toNumber(), + motion.domainSkillId.toString(), ); if (domainId === null) { diff --git a/src/utils/events.ts b/src/utils/events.ts index e8a09e4a..dac27aae 100644 --- a/src/utils/events.ts +++ b/src/utils/events.ts @@ -114,7 +114,7 @@ export const saveEvent = async (event: ContractEvent): Promise => { id: `${chainId}_${transactionHash}_${logIndex}`, agent: parsedArgs?.agent || contractAddress, chainMetadata: { - chainId: Number(chainId), // @TODO why did this change? + chainId, transactionHash, logIndex, blockNumber, diff --git a/src/utils/permissions.ts b/src/utils/permissions.ts index bd8d776e..fd194484 100644 --- a/src/utils/permissions.ts +++ b/src/utils/permissions.ts @@ -592,11 +592,9 @@ export const createInitialMultiSigRolesDatabaseEntry = async ( contributorAddress: targetAddress, }); - const installedExtensions = new Set( - await getExtensionInstallations(colonyAddress), - ); + const isExtension = await isAddressExtension(targetAddress); - if (!isContributor && !installedExtensions.has(targetAddress)) { + if (!isContributor && !isExtension) { await createColonyContributor({ colonyAddress, contributorAddress: targetAddress,