From e1453b5e56fc61fef4abe4b227ada5ccb277c86a Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Fri, 3 May 2024 16:02:10 +0100 Subject: [PATCH 001/126] Feat: Cancel streams using permissions --- .../api/colonycdapp/schema/schema.graphql | 12 ++++ .../fragments/streamingPayment.graphql | 4 ++ src/graphql/generated.ts | 70 +++++++++++++++++++ .../expenditures/cancelStreamingPayment.ts | 15 ++-- 4 files changed, 96 insertions(+), 5 deletions(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index b785263c1df..ea797f86cad 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -3639,6 +3639,18 @@ type ApprovedTokenChanges { type ExpenditureSlotChanges { oldSlots: [ExpenditureSlot!]! newSlots: [ExpenditureSlot!]! + """ + ID of the associated streaming payment, if any + """ + streamingPaymentId: ID + @index( + name: "byStreamingPaymentId" + queryField: "getActionByStreamingPaymentId" + ) + """ + Streaming payment associated with the action, if any + """ + streamingPayment: StreamingPayment @hasOne(fields: ["streamingPaymentId"]) } type ColonyActionMetadata @model { diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index e8750757dbc..844beaaebd4 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -10,6 +10,9 @@ fragment StreamingPayment on StreamingPayment { token { ...Token } + payouts { + ...ExpenditurePayout + } amount metadata { endCondition @@ -18,6 +21,7 @@ fragment StreamingPayment on StreamingPayment { oldEndCondition newEndCondition } + limitAmount } claims { amount diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index e40083cffba..afe304c104a 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -637,12 +637,20 @@ export enum ColonyActionType { CancelExpenditure = 'CANCEL_EXPENDITURE', /** An action related to a motion to cancel an expenditure */ CancelExpenditureMotion = 'CANCEL_EXPENDITURE_MOTION', +<<<<<<< HEAD /** An action related to a multiSig to cancel a staked expenditure */ CancelStakedExpenditureMultisig = 'CANCEL_STAKED_EXPENDITURE_MULTISIG', +<<<<<<< HEAD /** An action related to cancelling a streaming payment */ CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', /** An action related to cancelling a streaming payment via a motion */ CancelStreamingPaymentMotion = 'CANCEL_STREAMING_PAYMENT_MOTION', +======= +======= + /** An action related to cancelling a streaming payment */ + CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', +>>>>>>> 93bc8196f (Feat: Cancel streams using permissions) +>>>>>>> ce1397c62 (Feat: Cancel streams using permissions) /** An action related to editing a Colony's details */ ColonyEdit = 'COLONY_EDIT', /** An action related to editing a Colony's details via a motion */ @@ -1516,7 +1524,10 @@ export type CreateColonyActionInput = { rolesAreMultiSig?: InputMaybe; rootHash: Scalars['String']; showInActionsList: Scalars['Boolean']; +<<<<<<< HEAD streamingPaymentChanges?: InputMaybe; +======= +>>>>>>> ce1397c62 (Feat: Cancel streams using permissions) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -9839,7 +9850,10 @@ export type UpdateColonyActionInput = { rolesAreMultiSig?: InputMaybe; rootHash?: InputMaybe; showInActionsList?: InputMaybe; +<<<<<<< HEAD streamingPaymentChanges?: InputMaybe; +======= +>>>>>>> ce1397c62 (Feat: Cancel streams using permissions) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -10675,6 +10689,8 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null }; + export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; export type UserTokenBalanceDataFragment = { __typename?: 'GetUserTokenBalanceReturn', balance?: string | null, inactiveBalance?: string | null, lockedBalance?: string | null, activeBalance?: string | null, pendingBalance?: string | null }; @@ -11314,6 +11330,13 @@ export type GetUserStakesQueryVariables = Exact<{ export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type: UserStakeType, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null } | null> } | null }; +export type GetStreamingPaymentQueryVariables = Exact<{ + streamingPaymentId: Scalars['ID']; +}>; + + +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null } | null }; + export type GetTokenByAddressQueryVariables = Exact<{ address: Scalars['ID']; }>; @@ -12592,6 +12615,7 @@ export const StreamingPaymentFragmentDoc = gql` startTime endTime interval +<<<<<<< HEAD tokenAddress token { ...Token @@ -12619,6 +12643,17 @@ export const StreamingPaymentChangesFragmentDoc = gql` amount } `; +======= + payouts { + ...ExpenditurePayout + } + metadata { + endCondition + limitAmount + } +} + ${ExpenditurePayoutFragmentDoc}`; +>>>>>>> ce1397c62 (Feat: Cancel streams using permissions) export const UserTokenBalanceDataFragmentDoc = gql` fragment UserTokenBalanceData on GetUserTokenBalanceReturn { balance @@ -15921,6 +15956,41 @@ export function useGetUserStakesLazyQuery(baseOptions?: Apollo.LazyQueryHookOpti export type GetUserStakesQueryHookResult = ReturnType; export type GetUserStakesLazyQueryHookResult = ReturnType; export type GetUserStakesQueryResult = Apollo.QueryResult; +export const GetStreamingPaymentDocument = gql` + query GetStreamingPayment($streamingPaymentId: ID!) { + getStreamingPayment(id: $streamingPaymentId) { + ...StreamingPayment + } +} + ${StreamingPaymentFragmentDoc}`; + +/** + * __useGetStreamingPaymentQuery__ + * + * To run a query within a React component, call `useGetStreamingPaymentQuery` and pass it any options that fit your needs. + * When your component renders, `useGetStreamingPaymentQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetStreamingPaymentQuery({ + * variables: { + * streamingPaymentId: // value for 'streamingPaymentId' + * }, + * }); + */ +export function useGetStreamingPaymentQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetStreamingPaymentDocument, options); + } +export function useGetStreamingPaymentLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetStreamingPaymentDocument, options); + } +export type GetStreamingPaymentQueryHookResult = ReturnType; +export type GetStreamingPaymentLazyQueryHookResult = ReturnType; +export type GetStreamingPaymentQueryResult = Apollo.QueryResult; export const GetTokenByAddressDocument = gql` query GetTokenByAddress($address: ID!) { getTokenByAddress(id: $address) { diff --git a/src/redux/sagas/expenditures/cancelStreamingPayment.ts b/src/redux/sagas/expenditures/cancelStreamingPayment.ts index 6465c3a14e6..64cf72b5a00 100644 --- a/src/redux/sagas/expenditures/cancelStreamingPayment.ts +++ b/src/redux/sagas/expenditures/cancelStreamingPayment.ts @@ -34,6 +34,10 @@ function* cancelStreamingPaymentAction({ const batchKey = 'cancelStreamingPayment'; const colonyManager: ColonyManager = yield getColonyManager(); + const colonyClient = yield colonyManager.getClient( + ClientType.ColonyClient, + colonyAddress, + ); const { cancelStreamingPayment, @@ -62,11 +66,6 @@ function* cancelStreamingPaymentAction({ ); } - const colonyClient = yield colonyManager.getClient( - ClientType.ColonyClient, - colonyAddress, - ); - const [permissionDomainId, childSkillIndex] = yield getPermissionProofs( colonyClient.networkClient, colonyClient, @@ -105,7 +104,13 @@ function* cancelStreamingPaymentAction({ }, ready: false, }); + } + yield takeFrom( + cancelStreamingPayment.channel, + ActionTypes.TRANSACTION_CREATED, + ); + if (annotationMessage) { yield takeFrom( annotateCancelStreamingPayment.channel, ActionTypes.TRANSACTION_CREATED, From 97d190db7cfe1172818a431b90d3bc6441821ec9 Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Thu, 9 May 2024 14:42:51 +0100 Subject: [PATCH 002/126] Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions Feat: Cancel streams using permissions --- .../api/colonycdapp/schema/schema.graphql | 12 ---------- src/graphql/generated.ts | 24 +++++++++++++++++++ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index ea797f86cad..b785263c1df 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -3639,18 +3639,6 @@ type ApprovedTokenChanges { type ExpenditureSlotChanges { oldSlots: [ExpenditureSlot!]! newSlots: [ExpenditureSlot!]! - """ - ID of the associated streaming payment, if any - """ - streamingPaymentId: ID - @index( - name: "byStreamingPaymentId" - queryField: "getActionByStreamingPaymentId" - ) - """ - Streaming payment associated with the action, if any - """ - streamingPayment: StreamingPayment @hasOne(fields: ["streamingPaymentId"]) } type ColonyActionMetadata @model { diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index afe304c104a..42a12e6d4ca 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -1933,7 +1933,10 @@ export type CreateStreamingPaymentInput = { id?: InputMaybe; interval: Scalars['String']; isCancelled?: InputMaybe; +<<<<<<< HEAD isWaived?: InputMaybe; +======= +>>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) nativeDomainId: Scalars['Int']; nativeId: Scalars['Int']; recipientAddress: Scalars['String']; @@ -4194,7 +4197,10 @@ export type ModelStreamingPaymentConditionInput = { endTime?: InputMaybe; interval?: InputMaybe; isCancelled?: InputMaybe; +<<<<<<< HEAD isWaived?: InputMaybe; +======= +>>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) nativeDomainId?: InputMaybe; nativeId?: InputMaybe; not?: InputMaybe; @@ -4225,7 +4231,10 @@ export type ModelStreamingPaymentFilterInput = { id?: InputMaybe; interval?: InputMaybe; isCancelled?: InputMaybe; +<<<<<<< HEAD isWaived?: InputMaybe; +======= +>>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) nativeDomainId?: InputMaybe; nativeId?: InputMaybe; not?: InputMaybe; @@ -4787,7 +4796,10 @@ export type ModelSubscriptionStreamingPaymentFilterInput = { id?: InputMaybe; interval?: InputMaybe; isCancelled?: InputMaybe; +<<<<<<< HEAD isWaived?: InputMaybe; +======= +>>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) nativeDomainId?: InputMaybe; nativeId?: InputMaybe; or?: InputMaybe>>; @@ -8645,12 +8657,15 @@ export type StakerRewardsInput = { export type StreamingPayment = { __typename?: 'StreamingPayment'; actions?: Maybe; +<<<<<<< HEAD amount: Scalars['String']; claims?: Maybe>; /** The Colony to which the expenditure belongs */ colony: Colony; /** Colony ID (address) to which the expenditure belongs */ colonyId: Scalars['ID']; +======= +>>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) createdAt: Scalars['AWSDateTime']; /** Address of the stream creator, can be a user or an extension */ creatorAddress: Scalars['ID']; @@ -8659,8 +8674,11 @@ export type StreamingPayment = { interval: Scalars['String']; /** Is the stream cancelled? */ isCancelled?: Maybe; +<<<<<<< HEAD /** Is the stream waived? */ isWaived?: Maybe; +======= +>>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) metadata?: Maybe; motions?: Maybe; nativeDomainId: Scalars['Int']; @@ -8681,6 +8699,7 @@ export type StreamingPaymentActionsArgs = { sortDirection?: InputMaybe; }; +<<<<<<< HEAD export type StreamingPaymentMotionsArgs = { filter?: InputMaybe; @@ -8728,6 +8747,8 @@ export type StreamingPaymentClaimInput = { timestamp: Scalars['String']; }; +======= +>>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) export enum StreamingPaymentEndCondition { FixedTime = 'FIXED_TIME', LimitReached = 'LIMIT_REACHED', @@ -10265,7 +10286,10 @@ export type UpdateStreamingPaymentInput = { id: Scalars['ID']; interval?: InputMaybe; isCancelled?: InputMaybe; +<<<<<<< HEAD isWaived?: InputMaybe; +======= +>>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) nativeDomainId?: InputMaybe; nativeId?: InputMaybe; recipientAddress?: InputMaybe; From 01a7b324f6da182a09e05dab4c191f8e3278e93e Mon Sep 17 00:00:00 2001 From: Dave Creaser Date: Fri, 3 May 2024 17:30:01 +0100 Subject: [PATCH 003/126] Create claim streaming payment saga --- src/graphql/generated.ts | 49 +++---------------- src/hooks/useStreamingPayments.ts | 25 ++++++++++ .../expenditures/claimStreamingPayment.ts | 8 ++- src/redux/types/actions/expenditures.ts | 1 + 4 files changed, 40 insertions(+), 43 deletions(-) create mode 100644 src/hooks/useStreamingPayments.ts diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 42a12e6d4ca..71f035783c5 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -11238,6 +11238,13 @@ export type GetStreamingPaymentQueryVariables = Exact<{ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; +export type GetStreamingPaymentQueryVariables = Exact<{ + streamingPaymentId: Scalars['ID']; +}>; + + +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null } | null }; + export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; }>; @@ -11354,13 +11361,6 @@ export type GetUserStakesQueryVariables = Exact<{ export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type: UserStakeType, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null } | null> } | null }; -export type GetStreamingPaymentQueryVariables = Exact<{ - streamingPaymentId: Scalars['ID']; -}>; - - -export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null } | null }; - export type GetTokenByAddressQueryVariables = Exact<{ address: Scalars['ID']; }>; @@ -15980,41 +15980,6 @@ export function useGetUserStakesLazyQuery(baseOptions?: Apollo.LazyQueryHookOpti export type GetUserStakesQueryHookResult = ReturnType; export type GetUserStakesLazyQueryHookResult = ReturnType; export type GetUserStakesQueryResult = Apollo.QueryResult; -export const GetStreamingPaymentDocument = gql` - query GetStreamingPayment($streamingPaymentId: ID!) { - getStreamingPayment(id: $streamingPaymentId) { - ...StreamingPayment - } -} - ${StreamingPaymentFragmentDoc}`; - -/** - * __useGetStreamingPaymentQuery__ - * - * To run a query within a React component, call `useGetStreamingPaymentQuery` and pass it any options that fit your needs. - * When your component renders, `useGetStreamingPaymentQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useGetStreamingPaymentQuery({ - * variables: { - * streamingPaymentId: // value for 'streamingPaymentId' - * }, - * }); - */ -export function useGetStreamingPaymentQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(GetStreamingPaymentDocument, options); - } -export function useGetStreamingPaymentLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(GetStreamingPaymentDocument, options); - } -export type GetStreamingPaymentQueryHookResult = ReturnType; -export type GetStreamingPaymentLazyQueryHookResult = ReturnType; -export type GetStreamingPaymentQueryResult = Apollo.QueryResult; export const GetTokenByAddressDocument = gql` query GetTokenByAddress($address: ID!) { getTokenByAddress(id: $address) { diff --git a/src/hooks/useStreamingPayments.ts b/src/hooks/useStreamingPayments.ts new file mode 100644 index 00000000000..deaa2c74aad --- /dev/null +++ b/src/hooks/useStreamingPayments.ts @@ -0,0 +1,25 @@ +import { Extension } from '@colony/colony-js'; + +import useExtensionData from '~hooks/useExtensionData.ts'; +import { isInstalledExtensionData } from '~utils/extensions.ts'; + +const useStreamingPayments = () => { + const { extensionData, loading: extensionLoading } = useExtensionData( + Extension.StreamingPayments, + ); + + const getStreamingPaymentsAddress = () => { + if (!extensionData || !isInstalledExtensionData(extensionData)) { + return undefined; + } + + return extensionData.address; + }; + + return { + isLoading: extensionLoading, + streamingPaymentsAddress: getStreamingPaymentsAddress(), + }; +}; + +export default useStreamingPayments; diff --git a/src/redux/sagas/expenditures/claimStreamingPayment.ts b/src/redux/sagas/expenditures/claimStreamingPayment.ts index d2a2c01cda8..5284b4dd485 100644 --- a/src/redux/sagas/expenditures/claimStreamingPayment.ts +++ b/src/redux/sagas/expenditures/claimStreamingPayment.ts @@ -18,7 +18,12 @@ export type ClaimStreamingPaymentPayload = Action['payload']; function* claimStreamingPayment({ - payload: { colonyAddress, streamingPaymentsAddress, streamingPayment }, + payload: { + colonyAddress, + streamingPaymentsAddress, + streamingPayment, + tokenAddress, + }, meta, }: Action) { const txChannel = yield call(getTxChannel, meta.id); @@ -49,6 +54,7 @@ function* claimStreamingPayment({ extensionChildSkillIndex, extensionChildSkillIndex, streamingPayment.nativeId, + [tokenAddress], ], group: { key: 'claimStreamingPayment', diff --git a/src/redux/types/actions/expenditures.ts b/src/redux/types/actions/expenditures.ts index 8217bb1cbe0..4c17c60fb70 100644 --- a/src/redux/types/actions/expenditures.ts +++ b/src/redux/types/actions/expenditures.ts @@ -280,6 +280,7 @@ export type ExpendituresActionTypes = colonyAddress: Address; streamingPaymentsAddress: Address; streamingPayment: StreamingPayment; + tokenAddress: Address; }, MetaWithSetter > From 1934626105d51d5106a1efb0280414195b1159cb Mon Sep 17 00:00:00 2001 From: Dave Creaser Date: Tue, 7 May 2024 11:37:45 +0100 Subject: [PATCH 004/126] Add streaming payment claims --- .../api/colonycdapp/schema/schema.graphql | 6 ++++ .../fragments/streamingPayment.graphql | 1 + src/graphql/generated.ts | 33 +++++++++++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index b785263c1df..fd71f6f4424 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4106,6 +4106,7 @@ type StreamingPayment @model @searchable { tokenAddress: ID! token: Token @hasOne(fields: ["tokenAddress"]) amount: String! + payouts: [ExpenditurePayout!] claims: [StreamingPaymentClaim!] metadata: StreamingPaymentMetadata @hasOne(fields: ["id"]) """ @@ -4164,6 +4165,11 @@ type StreamingPaymentClaim { timestamp: String! } +type StreamingPaymentClaim { + tokenAddress: ID! + amount: String! +} + """ Defines an annotation for actions, motions and decisions """ diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index 844beaaebd4..9365cef058c 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -26,6 +26,7 @@ fragment StreamingPayment on StreamingPayment { claims { amount timestamp + tokenAddress } } diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 71f035783c5..b8d940e7376 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -1924,9 +1924,13 @@ export type CreateSafeTransactionInput = { }; export type CreateStreamingPaymentInput = { +<<<<<<< HEAD amount: Scalars['String']; claims?: InputMaybe>; colonyId: Scalars['ID']; +======= + claims?: InputMaybe>; +>>>>>>> e64580ff0 (Add streaming payment claims) createdAt?: InputMaybe; creatorAddress: Scalars['ID']; endTime: Scalars['String']; @@ -8657,6 +8661,7 @@ export type StakerRewardsInput = { export type StreamingPayment = { __typename?: 'StreamingPayment'; actions?: Maybe; +<<<<<<< HEAD <<<<<<< HEAD amount: Scalars['String']; claims?: Maybe>; @@ -8666,6 +8671,9 @@ export type StreamingPayment = { colonyId: Scalars['ID']; ======= >>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) +======= + claims?: Maybe>; +>>>>>>> e64580ff0 (Add streaming payment claims) createdAt: Scalars['AWSDateTime']; /** Address of the stream creator, can be a user or an extension */ creatorAddress: Scalars['ID']; @@ -8699,6 +8707,7 @@ export type StreamingPaymentActionsArgs = { sortDirection?: InputMaybe; }; +<<<<<<< HEAD <<<<<<< HEAD export type StreamingPaymentMotionsArgs = { @@ -8740,15 +8749,27 @@ export type StreamingPaymentClaim = { __typename?: 'StreamingPaymentClaim'; amount: Scalars['String']; timestamp: Scalars['String']; +======= +export type StreamingPaymentClaim = { + __typename?: 'StreamingPaymentClaim'; + amount: Scalars['String']; + tokenAddress: Scalars['ID']; +>>>>>>> e64580ff0 (Add streaming payment claims) }; export type StreamingPaymentClaimInput = { amount: Scalars['String']; +<<<<<<< HEAD timestamp: Scalars['String']; }; ======= >>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) +======= + tokenAddress: Scalars['ID']; +}; + +>>>>>>> e64580ff0 (Add streaming payment claims) export enum StreamingPaymentEndCondition { FixedTime = 'FIXED_TIME', LimitReached = 'LIMIT_REACHED', @@ -10277,9 +10298,13 @@ export type UpdateSafeTransactionInput = { }; export type UpdateStreamingPaymentInput = { +<<<<<<< HEAD amount?: InputMaybe; claims?: InputMaybe>; colonyId?: InputMaybe; +======= + claims?: InputMaybe>; +>>>>>>> e64580ff0 (Add streaming payment claims) createdAt?: InputMaybe; creatorAddress?: InputMaybe; endTime?: InputMaybe; @@ -10713,7 +10738,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11243,7 +11268,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ }>; -export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null } | null }; +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string }> | null } | null }; export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -12675,6 +12700,10 @@ export const StreamingPaymentChangesFragmentDoc = gql` endCondition limitAmount } + claims { + amount + tokenAddress + } } ${ExpenditurePayoutFragmentDoc}`; >>>>>>> ce1397c62 (Feat: Cancel streams using permissions) From 56e539e36e98dd1e7bb269bb26752db658d9191b Mon Sep 17 00:00:00 2001 From: Dave Creaser Date: Wed, 8 May 2024 09:59:55 +0100 Subject: [PATCH 005/126] Add timestamp to streaming payment claims and code cleanup --- .../api/colonycdapp/schema/schema.graphql | 1 + .../fragments/streamingPayment.graphql | 1 + src/graphql/generated.ts | 16 +++++++++--- src/hooks/useStreamingPayments.ts | 25 ------------------- 4 files changed, 15 insertions(+), 28 deletions(-) delete mode 100644 src/hooks/useStreamingPayments.ts diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index fd71f6f4424..6d3882e77dd 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4168,6 +4168,7 @@ type StreamingPaymentClaim { type StreamingPaymentClaim { tokenAddress: ID! amount: String! + timestamp: AWSTimestamp! } """ diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index 9365cef058c..d41ab3b669b 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -27,6 +27,7 @@ fragment StreamingPayment on StreamingPayment { amount timestamp tokenAddress + timestamp } } diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index b8d940e7376..7bb4a910d1b 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -637,9 +637,9 @@ export enum ColonyActionType { CancelExpenditure = 'CANCEL_EXPENDITURE', /** An action related to a motion to cancel an expenditure */ CancelExpenditureMotion = 'CANCEL_EXPENDITURE_MOTION', -<<<<<<< HEAD /** An action related to a multiSig to cancel a staked expenditure */ CancelStakedExpenditureMultisig = 'CANCEL_STAKED_EXPENDITURE_MULTISIG', +<<<<<<< HEAD <<<<<<< HEAD /** An action related to cancelling a streaming payment */ CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', @@ -651,6 +651,10 @@ export enum ColonyActionType { CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', >>>>>>> 93bc8196f (Feat: Cancel streams using permissions) >>>>>>> ce1397c62 (Feat: Cancel streams using permissions) +======= + /** An action related to cancelling a streaming payment */ + CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', +>>>>>>> 881864577 (Add timestamp to streaming payment claims and code cleanup) /** An action related to editing a Colony's details */ ColonyEdit = 'COLONY_EDIT', /** An action related to editing a Colony's details via a motion */ @@ -8753,12 +8757,14 @@ export type StreamingPaymentClaim = { export type StreamingPaymentClaim = { __typename?: 'StreamingPaymentClaim'; amount: Scalars['String']; + timestamp: Scalars['AWSTimestamp']; tokenAddress: Scalars['ID']; >>>>>>> e64580ff0 (Add streaming payment claims) }; export type StreamingPaymentClaimInput = { amount: Scalars['String']; +<<<<<<< HEAD <<<<<<< HEAD timestamp: Scalars['String']; }; @@ -8766,6 +8772,9 @@ export type StreamingPaymentClaimInput = { ======= >>>>>>> e5724cd0d (Merge pull request #2321 from JoinColony/feat/2215-cancel-streams-using-permissions) ======= +======= + timestamp: Scalars['AWSTimestamp']; +>>>>>>> 881864577 (Add timestamp to streaming payment claims and code cleanup) tokenAddress: Scalars['ID']; }; @@ -10738,7 +10747,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11268,7 +11277,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ }>; -export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string }> | null } | null }; +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null } | null }; export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -12703,6 +12712,7 @@ export const StreamingPaymentChangesFragmentDoc = gql` claims { amount tokenAddress + timestamp } } ${ExpenditurePayoutFragmentDoc}`; diff --git a/src/hooks/useStreamingPayments.ts b/src/hooks/useStreamingPayments.ts deleted file mode 100644 index deaa2c74aad..00000000000 --- a/src/hooks/useStreamingPayments.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Extension } from '@colony/colony-js'; - -import useExtensionData from '~hooks/useExtensionData.ts'; -import { isInstalledExtensionData } from '~utils/extensions.ts'; - -const useStreamingPayments = () => { - const { extensionData, loading: extensionLoading } = useExtensionData( - Extension.StreamingPayments, - ); - - const getStreamingPaymentsAddress = () => { - if (!extensionData || !isInstalledExtensionData(extensionData)) { - return undefined; - } - - return extensionData.address; - }; - - return { - isLoading: extensionLoading, - streamingPaymentsAddress: getStreamingPaymentsAddress(), - }; -}; - -export default useStreamingPayments; From 70c70dba2de23d6d18beee4bb669ff4167219d05 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Fri, 7 Jun 2024 00:15:01 +0100 Subject: [PATCH 006/126] Schema update: adjust streaming payment model for a single token --- src/graphql/generated.ts | 52 ++++++++++++++++++++- src/hooks/useStreamingPaymentAmountsLeft.ts | 31 +++++++----- 2 files changed, 69 insertions(+), 14 deletions(-) diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 7bb4a910d1b..cde2c4b6a99 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -1929,6 +1929,9 @@ export type CreateSafeTransactionInput = { export type CreateStreamingPaymentInput = { <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; claims?: InputMaybe>; colonyId: Scalars['ID']; @@ -1948,8 +1951,13 @@ export type CreateStreamingPaymentInput = { nativeDomainId: Scalars['Int']; nativeId: Scalars['Int']; recipientAddress: Scalars['String']; +<<<<<<< HEAD startTime: Scalars['String']; tokenAddress: Scalars['ID']; +======= + startTime: Scalars['AWSTimestamp']; + tokenAddress: Scalars['String']; +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) }; export type CreateStreamingPaymentMetadataInput = { @@ -4214,8 +4222,13 @@ export type ModelStreamingPaymentConditionInput = { not?: InputMaybe; or?: InputMaybe>>; recipientAddress?: InputMaybe; +<<<<<<< HEAD startTime?: InputMaybe; tokenAddress?: InputMaybe; +======= + startTime?: InputMaybe; + tokenAddress?: InputMaybe; +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) }; export type ModelStreamingPaymentConnection = { @@ -4248,8 +4261,13 @@ export type ModelStreamingPaymentFilterInput = { not?: InputMaybe; or?: InputMaybe>>; recipientAddress?: InputMaybe; +<<<<<<< HEAD startTime?: InputMaybe; tokenAddress?: InputMaybe; +======= + startTime?: InputMaybe; + tokenAddress?: InputMaybe; +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) }; export type ModelStreamingPaymentMetadataConditionInput = { @@ -4812,8 +4830,13 @@ export type ModelSubscriptionStreamingPaymentFilterInput = { nativeId?: InputMaybe; or?: InputMaybe>>; recipientAddress?: InputMaybe; +<<<<<<< HEAD startTime?: InputMaybe; tokenAddress?: InputMaybe; +======= + startTime?: InputMaybe; + tokenAddress?: InputMaybe; +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) }; export type ModelSubscriptionStreamingPaymentMetadataFilterInput = { @@ -8667,6 +8690,9 @@ export type StreamingPayment = { actions?: Maybe; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; claims?: Maybe>; /** The Colony to which the expenditure belongs */ @@ -8697,9 +8723,14 @@ export type StreamingPayment = { /** Native ID of the streaming payment within a colony */ nativeId: Scalars['Int']; recipientAddress: Scalars['String']; +<<<<<<< HEAD startTime: Scalars['String']; token?: Maybe; tokenAddress: Scalars['ID']; +======= + startTime: Scalars['AWSTimestamp']; + tokenAddress: Scalars['String']; +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) updatedAt: Scalars['AWSDateTime']; }; @@ -10308,6 +10339,9 @@ export type UpdateSafeTransactionInput = { export type UpdateStreamingPaymentInput = { <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) amount?: InputMaybe; claims?: InputMaybe>; colonyId?: InputMaybe; @@ -10327,8 +10361,13 @@ export type UpdateStreamingPaymentInput = { nativeDomainId?: InputMaybe; nativeId?: InputMaybe; recipientAddress?: InputMaybe; +<<<<<<< HEAD startTime?: InputMaybe; tokenAddress?: InputMaybe; +======= + startTime?: InputMaybe; + tokenAddress?: InputMaybe; +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) }; export type UpdateStreamingPaymentMetadataInput = { @@ -10747,7 +10786,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11277,7 +11316,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ }>; -export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null } | null }; +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null } | null }; export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -12673,6 +12712,7 @@ export const StreamingPaymentFragmentDoc = gql` startTime endTime interval +<<<<<<< HEAD <<<<<<< HEAD tokenAddress token { @@ -12705,6 +12745,10 @@ export const StreamingPaymentChangesFragmentDoc = gql` payouts { ...ExpenditurePayout } +======= + tokenAddress + amount +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) metadata { endCondition limitAmount @@ -12715,8 +12759,12 @@ export const StreamingPaymentChangesFragmentDoc = gql` timestamp } } +<<<<<<< HEAD ${ExpenditurePayoutFragmentDoc}`; >>>>>>> ce1397c62 (Feat: Cancel streams using permissions) +======= + `; +>>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) export const UserTokenBalanceDataFragmentDoc = gql` fragment UserTokenBalanceData on GetUserTokenBalanceReturn { balance diff --git a/src/hooks/useStreamingPaymentAmountsLeft.ts b/src/hooks/useStreamingPaymentAmountsLeft.ts index 4c90b2ec85b..93a70011505 100644 --- a/src/hooks/useStreamingPaymentAmountsLeft.ts +++ b/src/hooks/useStreamingPaymentAmountsLeft.ts @@ -20,12 +20,10 @@ const useStreamingPaymentAmountsLeft = ( const amountClaimedToDate = streamingPayment.claims?.reduce((sum, claim) => { - const newAmount = BigNumber.from(claim.amount).add(sum); + return BigNumber.from(claim.amount).add(sum); + }, BigNumber.from(0)) ?? BigNumber.from(0); - return newAmount.toString(); - }, '0') ?? '0'; - - let amountAvailableToClaim: BigNumber; + let amountAvailableToClaim = BigNumber.from(0); const { startTime: startTimeString, @@ -44,19 +42,28 @@ const useStreamingPaymentAmountsLeft = ( ? endTime.sub(startTime) // End time has already passed, the whole duration can be claimed. : BigNumber.from(currentTimestamp).sub(startTime); // End time has not passed, calculate duration to be claimed. + // Convert to WAD arithmetic to match Solidity implementation + const WAD = BigNumber.from(10).pow(18); + const intervalsToClaim = durationToClaim.mul(WAD).div(interval); const amountAvailableSinceStart = BigNumber.from(amount) - .mul(durationToClaim) - .div(interval); + .mul(intervalsToClaim) + .div(WAD); // Divide by WAD to get back to normal scale + + const difference = amountAvailableSinceStart.sub(amountClaimedToDate); - amountAvailableToClaim = amountAvailableSinceStart.sub(amountClaimedToDate); + const tolerance = BigNumber.from(amount).div(BigNumber.from(10).pow(12)); - amountAvailableToClaim = amountAvailableToClaim.lt(0) - ? BigNumber.from(0) - : amountAvailableToClaim; + if (difference.abs().lte(tolerance)) { + amountAvailableToClaim = BigNumber.from(0); + } else { + amountAvailableToClaim = difference.lt(0) + ? BigNumber.from(0) + : difference; + } } return { - amountClaimedToDate, + amountClaimedToDate: amountClaimedToDate.toString(), amountAvailableToClaim: amountAvailableToClaim.toString(), }; }; From aa79d90a8471d611e16e575c752abff7ba9af6ad Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Fri, 7 Jun 2024 00:26:51 +0100 Subject: [PATCH 007/126] Schema update: remove token address from StreamingPaymentClaim --- amplify/backend/api/colonycdapp/schema/schema.graphql | 1 - src/graphql/fragments/streamingPayment.graphql | 1 - src/graphql/generated.ts | 11 ++++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index 6d3882e77dd..a4f7b1a130c 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4166,7 +4166,6 @@ type StreamingPaymentClaim { } type StreamingPaymentClaim { - tokenAddress: ID! amount: String! timestamp: AWSTimestamp! } diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index d41ab3b669b..9365cef058c 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -27,7 +27,6 @@ fragment StreamingPayment on StreamingPayment { amount timestamp tokenAddress - timestamp } } diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index cde2c4b6a99..124690c00d0 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -8789,8 +8789,11 @@ export type StreamingPaymentClaim = { __typename?: 'StreamingPaymentClaim'; amount: Scalars['String']; timestamp: Scalars['AWSTimestamp']; +<<<<<<< HEAD tokenAddress: Scalars['ID']; >>>>>>> e64580ff0 (Add streaming payment claims) +======= +>>>>>>> a9ca6d1e1 (Schema update: remove token address from StreamingPaymentClaim) }; export type StreamingPaymentClaimInput = { @@ -8805,8 +8808,11 @@ export type StreamingPaymentClaimInput = { ======= ======= timestamp: Scalars['AWSTimestamp']; +<<<<<<< HEAD >>>>>>> 881864577 (Add timestamp to streaming payment claims and code cleanup) tokenAddress: Scalars['ID']; +======= +>>>>>>> a9ca6d1e1 (Schema update: remove token address from StreamingPaymentClaim) }; >>>>>>> e64580ff0 (Add streaming payment claims) @@ -10786,7 +10792,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: number }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11316,7 +11322,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ }>; -export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null } | null }; +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: number }> | null } | null }; export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -12755,7 +12761,6 @@ export const StreamingPaymentChangesFragmentDoc = gql` } claims { amount - tokenAddress timestamp } } From d130443337e62feabea086bb8d0501cf1e703aa0 Mon Sep 17 00:00:00 2001 From: Romeo Ledesma Date: Tue, 11 Jun 2024 12:42:15 +0100 Subject: [PATCH 008/126] feat: add a ColonyActionType enum entry for cancel and waive --- src/graphql/generated.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 124690c00d0..1cd8ca0d75d 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -630,9 +630,17 @@ export enum ColonyActionType { /** An action related to adding verified members */ AddVerifiedMembers = 'ADD_VERIFIED_MEMBERS', AddVerifiedMembersMotion = 'ADD_VERIFIED_MEMBERS_MOTION', +<<<<<<< HEAD AddVerifiedMembersMultisig = 'ADD_VERIFIED_MEMBERS_MULTISIG', +<<<<<<< HEAD + /** An action related to cancelling and waiving a streaming payment */ + CancelAndWaiveStreamingPayment = 'CANCEL_AND_WAIVE_STREAMING_PAYMENT', +======= +======= /** An action related to cancelling and waiving a streaming payment */ CancelAndWaiveStreamingPayment = 'CANCEL_AND_WAIVE_STREAMING_PAYMENT', +>>>>>>> 34b866c5a (feat: add a ColonyActionType enum entry for cancel and waive) +>>>>>>> bbb2559eb (feat: add a ColonyActionType enum entry for cancel and waive) /** An action related to canceling an expenditure */ CancelExpenditure = 'CANCEL_EXPENDITURE', /** An action related to a motion to cancel an expenditure */ From 1396c8d3ac46f7ff0dee1f5a581828376ab1ccff Mon Sep 17 00:00:00 2001 From: Dave Creaser Date: Fri, 14 Jun 2024 15:17:41 +0100 Subject: [PATCH 009/126] Set correct end time for streaming payments based on end condition --- .../api/colonycdapp/schema/schema.graphql | 2 +- .../v5/payments/TmpStreamingPayments.tsx | 248 ++++++++++++++++++ src/graphql/generated.ts | 53 +++- .../expenditures/createStreamingPayment.ts | 40 +++ 4 files changed, 340 insertions(+), 3 deletions(-) create mode 100644 src/components/v5/payments/TmpStreamingPayments.tsx diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index a4f7b1a130c..61008bce9ab 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4167,7 +4167,7 @@ type StreamingPaymentClaim { type StreamingPaymentClaim { amount: String! - timestamp: AWSTimestamp! + timestamp: String! } """ diff --git a/src/components/v5/payments/TmpStreamingPayments.tsx b/src/components/v5/payments/TmpStreamingPayments.tsx new file mode 100644 index 00000000000..7fc43b82de8 --- /dev/null +++ b/src/components/v5/payments/TmpStreamingPayments.tsx @@ -0,0 +1,248 @@ +import { Id } from '@colony/colony-js'; +import { BigNumber } from 'ethers'; +import React, { useState } from 'react'; + +import { useAppContext } from '~context/AppContext/AppContext.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { + StreamingPaymentEndCondition, + useGetStreamingPaymentQuery, +} from '~gql'; +import useAsyncFunction from '~hooks/useAsyncFunction.ts'; +import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; +import useEnabledExtensions from '~hooks/useEnabledExtensions.ts'; +import useStreamingPaymentAmountsLeft from '~hooks/useStreamingPaymentAmountsLeft.ts'; +import { ActionTypes } from '~redux'; +import { type ClaimStreamingPaymentPayload } from '~redux/sagas/expenditures/claimStreamingPayment.ts'; +import { type CreateStreamingPaymentPayload } from '~redux/sagas/expenditures/createStreamingPayment.ts'; +import { type CancelStreamingPaymentPayload } from '~redux/types/actions/expenditures.ts'; +import Numeral from '~shared/Numeral/Numeral.tsx'; +import { getStreamingPaymentDatabaseId } from '~utils/databaseId.ts'; +import { findDomainByNativeId } from '~utils/domains.ts'; +import InputBase from '~v5/common/Fields/InputBase/InputBase.tsx'; +import Select from '~v5/common/Fields/Select/Select.tsx'; +import Button from '~v5/shared/Button/Button.tsx'; +import { ActionButton } from '~v5/shared/Button/index.ts'; + +const TmpStreamingPayments = () => { + const { colony } = useColonyContext(); + const { user } = useAppContext(); + const { streamingPaymentsAddress } = useEnabledExtensions(); + + const [tokenAddress, setTokenAddress] = useState( + colony.nativeToken.tokenAddress, + ); + const [decimalAmount, setDecimalAmount] = useState('18'); + const [transactionAmount, setTransactionAmount] = useState('0'); + const [endCondition, setEndCondition] = useState( + StreamingPaymentEndCondition.FixedTime, + ); + const [limit, setLimit] = useState('0'); + const [streamingPaymentId, setStreamingPaymentId] = useState(''); + + const { data, refetch } = useGetStreamingPaymentQuery({ + variables: { + streamingPaymentId: getStreamingPaymentDatabaseId( + colony.colonyAddress, + Number(streamingPaymentId), + ), + }, + skip: Number.isNaN(streamingPaymentId), + fetchPolicy: 'network-only', + }); + const streamingPayment = data?.getStreamingPayment; + + const cancel = useAsyncFunction({ + submit: ActionTypes.STREAMING_PAYMENT_CANCEL, + error: ActionTypes.STREAMING_PAYMENT_CANCEL_ERROR, + success: ActionTypes.STREAMING_PAYMENT_CANCEL_SUCCESS, + }); + const claim = useAsyncFunction({ + submit: ActionTypes.STREAMING_PAYMENT_CLAIM, + error: ActionTypes.STREAMING_PAYMENT_CLAIM_ERROR, + success: ActionTypes.STREAMING_PAYMENT_CLAIM_SUCCESS, + }); + + const { currentBlockTime: blockTime, fetchCurrentBlockTime } = + useCurrentBlockTime(); + + const { amountAvailableToClaim, amountClaimedToDate } = + useStreamingPaymentAmountsLeft( + streamingPayment, + Math.floor(blockTime ?? Date.now() / 1000), + ); + + const rootDomain = findDomainByNativeId(Id.RootDomain, colony); + if (!rootDomain) { + return null; + } + + const createStreamingPaymentPayload: CreateStreamingPaymentPayload = { + colonyAddress: colony.colonyAddress, + createdInDomain: rootDomain, + amount: transactionAmount, + endCondition, + interval: 86400, // One day + recipientAddress: user?.walletAddress ?? '', + startTimestamp: BigNumber.from( + (blockTime ?? Math.floor(Date.now() / 1000)) - 604800, + ), // One week ago + tokenAddress, + tokenDecimals: parseInt(decimalAmount, 10), + endTimestamp: BigNumber.from( + (blockTime ?? Math.floor(Date.now() / 1000)) + 604800, + ), // Next week + limitAmount: limit, + }; + + const handleCancel = async ({ + shouldWaive, + }: Pick) => { + if (!streamingPayment) { + return; + } + + const payload: CancelStreamingPaymentPayload = { + colonyAddress: colony.colonyAddress, + streamingPayment, + userAddress: user?.walletAddress ?? '', + shouldWaive, + }; + + await cancel(payload); + }; + + const handleClaim = async () => { + if (!streamingPayment) { + return; + } + + const claimPayload: ClaimStreamingPaymentPayload = { + colonyAddress: colony.colonyAddress, + streamingPaymentsAddress: streamingPaymentsAddress ?? '', + streamingPayment, + }; + + await claim(claimPayload); + }; + + return ( +
+
+

Streaming Payments

+
+ setTokenAddress(e.currentTarget.value)} + value={tokenAddress} + label="Token Address" + /> + setDecimalAmount(e.currentTarget.value)} + value={decimalAmount} + label="Token Decimals" + /> + setTransactionAmount(e.currentTarget.value)} + value={transactionAmount} + label="Transaction Amount" + /> + setLimit(e.currentTarget.value)} + value={limit} + label="Limit" + disabled={ + endCondition !== StreamingPaymentEndCondition.LimitReached + } + /> +
+
+ + {/* @todo: remove before merging to master, it's added only to test this field before streaming payments form will be ready */} + + {/* Disabled for now */} {/* */} diff --git a/src/components/v5/common/Fields/CardSelect/CardSelect.tsx b/src/components/v5/common/Fields/CardSelect/CardSelect.tsx index 68402ab3e29..644e6f9baab 100644 --- a/src/components/v5/common/Fields/CardSelect/CardSelect.tsx +++ b/src/components/v5/common/Fields/CardSelect/CardSelect.tsx @@ -35,7 +35,8 @@ function CardSelect({ disabled, readonly, itemClassName = 'group flex text-md md:transition-colors md:hover:font-medium md:hover:bg-gray-50 rounded px-4 py-2 w-full cursor-pointer', - renderOptionWrapper = (props, children) => ( + // eslint-disable-next-line @typescript-eslint/no-unused-vars + renderOptionWrapper = ({ value, ...props }, children) => ( @@ -171,6 +172,7 @@ function CardSelect({ onChange(optionValue); toggleSelectOff(); }, + value: optionValue, }, label, )} diff --git a/src/components/v5/common/Fields/CardSelect/types.ts b/src/components/v5/common/Fields/CardSelect/types.ts index e9389a99e61..54079a8d924 100644 --- a/src/components/v5/common/Fields/CardSelect/types.ts +++ b/src/components/v5/common/Fields/CardSelect/types.ts @@ -40,6 +40,7 @@ export interface CardSelectProps extends BaseFieldProps { className?: string; onClick?: () => void; 'aria-label'?: string; + value?: TValue; }, children: React.ReactNode, ) => React.ReactElement | null | undefined; diff --git a/src/components/v5/common/Fields/InputBase/InputBase.tsx b/src/components/v5/common/Fields/InputBase/InputBase.tsx index 690a3040146..c8590c9f43a 100644 --- a/src/components/v5/common/Fields/InputBase/InputBase.tsx +++ b/src/components/v5/common/Fields/InputBase/InputBase.tsx @@ -86,15 +86,17 @@ const InputBase = React.forwardRef( return (
- + {label && ( + + )} {prefix || suffix ? (
= ({ ( = ({ + cancelButtonProps, + applyButtonProps, + popperModifiers, + onChange, + selected: selectedProp, + dateFormat = DEFAULT_DATE_TIME_FORMAT, + popperClassName, + minYear, + maxYear, + customInput, + inline, + withCloseButton, + onClose, + ...rest +}) => { + const isMobile = useMobile(); + const calendarRef = useRef(null); + const [selectedDate, setSelectedDate] = useState( + selectedProp || null, + ); + const [selectedTime, setSelectedTime] = useState( + selectedProp || null, + ); + + const resetValues = () => { + setSelectedDate(selectedProp || null); + setSelectedTime(selectedProp || null); + }; + + const { + onClick: applyButtonOnClick, + mode: applyButtonMode, + text: applyButtonText, + } = applyButtonProps || {}; + const { + onClick: cancelButtonOnClick, + mode: cancelButtonMode, + text: cancelButtonText, + } = cancelButtonProps || {}; + + return ( + ( + { + resetValues(); + calendarRef.current?.setOpen(false); + } + : undefined + } + {...props} + /> + )} + ref={calendarRef} + customInput={customInput || } + dateFormat={dateFormat} + popperClassName={clsx(popperClassName, '!z-top max-w-[20.5rem]')} + renderDayContents={(day) => ( +
{day}
+ )} + shouldCloseOnSelect={false} + popperModifiers={[ + ...(popperModifiers || []), + { + name: 'offset', + options: { + offset: [10, -38], + }, + }, + ]} + selectsRange={false} + onChange={(date, event) => { + date?.setHours( + selectedTime?.getHours() || 0, + selectedTime?.getMinutes() || 0, + 0, + 0, + ); + setSelectedDate(date); + + if (isMobile) { + return; + } + + onChange(date, event); + }} + selected={selectedDate} + showTimeInput + onBlur={(event) => { + if (isMobile || !selectedDate) { + return; + } + + onChange(selectedDate, event); + onClose?.(); + }} + customTimeInput={ +
+ { + const hours = date?.getHours() || 0; + const minutes = date?.getMinutes() || 0; + + selectedDate?.setHours(hours, minutes, 0, 0); + + setSelectedTime(selectedDate ?? date); + setSelectedDate(selectedDate ?? date); + + if (event) { + return; + } + + if (!isMobile) { + onChange(selectedDate ?? date, event); + onClose?.(); + } + }} + onBlur={(event) => { + if (isMobile) { + return; + } + + onChange(selectedDate, event); + onClose?.(); + }} + selected={selectedTime} + /> +
+ } + inline={inline} + {...rest} + > + {selectedDate && isMobile && ( +
+
+ )} +
+ ); +}; + +export default DatepickerWithTime; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomHeader/DatepickerCustomHeader.tsx b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomHeader/DatepickerCustomHeader.tsx new file mode 100644 index 00000000000..7971b732972 --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomHeader/DatepickerCustomHeader.tsx @@ -0,0 +1,110 @@ +import { CaretLeft, CaretRight, X } from '@phosphor-icons/react'; +import clsx from 'clsx'; +import format from 'date-fns/format'; +import getYear from 'date-fns/getYear'; +import React, { type FC, useState, useLayoutEffect } from 'react'; + +import { formatText } from '~utils/intl.ts'; +import { range } from '~utils/lodash.ts'; +import InputBase from '~v5/common/Fields/InputBase/index.ts'; + +import DatepickerYearDropdown from '../../../common/DatepickerYearDropdown/index.ts'; + +import { type DatepickerCustomHeaderProps } from './types.ts'; + +const DatepickerCustomHeader: FC = ({ + date, + changeYear, + monthDate, + decreaseMonth, + increaseMonth, + prevMonthButtonDisabled, + nextMonthButtonDisabled, + startDate, + dateFormat, + setStartDate, + onClose, + minYear = 1990, + maxYear = getYear(new Date()) + 1, + inline, +}) => { + const [startDateText, setStartDateText] = useState(''); + // @todo: check min and max + const years = range(minYear, maxYear); + const navigationButtonClassName = + 'flex justify-center items-center p-2 text-gray-500 transition sm:hover:text-blue-400'; + + useLayoutEffect(() => { + if (startDate) { + setStartDateText(format(startDate, dateFormat)); + } + }, [startDate, dateFormat]); + + return ( +
+ {onClose && ( +
+ +
+ )} +
+ + + +
+
+ + +
+
+ ); +}; + +export default DatepickerCustomHeader; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomHeader/types.ts b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomHeader/types.ts new file mode 100644 index 00000000000..a3bb45b271c --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomHeader/types.ts @@ -0,0 +1,12 @@ +import { type ReactDatePickerCustomHeaderProps } from 'react-datepicker'; + +export interface DatepickerCustomHeaderProps + extends ReactDatePickerCustomHeaderProps { + dateFormat: string; + setStartDate: React.Dispatch>; + startDate?: Date | null; + onClose?: () => void; + minYear?: number; + maxYear?: number; + inline?: boolean; +} diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomInput/DatepickerCustomInput.tsx b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomInput/DatepickerCustomInput.tsx new file mode 100644 index 00000000000..f8855f48699 --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomInput/DatepickerCustomInput.tsx @@ -0,0 +1,22 @@ +import React from 'react'; + +import { formatText } from '~utils/intl.ts'; +import InputBase from '~v5/common/Fields/InputBase/index.ts'; +import { type InputBaseProps } from '~v5/common/Fields/InputBase/types.ts'; + +const DatepickerCustomInput = React.forwardRef< + HTMLInputElement, + InputBaseProps +>(({ value, onClick, ...rest }, ref) => { + return ( + + ); +}); +export default DatepickerCustomInput; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomTimeInput/DatepickerCustomTimeInput.tsx b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomTimeInput/DatepickerCustomTimeInput.tsx new file mode 100644 index 00000000000..cba93538437 --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomTimeInput/DatepickerCustomTimeInput.tsx @@ -0,0 +1,31 @@ +import { CaretDown } from '@phosphor-icons/react'; +import clsx from 'clsx'; +import React from 'react'; + +import InputBase from '~v5/common/Fields/InputBase/index.ts'; +import { type InputBaseProps } from '~v5/common/Fields/InputBase/types.ts'; + +const DatepickerCustomTimeInput = React.forwardRef< + HTMLInputElement, + InputBaseProps +>(({ value, onClick, className, ...rest }, ref) => { + return ( + + } + {...rest} + /> + ); +}); + +export default DatepickerCustomTimeInput; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomTimeInput/types.ts b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomTimeInput/types.ts new file mode 100644 index 00000000000..24897c8da38 --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerCustomTimeInput/types.ts @@ -0,0 +1,6 @@ +import { type ReactDatePickerProps } from 'react-datepicker'; + +export type DatepickerCustomTimeInputProps = Pick< + ReactDatePickerProps, + 'selected' | 'onChange' +>; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.module.css b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.module.css new file mode 100644 index 00000000000..459f52f6be8 --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.module.css @@ -0,0 +1,55 @@ +.wrapper { + @apply w-full; +} + +.wrapper :global(.react-datepicker__triangle), +.wrapper :global(.react-datepicker__header--time--only) { + @apply hidden; +} + +.wrapper :global(.react-datepicker--time-only) { + @apply w-full rounded border border-gray-300 font-inter shadow-select; +} + +.wrapper :global(.react-datepicker__time-container) { + @apply float-none !w-full; +} + +.wrapper :global(.react-datepicker__time-container .react-datepicker__time) { + @apply rounded-none bg-transparent; +} + +.wrapper + :global( + .react-datepicker__time-container + .react-datepicker__time + .react-datepicker__time-box + ) { + @apply w-full rounded-none; +} + +.wrapper :global(.react-datepicker__time-list) { + @apply !box-border rounded-none !px-2 py-4; +} + +.wrapper + :global( + .react-datepicker__time-container + .react-datepicker__time + .react-datepicker__time-box + ul.react-datepicker__time-list + li.react-datepicker__time-list-item + ) { + @apply flex h-[2.1875rem] w-full items-center rounded px-4 py-1 text-left text-md text-gray-900 transition sm:hover:bg-gray-50; +} + +.wrapper + :global( + .react-datepicker__time-container + .react-datepicker__time + .react-datepicker__time-box + ul.react-datepicker__time-list + li.react-datepicker__time-list-item--selected + ) { + @apply bg-gray-50 font-medium sm:hover:bg-gray-50; +} diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.tsx b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.tsx new file mode 100644 index 00000000000..cc65e8ff83d --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.tsx @@ -0,0 +1,52 @@ +import React, { type FC } from 'react'; +import DatePicker from 'react-datepicker'; + +import { useMobile } from '~hooks'; + +import DatepickerCustomTimeInput from '../DatepickerCustomTimeInput/DatepickerCustomTimeInput.tsx'; + +import { type DatepickerTimePickerProps } from './types.ts'; + +import styles from './DatepickerTimePicker.module.css'; + +const DatepickerTimePicker: FC = ({ + selected, + onChange, + onBlur, +}) => { + const isMobile = useMobile(); + + return ( + } + onBlur={onBlur} + popperProps={ + isMobile + ? { + placement: 'top-start', + } + : undefined + } + /> + ); +}; + +export default DatepickerTimePicker; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/types.ts b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/types.ts new file mode 100644 index 00000000000..d29dad41797 --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/types.ts @@ -0,0 +1,6 @@ +import { type ReactDatePickerProps } from 'react-datepicker'; + +export type DatepickerTimePickerProps = Pick< + ReactDatePickerProps, + 'selected' | 'onChange' | 'onBlur' +>; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/types.ts b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/types.ts new file mode 100644 index 00000000000..8659526e5b2 --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/types.ts @@ -0,0 +1,19 @@ +import { type ReactDatePickerProps } from 'react-datepicker'; + +import { type DatepickerCommonProps } from '../common/types.ts'; + +export interface DatepickerWithTimeProps + extends Omit< + ReactDatePickerProps, + | 'renderCustomHeader' + | 'calendarContainer' + | 'calendarClassName' + | 'dateFormat' + | 'selectsRange' + | 'startDate' + | 'endDate' + >, + DatepickerCommonProps { + withCloseButton?: boolean; + onClose?: () => void; +} diff --git a/src/components/v5/common/Fields/datepickers/common/Datepicker.module.css b/src/components/v5/common/Fields/datepickers/common/Datepicker.module.css index 6c4284a92a9..b8209f19974 100644 --- a/src/components/v5/common/Fields/datepickers/common/Datepicker.module.css +++ b/src/components/v5/common/Fields/datepickers/common/Datepicker.module.css @@ -1,9 +1,14 @@ +.wrapper--simple, +.wrapper--simple :global(.react-datepicker__month-container) { + @apply w-full; +} + .wrapper:global(.react-datepicker) { - @apply bg-transparent border-none rounded-none text-gray-700 text-[.875rem] font-inter; + @apply rounded-none border-none bg-transparent font-inter text-[.875rem] text-gray-700; } .wrapper :global(.react-datepicker__header) { - @apply bg-transparent border-none rounded-none p-0; + @apply rounded-none border-none bg-transparent p-0; } .wrapper :global(.react-datepicker__day-names) { @@ -12,15 +17,15 @@ .wrapper :global(.react-datepicker__day-name), .wrapper :global(.react-datepicker__day) { - @apply h-10 w-10 inline-flex justify-center items-center m-0 flex-shrink-0; + @apply m-0 inline-flex h-10 w-10 flex-shrink-0 items-center justify-center; } .wrapper :global(.react-datepicker__day-name) { - @apply text-2 text-gray-900; + @apply text-gray-900 text-2; } .wrapper :global(.react-datepicker__day) { - @apply text-md text-gray-700 rounded-none; + @apply rounded-none text-md text-gray-700; } .wrapper :global(.react-datepicker__day--disabled), @@ -47,7 +52,7 @@ } .wrapper :global(.react-datepicker__day-content) { - @apply h-full w-full flex justify-center items-center rounded-full transition font-normal; + @apply flex h-full w-full items-center justify-center rounded-full font-normal transition; } .wrapper @@ -55,10 +60,12 @@ .react-datepicker__day:not( .react-datepicker__day--in-range, .react-datepicker__day--in-selecting-range + .react-datepicker__day--keyboard-selected + .react-datepicker__day--selected ):hover .react-datepicker__day-content ) { - @apply bg-blue-400 text-base-white; + @apply sm:bg-gray-100 sm:text-gray-700; } .wrapper @@ -104,6 +111,8 @@ :global( .react-datepicker__day--selecting-range-start .react-datepicker__day-content ), +.wrapper--simple + :global(.react-datepicker__day--selected .react-datepicker__day-content), .wrapper :global( .react-datepicker__day--selecting-range-end .react-datepicker__day-content @@ -130,7 +139,15 @@ } .wrapper :global(.react-datepicker__month) { - @apply m-0 px-6 pb-5; + @apply m-0 pb-5; +} + +.wrapper:not(.wrapper--simple) :global(.react-datepicker__month) { + @apply px-6; +} + +.wrapper--simple :global(.react-datepicker__month) { + @apply px-4; } .wrapper :global(.react-datepicker__week) { @@ -142,5 +159,96 @@ } .wrapper :global(.react-datepicker__children-container) { - @apply w-auto m-0 p-0; + @apply m-0 w-auto p-0; +} + +.wrapper :global(.react-datepicker__input-time-container) { + @apply float-none m-0 flex items-center gap-3 border-t border-t-gray-200 px-4 py-4; +} + +.wrapper :global(.react-datepicker-time__caption) { + @apply flex-shrink-0 text-md text-gray-900; +} + +.wrapper :global(.react-datepicker-time__input-container) { + @apply flex-grow; +} + +.wrapper + :global( + .react-datepicker__input-time-container + .react-datepicker-time__input-container + .react-datepicker-time__input + ) { + @apply ml-0 w-full; +} + +.wrapper + :global( + .react-datepicker__input-time-container + .react-datepicker-time__input-container + .react-datepicker-time__input + input + ) { + @apply w-full rounded border border-gray-300 bg-base-white px-3.5 py-2 text-md text-gray-900 outline-0 placeholder:text-gray-400 focus:border-blue-200 focus:shadow-light-blue focus:outline-none; +} + +.wrapper + :global( + .react-datepicker__input-time-container + .react-datepicker-time__input-container + .react-datepicker-time__input + input::-webkit-datetime-edit-fields-wrapper + ) { + @apply flex items-center; +} + +.wrapper + :global( + .react-datepicker__input-time-container + .react-datepicker-time__input-container + .react-datepicker-time__input + input::-webkit-datetime-edit-hour-field + ), +.wrapper + :global( + .react-datepicker__input-time-container + .react-datepicker-time__input-container + .react-datepicker-time__input + input::-webkit-datetime-edit-minute-field + ), +.wrapper + :global( + .react-datepicker__input-time-container + .react-datepicker-time__input-container + .react-datepicker-time__input + input::-webkit-datetime-edit-ampm-field + ) { + @apply rounded p-0.5 text-gray-900 transition focus:bg-blue-100; +} + +.wrapper + :global( + .react-datepicker__input-time-container + .react-datepicker-time__input-container + .react-datepicker-time__input + input::-webkit-inner-spin-button + ), +.wrapper + :global( + .react-datepicker__input-time-container + .react-datepicker-time__input-container + .react-datepicker-time__input + input::-webkit-clear-button + ) { + @apply hidden; +} + +.wrapper--simple :global(.react-datepicker__day-names) { + @apply px-4; +} + +.wrapper--simple :global(.react-datepicker__week), +.wrapper--simple :global(.react-datepicker__day-names) { + @apply flex justify-between sm:justify-center; } diff --git a/src/components/v5/common/Fields/datepickers/common/consts.ts b/src/components/v5/common/Fields/datepickers/common/consts.ts index 1874cb3e4d6..011eb63be09 100644 --- a/src/components/v5/common/Fields/datepickers/common/consts.ts +++ b/src/components/v5/common/Fields/datepickers/common/consts.ts @@ -1,2 +1,3 @@ export const DEFAULT_DATE_FORMAT = 'dd MMM yyyy'; +export const DEFAULT_DATE_TIME_FORMAT = 'd MMMM yyyy, h:mmaaa'; export const DATEPICKER_PORTAL_ID = 'datepicker-portal'; diff --git a/src/i18n/en.json b/src/i18n/en.json index 3b84f696359..3e5a95cccd6 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1172,6 +1172,18 @@ "actionSidebar.teamPurpose": "Team purpose", "actionSidebar.teamName": "Team name", "actionSidebar.teamColour": "Team colour", + "actionSidebar.starts": "Select start", + "actionSidebar.starts.placeholder": "Select date and time", + "actionSidebar.starts.warningTooltip": "The start date is in the past. The claimable amount will be calculated from the start date entered.", + "actionSidebar.starts.options.title": "Start conditions", + "actionSidebar.starts.options.startImidiately": "Start immediately", + "actionSidebar.starts.options.customDateAndTime": "Custom date and time", + "actionSidebar.ends": "Ends", + "actionSidebar.ends.placeholder": "Select condition", + "actionSidebar.ends.options.title": "End conditions", + "actionSidebar.ends.options.whenCancelled": "When cancelled", + "actionSidebar.ends.options.limitReached": "Limit reached", + "actionSidebar.ends.options.fixedTime": "Fixed time", "actionSidebar.description": "Description", "actionSidebar.createdIn": "Created in", "actionSidebar.chooseActionType": "Choose action type", @@ -1904,6 +1916,7 @@ "fileUploadModal.warningImportant": "Important: ", "fileUploadModal.warningText": "Uploading a CSV file now will replace all existing rows.", "view.extension": "View extension", + "calendar.today": "Today", "calendar.from": "From", "calendar.to": "To", "calendar.selectDate": "Select date", diff --git a/src/stories/common/DatepickerWithTime.stories.tsx b/src/stories/common/DatepickerWithTime.stories.tsx new file mode 100644 index 00000000000..6e60b341c66 --- /dev/null +++ b/src/stories/common/DatepickerWithTime.stories.tsx @@ -0,0 +1,29 @@ +import React, { type FC, useState } from 'react'; + +import { type DatepickerProps } from '~v5/common/Fields/datepickers/Datepicker/types.ts'; +import DatepickerWithTime from '~v5/common/Fields/datepickers/DatepickerWithTime/DatepickerWithTime.tsx'; + +import type { Meta, StoryObj } from '@storybook/react'; + +const datepickerMeta: Meta = { + title: 'Common/Fields/Datepicker With Time', + component: DatepickerWithTime, +}; + +export default datepickerMeta; + +const DatepickerWithHooks: FC = (props) => { + const [startDate, setStartDate] = useState(null); + + return ( + setStartDate(date)} + /> + ); +}; + +export const Base: StoryObj = { + render: (args) => , +}; diff --git a/tailwind.config.js b/tailwind.config.js index d2cb33617c8..bd97bdd66b2 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -135,6 +135,7 @@ module.exports = { content: '0px 1px 2px rgba(16, 24, 40, 0.05)', overlay: 'blur(2px)', 'light-blue': '0px 0px 3px 3px rgba(239, 248, 255, 1)', + 'select': '0px 1px 2px 0px rgba(16, 24, 40, 0.05);' }, transitionDuration: { slow: '450ms', From d7e40c43f4a401304ff96f46eb5957b9c76d543b Mon Sep 17 00:00:00 2001 From: Joanna Date: Mon, 12 Aug 2024 16:02:02 +0200 Subject: [PATCH 021/126] feat: streaming payment form --- .../helpers/getActionTitleValues.ts | 16 + .../helpers/mapItemToMessageFormat.tsx | 10 + .../ActionDescription/ActionDescription.tsx | 1 + .../filters/ActionTypeFilters/consts.ts | 13 +- .../Extensions/SpecialInput/SpecialInput.tsx | 70 +--- .../SpecialInput/SpecialInputBase.tsx | 76 ++++ .../common/Extensions/SpecialInput/types.ts | 2 +- .../frame/Extensions/layouts/hooks.tsx | 360 ++++++++++++++++++ .../hooks/permissions/helpers.ts | 2 + .../ActionSidebar/hooks/useActionsList.ts | 13 +- .../hooks/useSidebarActionForm.ts | 2 + .../ActionSidebarDescription.tsx | 3 + .../partials/StreamingPaymentDescription.tsx | 83 ++++ .../AmountPerPeriodRow/AmountPerPeriodRow.tsx | 58 +++ .../partials/AmountPerPeriodRow/consts.ts | 40 ++ .../AmountPerPeriodRowField.tsx | 133 +++++++ .../partials/AmountPerPeriodRowField/types.ts | 8 + .../partials/AmountPerPeriodRow/types.ts | 14 + .../partials/TimeRow/TimeRow.tsx | 16 +- .../ActionSidebar/partials/TimeRow/consts.ts | 11 +- .../partials/TimeRowField/TimeRowField.tsx | 12 +- .../TimeRow/partials/TimeRowField/types.ts | 2 + .../ActionSidebar/partials/TimeRow/types.ts | 1 + .../SimplePaymentForm/SimplePaymentForm.tsx | 6 - .../StreamingPaymentForm.tsx | 130 +++++++ .../forms/StreamingPaymentForm/hooks.ts | 198 ++++++++++ .../forms/StreamingPaymentForm/utils.ts | 94 +++++ .../DatepickerWithTime/DatepickerWithTime.tsx | 29 +- .../DatepickerTimePicker.module.css | 8 +- .../DatepickerTimePicker.tsx | 8 + .../partials/DatepickerTimePicker/types.ts | 8 +- .../datepickers/DatepickerWithTime/utils.ts | 3 + .../ActionTypeNotification.tsx | 17 + src/constants/actions.ts | 1 + src/i18n/en-actions.ts | 2 + src/i18n/en.json | 24 +- .../expenditures/createStreamingPayment.ts | 3 + .../validation/amountGreaterThanValidation.ts | 42 ++ 38 files changed, 1411 insertions(+), 108 deletions(-) create mode 100644 src/components/common/Extensions/SpecialInput/SpecialInputBase.tsx create mode 100644 src/components/frame/Extensions/layouts/hooks.tsx create mode 100644 src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/partials/StreamingPaymentDescription.tsx create mode 100644 src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/AmountPerPeriodRow.tsx create mode 100644 src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/consts.ts create mode 100644 src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx create mode 100644 src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/types.ts create mode 100644 src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/types.ts create mode 100644 src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx create mode 100644 src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts create mode 100644 src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/utils.ts create mode 100644 src/components/v5/common/Fields/datepickers/DatepickerWithTime/utils.ts create mode 100644 src/utils/validation/amountGreaterThanValidation.ts diff --git a/src/components/common/ColonyActions/helpers/getActionTitleValues.ts b/src/components/common/ColonyActions/helpers/getActionTitleValues.ts index d53b7017027..52ebf2ebb50 100644 --- a/src/components/common/ColonyActions/helpers/getActionTitleValues.ts +++ b/src/components/common/ColonyActions/helpers/getActionTitleValues.ts @@ -43,11 +43,27 @@ export enum ActionTitleMessageKeys { StagedAmount = 'stagedAmount', ArbitraryTransactionsLength = 'arbitraryTransactionsLength', ArbitraryMethod = 'arbitraryMethod', + Period = 'period', } /* Maps actionTypes to message values as found in en-actions.ts */ const getMessageDescriptorKeys = (actionType: AnyActionType) => { switch (true) { + case actionType === ColonyActionType.Payment: + return [ + ActionTitleMessageKeys.Recipient, + ActionTitleMessageKeys.Amount, + ActionTitleMessageKeys.TokenSymbol, + ActionTitleMessageKeys.Initiator, + ]; + case actionType.includes(ColonyActionType.CreateStreamingPayment): + return [ + ActionTitleMessageKeys.Recipient, + ActionTitleMessageKeys.Amount, + ActionTitleMessageKeys.TokenSymbol, + ActionTitleMessageKeys.Initiator, + ActionTitleMessageKeys.Period, + ]; case actionType.includes(ColonyActionType.MoveFunds): return [ ActionTitleMessageKeys.Amount, diff --git a/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx b/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx index e6278e5c772..601f05e9f78 100644 --- a/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx +++ b/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx @@ -439,5 +439,15 @@ export const useMapColonyActionToExpectedFormat = ({ [ActionTitleMessageKeys.ArbitraryTransactionsLength]: arbitraryTransactionsLength, [ActionTitleMessageKeys.ArbitraryMethod]: arbitraryMethod, + [ActionTitleMessageKeys.RecipientsNumber]: new Set( + expenditureData?.slots.map((slot) => slot.recipientAddress), + ).size, + [ActionTitleMessageKeys.TokensNumber]: new Set( + expenditureData?.slots?.flatMap( + (slot) => slot.payouts?.map((payout) => payout.tokenAddress) ?? [], + ), + ).size, + // @todo: update this to use the actual period value + [ActionTitleMessageKeys.Period]: 'Day', }; }; diff --git a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx index 8e445e3284c..6a9eb75d5c5 100644 --- a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx +++ b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx @@ -62,6 +62,7 @@ const ActionDescription: FC = ({ const { networkInverseFee } = useNetworkInverseFee(); + // @todo: add streaming payment data const actionMetadataDescription = formatText( { id: 'action.title' }, useGetActionTitleValues({ diff --git a/src/components/common/ColonyActionsTable/partials/ActionsTableFilters/partials/filters/ActionTypeFilters/consts.ts b/src/components/common/ColonyActionsTable/partials/ActionsTableFilters/partials/filters/ActionTypeFilters/consts.ts index b0900b454d1..c5a612e8f01 100644 --- a/src/components/common/ColonyActionsTable/partials/ActionsTableFilters/partials/filters/ActionTypeFilters/consts.ts +++ b/src/components/common/ColonyActionsTable/partials/ActionsTableFilters/partials/filters/ActionTypeFilters/consts.ts @@ -14,19 +14,14 @@ export const ACTION_TYPES_FILTERS = [ label: formatText({ id: 'actions.stagedPayment' }), name: Action.StagedPayment, }, - // @BETA: Disabled for now - // { - // label:formatText({ id: 'actions.batchPayment' }), - // name: Action.BatchPayment, - // }, { label: formatText({ id: 'actions.splitPayment' }), name: Action.SplitPayment, }, - // { - // label:formatText({ id: 'actions.streamingPayment' }), - // name: Action.StreamingPayment, - // }, + { + label: formatText({ id: 'actions.streamingPayment' }), + name: Action.StreamingPayment, + }, { label: formatText({ id: 'actions.createDecision' }), name: Action.CreateDecision, diff --git a/src/components/common/Extensions/SpecialInput/SpecialInput.tsx b/src/components/common/Extensions/SpecialInput/SpecialInput.tsx index 9ebfabd1ece..4fd2d2fa72f 100644 --- a/src/components/common/Extensions/SpecialInput/SpecialInput.tsx +++ b/src/components/common/Extensions/SpecialInput/SpecialInput.tsx @@ -1,75 +1,15 @@ -import clsx from 'clsx'; import React, { type FC } from 'react'; -import { useController } from 'react-hook-form'; - -import { formatText } from '~utils/intl.ts'; +import { useFormContext } from 'react-hook-form'; +import SpecialInputBase from './SpecialInputBase.tsx'; import { type SpecialInputProps } from './types.ts'; const displayName = 'common.Extensions.SpecialInput'; -const SpecialInput: FC = ({ - defaultValue, - name, - disabled, - id, - placeholder, - isError, - type, - step, - onChange: onChangeProp, -}) => { - const { - field: { onChange, disabled: fieldDisabled, ...restField }, - } = useController({ name }); +const SpecialInput: FC = ({ name, min, max, ...rest }) => { + const { register } = useFormContext(); - return ( -
- e.currentTarget.blur()} - onChange={(e) => { - onChange(e); - onChangeProp?.(e); - }} - /> - - {type === 'hours' ? formatText({ id: 'hours' }) : '%'} - -
- ); + return ; }; SpecialInput.displayName = displayName; diff --git a/src/components/common/Extensions/SpecialInput/SpecialInputBase.tsx b/src/components/common/Extensions/SpecialInput/SpecialInputBase.tsx new file mode 100644 index 00000000000..afd7818a42a --- /dev/null +++ b/src/components/common/Extensions/SpecialInput/SpecialInputBase.tsx @@ -0,0 +1,76 @@ +import clsx from 'clsx'; +import React, { type FC } from 'react'; + +import { formatText } from '~utils/intl.ts'; + +import { type SpecialInputProps } from './types.ts'; + +const displayName = 'common.Extensions.SpecialInputBase'; + +const SpecialInputBase: FC = ({ + defaultValue, + name, + disabled, + id, + placeholder, + isError, + type, + step, + onChange, + value, + min, + ...rest +}) => { + return ( +
+ e.currentTarget.blur()} + onChange={onChange} + value={value} + /> + + {type === 'hours' && formatText({ id: 'hours' })} + {type === 'percent' && '%'} + {type === 'days' && formatText({ id: 'days' })} + +
+ ); +}; +SpecialInputBase.displayName = displayName; + +export default SpecialInputBase; diff --git a/src/components/common/Extensions/SpecialInput/types.ts b/src/components/common/Extensions/SpecialInput/types.ts index 1a3177a5042..59d181e8d13 100644 --- a/src/components/common/Extensions/SpecialInput/types.ts +++ b/src/components/common/Extensions/SpecialInput/types.ts @@ -17,7 +17,7 @@ export interface SpecialInputProps { onChange?: (e: SyntheticEvent) => void; } -export type ComponentType = 'percent' | 'hours'; +export type ComponentType = 'percent' | 'hours' | 'days'; export type FormHourInput = { hours?: number; diff --git a/src/components/frame/Extensions/layouts/hooks.tsx b/src/components/frame/Extensions/layouts/hooks.tsx new file mode 100644 index 00000000000..7c8a2331887 --- /dev/null +++ b/src/components/frame/Extensions/layouts/hooks.tsx @@ -0,0 +1,360 @@ +import { + Bank, + FilePlus, + GearSix, + Layout, + Plus, + User, + Buildings, + Handshake, +} from '@phosphor-icons/react'; +import React, { useCallback, useMemo } from 'react'; +import { useLocation } from 'react-router-dom'; + +import { Action } from '~constants/actions.ts'; +import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import useColonyContractVersion from '~hooks/useColonyContractVersion.ts'; +import { + COLONY_FOLLOWERS_ROUTE, + COLONY_MULTISIG_ROUTE, +} from '~routes/routeConstants.ts'; +import { canColonyBeUpgraded } from '~utils/checks/index.ts'; +import { formatText } from '~utils/intl.ts'; +import { ACTION_TYPE_FIELD_NAME } from '~v5/common/ActionSidebar/consts.ts'; +import { type NavigationSidebarItem } from '~v5/frame/NavigationSidebar/partials/NavigationSidebarMainMenu/types.ts'; +import { type CalamityBannerItemProps } from '~v5/shared/CalamityBanner/types.ts'; + +import { + adminMenu, + agreementsMenu, + dashboardMainMenu, + dashboardMenu, + financesMenu, + membersMenu, +} from './consts.ts'; +import DashboardContent from './partials/DashboardContent/index.ts'; +import { checkIfIsActive } from './utils.ts'; + +import type { UseCalamityBannerInfoReturnType } from './types.ts'; + +export const useCalamityBannerInfo = (): UseCalamityBannerInfoReturnType => { + const { colony } = useColonyContext(); + const { colonyContractVersion } = useColonyContractVersion(); + + const { + actionSidebarToggle: [, { toggleOn: toggleActionSidebarOn }], + } = useActionSidebarContext(); + + const handleUpgradeColony = useCallback( + () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.UpgradeColonyVersion, + }), + [toggleActionSidebarOn], + ); + + const canUpgrade = canColonyBeUpgraded(colony, colonyContractVersion); + + const calamityBannerItems: CalamityBannerItemProps[] = useMemo( + () => [ + { + key: '1', + linkProps: { + to: 'https://docs.colony.io/use/advanced-features/upgrade-colony-and-extensions', + text: formatText({ id: 'learn.more' }), + }, + buttonProps: { + onClick: handleUpgradeColony, + text: formatText({ id: 'button.upgrade' }), + }, + mode: 'info', + title: formatText({ id: 'calamityBanner.available' }), + }, + ], + [handleUpgradeColony], + ); + + return { + canUpgrade, + calamityBannerItems, + }; +}; + +export const useMainMenuItems = (hasTransactionId: boolean) => { + const { + colony: { metadata, status }, + } = useColonyContext(); + + const { + actionSidebarToggle: [ + , + { toggleOn: toggleActionSidebarOn, toggleOff: toggleActionSidebarOff }, + ], + } = useActionSidebarContext(); + const { pathname } = useLocation(); + const nestedColonyPathname = pathname.split('/').slice(2).join('/'); + const handleNewActionClick = () => { + if (hasTransactionId) { + toggleActionSidebarOff(); + setTimeout(() => { + toggleActionSidebarOn(); + }, 500); + } else { + toggleActionSidebarOn(); + } + }; + + // @todo: update menu items with correct contents and related actions + const mainMenuItems: NavigationSidebarItem[] = [ + { + key: '1', + icon: FilePlus, + label: formatText({ id: 'navigation.newAction' }), + onClick: handleNewActionClick, + hideMobile: true, + isHighlighted: true, + }, + { + key: '2', + icon: Layout, + label: formatText({ id: 'navigation.dashboard' }), + isActive: checkIfIsActive(nestedColonyPathname, [ + ...dashboardMainMenu, + ...dashboardMenu, + ]), + secondLevelMenuProps: { + title: metadata?.displayName || '', + content: , + description: metadata?.description || '', + bottomActionProps: { + text: formatText({ id: 'button.createNewAction' }), + icon: Plus, + onClick: () => toggleActionSidebarOn(), + }, + }, + }, + { + key: '3', + icon: User, + label: formatText({ id: 'navigation.members' }), + isActive: + checkIfIsActive(nestedColonyPathname, [ + ...membersMenu, + { + key: '7', + label: 'MultiSig', + to: COLONY_MULTISIG_ROUTE, + icon: Buildings, + }, + ]) || nestedColonyPathname === COLONY_FOLLOWERS_ROUTE, + secondLevelMenuProps: { + title: formatText({ id: 'navigation.members.title' }), + content: membersMenu, + description: formatText({ id: 'navigation.members.description' }), + }, + relatedActionsProps: { + title: formatText({ id: 'navigation.relatedActions' }), + items: [ + { + key: '1', + label: formatText({ id: 'actions.managePermissions' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.ManagePermissions, + }), + }, + // @BETA: Disabled for now + // { + // key: '2', + // label: formatText({ id: 'actions.manageReputation' }), + // // @todo: update action type when manage reputation is implemented + // onClick: () => {}, + // }, + { + key: '3', + label: formatText({ id: 'actions.editExistingTeam' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.EditExistingTeam, + }), + }, + { + key: '4', + label: formatText({ id: 'actions.createNewTeam' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.CreateNewTeam, + }), + }, + ], + }, + }, + { + key: '4', + icon: Bank, + label: formatText({ id: 'navigation.finances' }), + isActive: checkIfIsActive(nestedColonyPathname, financesMenu), + secondLevelMenuProps: { + title: formatText({ id: 'navigation.finances.title' }), + content: financesMenu, + description: formatText({ id: 'navigation.finances.description' }), + }, + relatedActionsProps: { + title: formatText({ id: 'navigation.relatedActions' }), + items: [ + { + key: '1', + label: formatText({ id: 'actions.simplePayment' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.SimplePayment, + }), + }, + { + key: '2', + label: formatText({ id: 'actions.paymentBuilder' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.PaymentBuilder, + }), + }, + { + key: '3', + label: formatText({ id: 'actions.splitPayment' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.SplitPayment, + }), + }, + { + key: '4', + label: formatText({ id: 'actions.streamingPayment' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.StreamingPayment, + }), + }, + { + key: '6', + label: formatText({ id: 'actions.stagedPayment' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.StagedPayment, + }), + }, + { + key: '7', + label: formatText({ id: 'actions.transferFunds' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.TransferFunds, + }), + }, + { + key: '8', + label: formatText({ id: 'actions.manageTokens' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.ManageTokens, + }), + }, + ], + }, + }, + { + key: '5', + icon: Handshake, + label: formatText({ id: 'navigation.agreements' }), + isActive: checkIfIsActive(nestedColonyPathname, agreementsMenu), + secondLevelMenuProps: { + title: formatText({ id: 'navigation.agreements.title' }), + content: agreementsMenu, + description: formatText({ id: 'navigation.agreements.description' }), + }, + relatedActionsProps: { + title: formatText({ id: 'navigation.relatedActions' }), + items: [ + { + key: '1', + label: formatText({ id: 'actions.createAgreement' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.CreateDecision, + }), + }, + // { + // key: '2', + // label: formatText({ id: 'actions.simpleDiscussion' }), + // onClick: () => + // toggleActionSidebarOn({ + // [ACTION_TYPE_FIELD_NAME]: Action.SimpleDiscussion, + // }), + // }, + ], + }, + }, + { + key: '6', + icon: GearSix, + label: formatText({ id: 'navigation.admin' }), + isActive: checkIfIsActive(nestedColonyPathname, adminMenu), + secondLevelMenuProps: { + title: formatText({ id: 'navigation.admin.title' }), + content: adminMenu, + description: formatText({ id: 'navigation.admin.description' }), + }, + relatedActionsProps: { + title: formatText({ id: 'navigation.relatedActions' }), + items: [ + { + key: '1', + label: formatText({ id: 'actions.editColonyDetails' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.EditColonyDetails, + }), + }, + { + key: '2', + label: formatText({ id: 'actions.upgradeColonyVersion' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.UpgradeColonyVersion, + }), + }, + // @BETA: Disabled for now + // { + // key: '3', + // label: formatText({ id: 'actions.enterRecoveryMode' }), + // onClick: () => + // toggleActionSidebarOn({ + // [ACTION_TYPE_FIELD_NAME]: Action.EnterRecoveryMode, + // }), + // }, + { + key: '4', + label: formatText({ id: 'actions.unlockToken' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.UnlockToken, + }), + }, + ], + }, + }, + ]; + + if (status?.nativeToken?.mintable) { + mainMenuItems[3].relatedActionsProps?.items?.push({ + key: '9', + label: formatText({ id: 'actions.mintTokens' }), + onClick: () => + toggleActionSidebarOn({ + [ACTION_TYPE_FIELD_NAME]: Action.MintTokens, + }), + }); + } + + return mainMenuItems; +}; diff --git a/src/components/v5/common/ActionSidebar/hooks/permissions/helpers.ts b/src/components/v5/common/ActionSidebar/hooks/permissions/helpers.ts index aecab9d9511..1c2b3812082 100644 --- a/src/components/v5/common/ActionSidebar/hooks/permissions/helpers.ts +++ b/src/components/v5/common/ActionSidebar/hooks/permissions/helpers.ts @@ -109,6 +109,8 @@ export const getPermissionsNeededForAction = ( case Action.ArbitraryTxs: { return PERMISSIONS_NEEDED_FOR_ACTION.ArbitraryTxs; } + case Action.StreamingPayment: + return PERMISSIONS_NEEDED_FOR_ACTION.StreamingPayment; default: return undefined; diff --git a/src/components/v5/common/ActionSidebar/hooks/useActionsList.ts b/src/components/v5/common/ActionSidebar/hooks/useActionsList.ts index a5c77e75d6e..50d6c9e737b 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useActionsList.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useActionsList.ts @@ -31,11 +31,6 @@ const useActionsList = () => { value: Action.PaymentBuilder, isNew: true, }, - // @BETA: Disabled for now - // { - // label: { id: 'actions.batchPayment' }, - // value: Action.BatchPayment, - // }, { label: { id: 'actions.splitPayment' }, value: Action.SplitPayment, @@ -46,10 +41,10 @@ const useActionsList = () => { value: Action.StagedPayment, isNew: true, }, - // { - // label: { id: 'actions.streamingPayment' }, - // value: Action.StreamingPayment, - // }, + { + label: { id: 'actions.streamingPayment' }, + value: Action.StreamingPayment, + }, ], }, { diff --git a/src/components/v5/common/ActionSidebar/hooks/useSidebarActionForm.ts b/src/components/v5/common/ActionSidebar/hooks/useSidebarActionForm.ts index dd3bd96583a..dc327208e87 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useSidebarActionForm.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useSidebarActionForm.ts @@ -20,6 +20,7 @@ import PaymentBuilderForm from '../partials/forms/PaymentBuilderForm/index.ts'; import SinglePaymentForm from '../partials/forms/SimplePaymentForm/index.ts'; import SplitPaymentForm from '../partials/forms/SplitPaymentForm/index.ts'; import StagedPaymentForm from '../partials/forms/StagedPaymentForm/StagedPaymentForm.tsx'; +import StreamingPaymentForm from '../partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx'; import TransferFundsForm from '../partials/forms/TransferFundsForm/index.ts'; import UnlockTokenForm from '../partials/forms/UnlockTokenForm/index.ts'; import UpgradeColonyForm from '../partials/forms/UpgradeColonyForm/index.ts'; @@ -49,6 +50,7 @@ const useSidebarActionForm = () => { [Action.ManageVerifiedMembers]: ManageVerifiedMembersForm, [Action.ManageReputation]: ManageReputationForm, [Action.ArbitraryTxs]: ArbitraryTxsForm, + [Action.StreamingPayment]: StreamingPaymentForm, }), [], ); diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/ActionSidebarDescription.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/ActionSidebarDescription.tsx index 3a9fce5b269..2470645c9a9 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/ActionSidebarDescription.tsx +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/ActionSidebarDescription.tsx @@ -18,6 +18,7 @@ import PaymentBuilderDescription from './partials/PaymentBuilderDescription.tsx' import SimplePaymentDescription from './partials/SimplePaymentDescription.tsx'; import SplitPaymentDescription from './partials/SplitPaymentDescription.tsx'; import StagedPaymentsDescription from './partials/StagedPaymentsDescription.tsx'; +import StreamingPaymentDescription from './partials/StreamingPaymentDescription.tsx'; import TransferFundsDescription from './partials/TransferFundsDescription.tsx'; import UnlockTokenDescription from './partials/UnlockTokenDescription.tsx'; import UpgradeColonyDescription from './partials/UpgradeColonyDescription.tsx'; @@ -65,6 +66,8 @@ const ActionSidebarDescription = () => { return ; case Action.ArbitraryTxs: return ; + case Action.StreamingPayment: + return ; default: return null; } diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/partials/StreamingPaymentDescription.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/partials/StreamingPaymentDescription.tsx new file mode 100644 index 00000000000..ec2e87fb614 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/partials/StreamingPaymentDescription.tsx @@ -0,0 +1,83 @@ +import React from 'react'; +import { useFormContext } from 'react-hook-form'; +import { FormattedMessage } from 'react-intl'; + +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import Numeral from '~shared/Numeral/Numeral.tsx'; +import { ColonyActionType } from '~types/graphql.ts'; +import { formatText } from '~utils/intl.ts'; +import { getSelectedToken } from '~utils/tokens.ts'; + +import { + ONE_DAY_IN_SECONDS, + OPTIONS, +} from '../../AmountPerPeriodRow/consts.ts'; +import { type StreamingPaymentFormValues } from '../../forms/StreamingPaymentForm/hooks.ts'; +import { getInterval } from '../../forms/StreamingPaymentForm/utils.ts'; + +import CurrentUser from './CurrentUser.tsx'; +import RecipientUser from './RecipientUser.tsx'; + +const displayName = + 'v5.common.ActionsSidebar.partials.ActionSidebarDescription.partials.StreamingPaymentDescription'; + +export const StreamingPaymentDescription = () => { + const { colony } = useColonyContext(); + const formValues = useFormContext().getValues(); + const { amount, recipient, tokenAddress, period } = formValues; + + if (!amount || !tokenAddress) { + return ( + , + }} + /> + ); + } + + const recipientUser = recipient ? ( + + ) : ( + formatText({ + id: 'actionSidebar.metadataDescription.recipient', + }) + ); + + const selectedToken = getSelectedToken(colony, tokenAddress); + const interval = getInterval(period); + + return ( + , + period: + period && interval + ? OPTIONS[0].options.find(({ value }) => value === period.interval) + ?.label || + formatText( + { id: 'streamingPayment.description.days' }, + { + days: interval / ONE_DAY_IN_SECONDS, + }, + ) + : formatText({ + id: 'actionSidebar.amountPer.options.week', + }).toLowerCase(), + initiator: , + }} + /> + ); +}; + +StreamingPaymentDescription.displayName = displayName; +export default StreamingPaymentDescription; diff --git a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/AmountPerPeriodRow.tsx b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/AmountPerPeriodRow.tsx new file mode 100644 index 00000000000..d3b6f359713 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/AmountPerPeriodRow.tsx @@ -0,0 +1,58 @@ +import { Calendar } from '@phosphor-icons/react'; +import React from 'react'; + +import { formatText } from '~utils/intl.ts'; +import ActionFormRow from '~v5/common/ActionFormRow/index.ts'; + +import useHasNoDecisionMethods from '../../hooks/permissions/useHasNoDecisionMethods.ts'; + +import { OPTIONS } from './consts.ts'; +import AmountPerPeriodRowField from './partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx'; +import { type AmountPerPeriodRowProps } from './types.ts'; + +const displayName = 'v5.common.ActionSidebar.partials.AmountPerPeriodRow'; + +const AmountPerPeriodRow = ({ + title, + tooltips, + name, +}: AmountPerPeriodRowProps) => { + const hasNoDecisionMethods = useHasNoDecisionMethods(); + + return ( + +
+ +
+
+ ); +}; + +AmountPerPeriodRow.displayName = displayName; + +export default AmountPerPeriodRow; diff --git a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/consts.ts b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/consts.ts new file mode 100644 index 00000000000..53d3a567d7c --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/consts.ts @@ -0,0 +1,40 @@ +import { formatText } from '~utils/intl.ts'; +import { type CardSelectOptionsGroup } from '~v5/common/Fields/CardSelect/types.ts'; + +import { AmountPerInterval } from './types.ts'; + +export const ONE_HOUR_IN_SECONDS = 3600; +export const ONE_DAY_IN_SECONDS = ONE_HOUR_IN_SECONDS * 24; + +export const OPTIONS: CardSelectOptionsGroup[] = [ + { + key: '1', + title: formatText({ id: 'actionSidebar.amountPer.options.title' }), + options: [ + { + value: AmountPerInterval.Hour, + label: formatText({ + id: 'actionSidebar.amountPer.options.hour', + }), + }, + { + value: AmountPerInterval.Day, + label: formatText({ + id: 'actionSidebar.amountPer.options.day', + }), + }, + { + value: AmountPerInterval.Week, + label: formatText({ + id: 'actionSidebar.amountPer.options.week', + }), + }, + { + value: AmountPerInterval.Custom, + label: formatText({ + id: 'actionSidebar.amountPer.options.custom', + }), + }, + ], + }, +]; diff --git a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx new file mode 100644 index 00000000000..08141805982 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx @@ -0,0 +1,133 @@ +import clsx from 'clsx'; +import React, { useState, type FC } from 'react'; +import { useController } from 'react-hook-form'; + +import SpecialInputBase from '~common/Extensions/SpecialInput/SpecialInputBase.tsx'; +import { useMobile } from '~hooks'; +import CardSelect from '~v5/common/Fields/CardSelect/CardSelect.tsx'; +import { FieldState } from '~v5/common/Fields/consts.ts'; + +import { ONE_DAY_IN_SECONDS } from '../../consts.ts'; +import { AmountPerInterval } from '../../types.ts'; + +import { type AmountPerPeriodRowFieldProps } from './types.ts'; + +const displayName = + 'v5.common.ActionSidebar.partials.AmountPerPeriodRow.partials.AmountPerPeriodRowField'; + +const AmountPerPeriodRowField: FC = ({ + name, + options, + placeholder: placeholderProp, + selectedValueWrapperClassName, +}) => { + const isMobile = useMobile(); + const { + field, + fieldState: { error }, + } = useController({ + name: `${name}.interval`, + }); + const { + field: fieldCustom, + fieldState: { error: errorCustom }, + } = useController({ + name: `${name}.custom`, + }); + + const [customInputValue, setCustomInputValue] = useState( + fieldCustom.value + ? (fieldCustom.value / ONE_DAY_IN_SECONDS).toString() + : '30', + ); + + return ( + + options={options} + state={error || errorCustom ? FieldState.Error : undefined} + value={field.value} + placeholder={placeholderProp} + cardClassName={clsx('sm:!w-[16rem]', { + '!left-6 right-6': isMobile, + 'pb-0': field.value === AmountPerInterval.Custom, + })} + renderSelectedValue={(selectedValue, placeholder) => { + if (selectedValue?.value === AmountPerInterval.Custom) { + return ( +
+ {`${customInputValue} Days`} +
+ ); + } + return ( +
+ {selectedValue?.label || placeholder} +
+ ); + }} + renderOptionWrapper={( + { value: itemValue, onClick, className, ...props }, + children, + ) => { + const isCustomValue = itemValue === AmountPerInterval.Custom; + + return isCustomValue ? ( +
+ + {field.value === AmountPerInterval.Custom && ( +
+ { + setCustomInputValue(e.currentTarget.value.substring(0, 5)); + + const calculatedValue = + Number(e.currentTarget.value.substring(0, 5)) * + ONE_DAY_IN_SECONDS; + + fieldCustom.onChange(calculatedValue); + }} + /> +
+ )} +
+ ) : ( + + ); + }} + /> + ); +}; + +AmountPerPeriodRowField.displayName = displayName; + +export default AmountPerPeriodRowField; diff --git a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/types.ts b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/types.ts new file mode 100644 index 00000000000..85dcda5e72e --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/types.ts @@ -0,0 +1,8 @@ +import { type CardSelectOptionsGroup } from '~v5/common/Fields/CardSelect/types.ts'; + +export interface AmountPerPeriodRowFieldProps { + name: string; + options: CardSelectOptionsGroup[]; + placeholder: string; + selectedValueWrapperClassName?: string; +} diff --git a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/types.ts b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/types.ts new file mode 100644 index 00000000000..92c41d21375 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/types.ts @@ -0,0 +1,14 @@ +import { type ActionFormRowProps } from '~v5/common/ActionFormRow/types.ts'; + +export enum AmountPerInterval { + Hour = 'hour', + Day = 'day', + Week = 'week', + Custom = 'custom', +} + +export interface AmountPerPeriodRowProps + extends Pick { + name: string; + title?: React.ReactNode; +} diff --git a/src/components/v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx b/src/components/v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx index e4a8d5c9457..97d44faab0d 100644 --- a/src/components/v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx +++ b/src/components/v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx @@ -9,6 +9,7 @@ import isPast from 'date-fns/isPast'; import React from 'react'; import { useWatch } from 'react-hook-form'; +import { StreamingPaymentEndCondition } from '~gql'; import Tooltip from '~shared/Extensions/Tooltip/Tooltip.tsx'; import { formatText } from '~utils/intl.ts'; import ActionFormRow from '~v5/common/ActionFormRow/index.ts'; @@ -16,12 +17,19 @@ import ActionFormRow from '~v5/common/ActionFormRow/index.ts'; import useHasNoDecisionMethods from '../../hooks/permissions/useHasNoDecisionMethods.ts'; import { END_OPTIONS, START_OPTIONS } from './consts.ts'; +import { CUSTOM_DATE_VALUE } from './partials/TimeRowField/consts.ts'; import TimeRowField from './partials/TimeRowField/TimeRowField.tsx'; import { type TimeRowProps } from './types.ts'; const displayName = 'v5.common.ActionSidebar.partials.TimeRow'; -const TimeRow = ({ title, tooltips, type = 'start', name }: TimeRowProps) => { +const TimeRow = ({ + title, + tooltips, + type = 'start', + name, + minDate, +}: TimeRowProps) => { const hasNoDecisionMethods = useHasNoDecisionMethods(); const selectedDate = useWatch({ name }); @@ -54,6 +62,12 @@ const TimeRow = ({ title, tooltips, type = 'start', name }: TimeRowProps) => { ? 'actionSidebar.starts.placeholder' : 'actionSidebar.ends.placeholder', })} + minDate={minDate} + customDateValue={ + type === 'start' + ? CUSTOM_DATE_VALUE + : StreamingPaymentEndCondition.FixedTime + } />
{isDateInPast && ( diff --git a/src/components/v5/common/ActionSidebar/partials/TimeRow/consts.ts b/src/components/v5/common/ActionSidebar/partials/TimeRow/consts.ts index bd48025d5b7..16feda47423 100644 --- a/src/components/v5/common/ActionSidebar/partials/TimeRow/consts.ts +++ b/src/components/v5/common/ActionSidebar/partials/TimeRow/consts.ts @@ -1,15 +1,18 @@ +import { StreamingPaymentEndCondition } from '~gql'; import { formatText } from '~utils/intl.ts'; import { type CardSelectOptionsGroup } from '~v5/common/Fields/CardSelect/types.ts'; import { CUSTOM_DATE_VALUE } from './partials/TimeRowField/consts.ts'; +export const START_IMMEDIATELY_VALUE = 'start_immediately'; + export const START_OPTIONS: CardSelectOptionsGroup[] = [ { key: '1', title: formatText({ id: 'actionSidebar.starts.options.title' }), options: [ { - value: 'start_immediately', + value: START_IMMEDIATELY_VALUE, label: formatText({ id: 'actionSidebar.starts.options.startImidiately', }), @@ -30,19 +33,19 @@ export const END_OPTIONS: CardSelectOptionsGroup[] = [ title: formatText({ id: 'actionSidebar.ends.options.title' }), options: [ { - value: 'when_cancelled', + value: StreamingPaymentEndCondition.WhenCancelled, label: formatText({ id: 'actionSidebar.ends.options.whenCancelled', }), }, { - value: 'limit_reached', + value: StreamingPaymentEndCondition.LimitReached, label: formatText({ id: 'actionSidebar.ends.options.limitReached', }), }, { - value: CUSTOM_DATE_VALUE, + value: StreamingPaymentEndCondition.FixedTime, label: formatText({ id: 'actionSidebar.ends.options.fixedTime', }), diff --git a/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/TimeRowField.tsx b/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/TimeRowField.tsx index 05ceb7433f8..7e8c92e3728 100644 --- a/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/TimeRowField.tsx +++ b/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/TimeRowField.tsx @@ -10,7 +10,6 @@ import { FieldState } from '~v5/common/Fields/consts.ts'; import { DEFAULT_DATE_TIME_FORMAT } from '~v5/common/Fields/datepickers/common/consts.ts'; import DatepickerWithTime from '~v5/common/Fields/datepickers/DatepickerWithTime/DatepickerWithTime.tsx'; -import { CUSTOM_DATE_VALUE } from './consts.ts'; import { type TimeRowFieldProps } from './types.ts'; const displayName = @@ -21,6 +20,8 @@ const TimeRowField: FC = ({ options, placeholder: placeholderProp, selectedValueWrapperClassName, + minDate, + customDateValue, }) => { const isMobile = useMobile(); const [isDatepickerVisible, setIsDatepickerVisible] = useState(false); @@ -32,7 +33,7 @@ const TimeRowField: FC = ({ }); const [value, setValue] = useState( - isDate(field.value) ? CUSTOM_DATE_VALUE : field.value, + isDate(field.value) ? customDateValue : field.value, ); return ( @@ -46,7 +47,7 @@ const TimeRowField: FC = ({ 'pb-0': isDatepickerVisible, })} renderSelectedValue={(selectedValue, placeholder) => { - if (selectedValue?.value === CUSTOM_DATE_VALUE) { + if (selectedValue?.value === customDateValue) { return (
{field.value @@ -65,7 +66,7 @@ const TimeRowField: FC = ({ { value: itemValue, onClick, className, ...props }, children, ) => { - const isCustomDate = itemValue === CUSTOM_DATE_VALUE; + const isCustomDate = itemValue === customDateValue; return isCustomDate ? (
@@ -74,7 +75,7 @@ const TimeRowField: FC = ({ onClick={() => { setIsDatepickerVisible(true); if (!isDate(field.value)) { - field.onChange(''); + field.onChange(itemValue); } }} className={clsx(className, { @@ -95,6 +96,7 @@ const TimeRowField: FC = ({ }} inline onClose={onClick} + minDate={minDate} />
)} diff --git a/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/types.ts b/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/types.ts index 5cdce0835e7..f5007f349dd 100644 --- a/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/types.ts +++ b/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/types.ts @@ -5,4 +5,6 @@ export interface TimeRowFieldProps { options: CardSelectOptionsGroup[]; placeholder: string; selectedValueWrapperClassName?: string; + minDate?: Date; + customDateValue: string; } diff --git a/src/components/v5/common/ActionSidebar/partials/TimeRow/types.ts b/src/components/v5/common/ActionSidebar/partials/TimeRow/types.ts index 22afa5753b9..151f6d8dff8 100644 --- a/src/components/v5/common/ActionSidebar/partials/TimeRow/types.ts +++ b/src/components/v5/common/ActionSidebar/partials/TimeRow/types.ts @@ -4,4 +4,5 @@ export interface TimeRowProps extends Pick { name: string; title?: React.ReactNode; type?: 'start' | 'end'; + minDate?: Date; } diff --git a/src/components/v5/common/ActionSidebar/partials/forms/SimplePaymentForm/SimplePaymentForm.tsx b/src/components/v5/common/ActionSidebar/partials/forms/SimplePaymentForm/SimplePaymentForm.tsx index 01d66bcbad1..b426fbfa1cb 100644 --- a/src/components/v5/common/ActionSidebar/partials/forms/SimplePaymentForm/SimplePaymentForm.tsx +++ b/src/components/v5/common/ActionSidebar/partials/forms/SimplePaymentForm/SimplePaymentForm.tsx @@ -12,7 +12,6 @@ import DecisionMethodField from '~v5/common/ActionSidebar/partials/DecisionMetho import Description from '~v5/common/ActionSidebar/partials/Description/index.ts'; import TeamsSelect from '~v5/common/ActionSidebar/partials/TeamsSelect/index.ts'; import UserSelect from '~v5/common/ActionSidebar/partials/UserSelect/index.ts'; -import TimeRow from '~v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx'; import { type ActionFormBaseProps } from '~v5/common/ActionSidebar/types.ts'; import { useSimplePayment } from './hooks.ts'; @@ -74,11 +73,6 @@ const SimplePaymentForm: FC = ({ getFormOptions }) => { - {/* This input is needed for default values when changing the action */} - - {/* @todo: remove before merging to master, it's added only to test this field before streaming payments form will be ready */} - - {/* Disabled for now */} {/* */} diff --git a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx new file mode 100644 index 00000000000..65171ddf474 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx @@ -0,0 +1,130 @@ +import { HandPalm, UserFocus, UsersThree } from '@phosphor-icons/react'; +import isDate from 'date-fns/isDate'; +import React, { type FC } from 'react'; +import { useWatch } from 'react-hook-form'; + +import { StreamingPaymentEndCondition } from '~gql'; +import { formatText } from '~utils/intl.ts'; +import ActionFormRow from '~v5/common/ActionFormRow/ActionFormRow.tsx'; +import useHasNoDecisionMethods from '~v5/common/ActionSidebar/hooks/permissions/useHasNoDecisionMethods.ts'; +import useFilterCreatedInField from '~v5/common/ActionSidebar/hooks/useFilterCreatedInField.ts'; +import { type ActionFormBaseProps } from '~v5/common/ActionSidebar/types.ts'; + +import AmountField from '../../AmountField/AmountField.tsx'; +import AmountPerPeriodRow from '../../AmountPerPeriodRow/AmountPerPeriodRow.tsx'; +import AmountRow from '../../AmountRow/AmountRow.tsx'; +import CreatedIn from '../../CreatedIn/CreatedIn.tsx'; +import DecisionMethodField from '../../DecisionMethodField/DecisionMethodField.tsx'; +import Description from '../../Description/Description.tsx'; +import TeamsSelect from '../../TeamsSelect/TeamsSelect.tsx'; +import TimeRow from '../../TimeRow/TimeRow.tsx'; +import UserSelect from '../../UserSelect/UserSelect.tsx'; + +import { useStreamingPayment } from './hooks.ts'; + +const StreamingPaymentForm: FC = ({ getFormOptions }) => { + useStreamingPayment(getFormOptions); + + const hasNoDecisionMethods = useHasNoDecisionMethods(); + const createdInFilterFn = useFilterCreatedInField('from'); + const selectedTeam = useWatch({ name: 'from' }); + const startsCondition = useWatch({ name: 'starts' }); + const endsCondition = useWatch({ name: 'ends' }); + + return ( + <> + + + + + + + + + + + {endsCondition === StreamingPaymentEndCondition.LimitReached && ( + + + + )} + + + + + ); +}; + +export default StreamingPaymentForm; diff --git a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts new file mode 100644 index 00000000000..fb2d00418c0 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts @@ -0,0 +1,198 @@ +import { Id } from '@colony/colony-js'; +import isDate from 'date-fns/isDate'; +import { useCallback, useEffect, useMemo } from 'react'; +import { useFormContext, useWatch } from 'react-hook-form'; +import { type DeepPartial } from 'utility-types'; +import { type InferType, number, object, string, date, lazy, mixed } from 'yup'; + +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { StreamingPaymentEndCondition } from '~gql'; +import useNetworkInverseFee from '~hooks/useNetworkInverseFee.ts'; +import { ActionTypes } from '~redux/index.ts'; +import { mapPayload, pipe } from '~utils/actions.ts'; +import getLastIndexFromPath from '~utils/getLastIndexFromPath.ts'; +import { formatText } from '~utils/intl.ts'; +import { amountGreaterThanValidation } from '~utils/validation/amountGreaterThanValidation.ts'; +import { amountGreaterThanZeroValidation } from '~utils/validation/amountGreaterThanZeroValidation.ts'; +import { hasEnoughFundsValidation } from '~utils/validation/hasEnoughFundsValidation.ts'; +import { ACTION_BASE_VALIDATION_SCHEMA } from '~v5/common/ActionSidebar/consts.ts'; + +import useActionFormBaseHook from '../../../hooks/useActionFormBaseHook.ts'; +import { type ActionFormBaseProps } from '../../../types.ts'; +import { ONE_DAY_IN_SECONDS } from '../../AmountPerPeriodRow/consts.ts'; +import { AmountPerInterval } from '../../AmountPerPeriodRow/types.ts'; + +import { getStreamingPaymentPayload } from './utils.ts'; + +export const useValidationSchema = (networkInverseFee: string | undefined) => { + const { colony } = useColonyContext(); + const fromDomainId: number | undefined = useWatch({ name: 'from' }); + const amount: string | undefined = useWatch({ name: 'amount' }); + + const validationSchema = useMemo( + () => + object() + .shape({ + amount: string() + .required(() => formatText({ id: 'errors.amount' })) + .test( + 'more-than-zero', + ({ path }) => { + const index = getLastIndexFromPath(path); + if (index === undefined) { + return formatText({ + id: 'errors.amount.greaterThanZero', + }); + } + return formatText( + { id: 'errors.amount.greaterThanZeroIn' }, + { paymentIndex: index + 1 }, + ); + }, + (value, context) => + amountGreaterThanZeroValidation({ value, context, colony }), + ) + .test( + 'enough-tokens', + formatText({ id: 'errors.amount.notEnoughTokens' }) || '', + (value, context) => + hasEnoughFundsValidation({ + value, + context, + domainId: fromDomainId, + colony, + networkInverseFee, + }), + ), + tokenAddress: string().address().required(), + limitTokenAddress: string().address(), + limit: string().when('ends', { + is: StreamingPaymentEndCondition.LimitReached, + then: string() + .required(() => formatText({ id: 'errors.amount' })) + .test( + 'more-than-amount', + () => { + return formatText( + { id: 'errors.amount.greaterThan' }, + { amount: amount || '0' }, + ); + }, + (value, context) => + amountGreaterThanValidation({ + value, + context, + colony, + greaterThanValue: context.parent.amount || '0', + }), + ), + }), + createdIn: number().defined(), + recipient: string().address().required(), + from: number().required(), + starts: lazy((value) => + isDate(value) ? date().required() : string().required(), + ), + ends: lazy((value) => + isDate(value) + ? date().required() + : mixed() + .oneOf(Object.values(StreamingPaymentEndCondition)) + .required(), + ), + decisionMethod: string().defined(), + period: object() + .shape({ + interval: mixed() + .oneOf(Object.values(AmountPerInterval)) + .required(() => + formatText({ id: 'errors.amountPer.required' }), + ), + custom: number().when('interval', { + is: AmountPerInterval.Custom, + then: (schema) => + schema + .min( + ONE_DAY_IN_SECONDS, + formatText({ id: 'errors.amountPer.min' }), + ) + .max( + ONE_DAY_IN_SECONDS * 99999, + formatText( + { id: 'errors.amountPer.max' }, + { max: '99999 days' }, + ), + ) + .required(), + }), + }) + .required(), + }) + .defined() + .concat(ACTION_BASE_VALIDATION_SCHEMA), + [amount, colony, fromDomainId, networkInverseFee], + ); + + return validationSchema; +}; + +export type StreamingPaymentFormValues = InferType< + ReturnType +>; + +export const useStreamingPayment = ( + getFormOptions: ActionFormBaseProps['getFormOptions'], +) => { + const { networkInverseFee } = useNetworkInverseFee(); + const { colony } = useColonyContext(); + const validationSchema = useValidationSchema(networkInverseFee); + const tokenAddress = useWatch({ name: 'tokenAddress' }); + const limitTokenAddress = useWatch({ name: 'limitTokenAddress' }); + const endCondition = useWatch({ name: 'ends' }); + const { setValue, resetField, trigger } = useFormContext(); + + useEffect(() => { + if ( + tokenAddress && + tokenAddress !== limitTokenAddress && + endCondition === StreamingPaymentEndCondition.LimitReached + ) { + setValue('limitTokenAddress', tokenAddress); + } + }, [endCondition, limitTokenAddress, setValue, tokenAddress]); + + useEffect(() => { + if ( + limitTokenAddress && + endCondition !== StreamingPaymentEndCondition.LimitReached + ) { + trigger('limit'); + resetField('limit'); + } + }, [endCondition, limitTokenAddress, resetField, trigger]); + + useActionFormBaseHook({ + validationSchema, + defaultValues: useMemo>( + () => ({ + createdIn: Id.RootDomain, + tokenAddress: colony.nativeToken.tokenAddress, + period: { + custom: ONE_DAY_IN_SECONDS * 30, + }, + }), + [colony.nativeToken.tokenAddress], + ), + actionType: ActionTypes.STREAMING_PAYMENT_CREATE, + getFormOptions, + // eslint-disable-next-line react-hooks/exhaustive-deps + transform: useCallback( + pipe( + mapPayload((values: StreamingPaymentFormValues) => { + return getStreamingPaymentPayload(colony, values); + }), + ), + [colony, networkInverseFee], + ), + }); +}; diff --git a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/utils.ts b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/utils.ts new file mode 100644 index 00000000000..98ee0108324 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/utils.ts @@ -0,0 +1,94 @@ +import isDate from 'date-fns/isDate'; +import { BigNumber } from 'ethers'; + +import { StreamingPaymentEndCondition } from '~gql'; +import { type CreateStreamingPaymentPayload } from '~redux/sagas/expenditures/createStreamingPayment.ts'; +import { DecisionMethod } from '~types/actions.ts'; +import { type Colony } from '~types/graphql.ts'; +import { findDomainByNativeId } from '~utils/domains.ts'; +import { + getSelectedToken, + getTokenDecimalsWithFallback, +} from '~utils/tokens.ts'; + +import { + ONE_DAY_IN_SECONDS, + ONE_HOUR_IN_SECONDS, +} from '../../AmountPerPeriodRow/consts.ts'; +import { AmountPerInterval } from '../../AmountPerPeriodRow/types.ts'; +import { START_IMMEDIATELY_VALUE } from '../../TimeRow/consts.ts'; + +import { type StreamingPaymentFormValues } from './hooks.ts'; + +export const getInterval = (period: StreamingPaymentFormValues['period']) => { + switch (period.interval) { + case AmountPerInterval.Hour: + return ONE_HOUR_IN_SECONDS; + case AmountPerInterval.Day: + return ONE_DAY_IN_SECONDS; + case AmountPerInterval.Week: + return ONE_DAY_IN_SECONDS * 7; + case AmountPerInterval.Custom: + return period.custom; + default: + return 0; + } +}; + +export const getStreamingPaymentPayload = ( + colony: Colony, + values: StreamingPaymentFormValues, +): CreateStreamingPaymentPayload | null => { + const { + amount, + tokenAddress, + description: annotationMessage, + createdIn, + recipient, + period, + ends, + starts, + limit, + from, + decisionMethod, + } = values; + + const selectedToken = getSelectedToken(colony, tokenAddress); + const decimals = getTokenDecimalsWithFallback(selectedToken?.decimals); + const createdInDomain = findDomainByNativeId(createdIn, colony); + const fromDomain = findDomainByNativeId(from, colony); + + if (!createdInDomain || !fromDomain) { + return null; + } + + const interval = getInterval(period); + + if (!interval) { + return null; + } + + return { + colonyAddress: colony.colonyAddress, + createdInDomain: + decisionMethod === DecisionMethod.Reputation + ? createdInDomain + : fromDomain, + amount, + endCondition: isDate(ends) ? StreamingPaymentEndCondition.FixedTime : ends, + interval, + recipientAddress: recipient ?? '', + startTimestamp: + starts === START_IMMEDIATELY_VALUE + ? '0' + : BigNumber.from(new Date(starts).getTime()).toString(), + tokenAddress, + tokenDecimals: decimals, + endTimestamp: isDate(ends) + ? BigNumber.from(new Date(ends).getTime()).toString() + : undefined, + limitAmount: + ends === StreamingPaymentEndCondition.LimitReached ? limit : undefined, + annotationMessage, + }; +}; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/DatepickerWithTime.tsx b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/DatepickerWithTime.tsx index 079f71d227c..28521813244 100644 --- a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/DatepickerWithTime.tsx +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/DatepickerWithTime.tsx @@ -1,5 +1,5 @@ import clsx from 'clsx'; -import React, { type FC, useRef, useState } from 'react'; +import React, { type FC, useRef, useState, useMemo } from 'react'; import DatePicker from 'react-datepicker'; import 'react-datepicker/dist/react-datepicker.css'; @@ -19,9 +19,13 @@ import DatepickerCustomHeader from './partials/DatepickerCustomHeader/Datepicker import DatepickerCustomInput from './partials/DatepickerCustomInput/DatepickerCustomInput.tsx'; import DatepickerTimePicker from './partials/DatepickerTimePicker/DatepickerTimePicker.tsx'; import { type DatepickerWithTimeProps } from './types.ts'; +import { daysFromRefDate } from './utils.ts'; import styles from '../common/Datepicker.module.css'; +const maxTimeMinDay = new Date().setHours(23, 59, 0, 0); +const minTimeMaxDay = new Date().setHours(0, 0, 0, 0); + const DatepickerWithTime: FC = ({ cancelButtonProps, applyButtonProps, @@ -36,6 +40,8 @@ const DatepickerWithTime: FC = ({ inline, withCloseButton, onClose, + minDate = new Date('1970-01-01'), + maxDate = new Date('99999-01-01'), ...rest }) => { const isMobile = useMobile(); @@ -47,6 +53,19 @@ const DatepickerWithTime: FC = ({ selectedProp || null, ); + const minDays = useMemo(() => daysFromRefDate(minDate), [minDate]); + const maxDays = useMemo(() => daysFromRefDate(maxDate), [maxDate]); + const selDays = useMemo(() => daysFromRefDate(selectedDate), [selectedDate]); + + const isMinDay = selDays === minDays; + const isMaxDay = selDays === maxDays; + + const maxDayMinTime = isMaxDay ? new Date(minTimeMaxDay) : null; + const maxDayMaxTime = isMinDay ? new Date(maxTimeMinDay) : null; + + const minTime = isMinDay ? minDate : maxDayMinTime; + const maxTime = isMaxDay ? maxDate : maxDayMaxTime; + const resetValues = () => { setSelectedDate(selectedProp || null); setSelectedTime(selectedProp || null); @@ -130,6 +149,10 @@ const DatepickerWithTime: FC = ({ onChange(selectedDate, event); onClose?.(); }} + minDate={minDate} + maxDate={maxDate} + minTime={minTime ?? undefined} + maxTime={maxTime ?? undefined} customTimeInput={
= ({ onClose?.(); } }} + minDate={minDate} + maxDate={maxDate} + minTime={minTime ?? undefined} + maxTime={maxTime ?? undefined} onBlur={(event) => { if (isMobile) { return; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.module.css b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.module.css index 459f52f6be8..c1aaed0e2ec 100644 --- a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.module.css +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.module.css @@ -40,7 +40,7 @@ ul.react-datepicker__time-list li.react-datepicker__time-list-item ) { - @apply flex h-[2.1875rem] w-full items-center rounded px-4 py-1 text-left text-md text-gray-900 transition sm:hover:bg-gray-50; + @apply flex h-[2.1875rem] w-full items-center rounded px-4 py-1 text-left text-md text-gray-900 transition sm:enabled:hover:bg-gray-50; } .wrapper @@ -51,5 +51,9 @@ ul.react-datepicker__time-list li.react-datepicker__time-list-item--selected ) { - @apply bg-gray-50 font-medium sm:hover:bg-gray-50; + @apply bg-gray-50 font-medium sm:enabled:hover:bg-gray-50; +} + +.wrapper :global(.react-datepicker__time-list-item--disabled) { + @apply opacity-50; } diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.tsx b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.tsx index cc65e8ff83d..b4f810c075e 100644 --- a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.tsx +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/DatepickerTimePicker.tsx @@ -13,6 +13,10 @@ const DatepickerTimePicker: FC = ({ selected, onChange, onBlur, + minDate, + maxDate, + minTime, + maxTime, }) => { const isMobile = useMobile(); @@ -45,6 +49,10 @@ const DatepickerTimePicker: FC = ({ } : undefined } + minDate={minDate} + maxDate={maxDate} + minTime={minTime} + maxTime={maxTime} /> ); }; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/types.ts b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/types.ts index d29dad41797..a76df4b352c 100644 --- a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/types.ts +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/partials/DatepickerTimePicker/types.ts @@ -2,5 +2,11 @@ import { type ReactDatePickerProps } from 'react-datepicker'; export type DatepickerTimePickerProps = Pick< ReactDatePickerProps, - 'selected' | 'onChange' | 'onBlur' + | 'selected' + | 'onChange' + | 'onBlur' + | 'minDate' + | 'maxDate' + | 'minTime' + | 'maxTime' >; diff --git a/src/components/v5/common/Fields/datepickers/DatepickerWithTime/utils.ts b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/utils.ts new file mode 100644 index 00000000000..0808d7d4173 --- /dev/null +++ b/src/components/v5/common/Fields/datepickers/DatepickerWithTime/utils.ts @@ -0,0 +1,3 @@ +export const daysFromRefDate = (date: Date | null) => + date && + Math.floor((date.getTime() - date.getTimezoneOffset() * 60000) / 86400000); diff --git a/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx b/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx index cc4cb431e0b..b0f46565ca9 100644 --- a/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx +++ b/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx @@ -4,6 +4,7 @@ import React, { type FC } from 'react'; import { defineMessages } from 'react-intl'; import { useNavigate } from 'react-router-dom'; +import { supportedExtensionsConfig } from '~constants'; import { Action } from '~constants/actions.ts'; import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; @@ -46,6 +47,11 @@ const MSG = defineMessages({ id: `${displayName}.viewExtension`, defaultMessage: 'View extension', }, + extensionNotInstalled: { + id: `${displayName}.extensionNotInstalled`, + defaultMessage: + 'You need to install the {extensionName} extension to create this action.', + }, }); export const ActionTypeNotification: FC = ({ @@ -81,6 +87,17 @@ export const ActionTypeNotification: FC = ({ return isFieldDisabled ? formatText(MSG.stagedExpenditureExtensionNotEnabledError) : undefined; + case Action.StreamingPayment: { + const extensionName = supportedExtensionsConfig.find( + (extension) => extension.extensionId === Extension.StreamingPayments, + )?.name; + + return isFieldDisabled && extensionName + ? formatText(MSG.extensionNotInstalled, { + extensionName: formatText(extensionName), + }) + : undefined; + } default: return undefined; } diff --git a/src/constants/actions.ts b/src/constants/actions.ts index 1afcde4606a..ca6f351d28a 100644 --- a/src/constants/actions.ts +++ b/src/constants/actions.ts @@ -32,6 +32,7 @@ export const PERMISSIONS_NEEDED_FOR_ACTION = { SplitPayment: [[ColonyRole.Administration]], StagedPayment: [[ColonyRole.Administration]], ArbitraryTxs: [[ColonyRole.Root]], + StreamingPayment: [[ColonyRole.Administration]], }; export enum Action { diff --git a/src/i18n/en-actions.ts b/src/i18n/en-actions.ts index bc670500a6d..87612b2487f 100644 --- a/src/i18n/en-actions.ts +++ b/src/i18n/en-actions.ts @@ -91,6 +91,7 @@ const actionsMessageDescriptors = { ${ExtendedColonyActionType.UpdateColonyObjectiveMultisig} {Manage objective by {initiator}} ${ExtendedColonyActionType.SplitPayment} {Split Payment of {splitAmount} {tokenSymbol} by {initiator}} ${ExtendedColonyActionType.StagedPayment} {Staged payment {tokensNumber, plural, one {of {stagedAmount} {tokenSymbol}} other {with {tokensNumber} tokens}} to {recipient} with {milestonesCount} {milestonesCount, plural, one {milestone} other {milestones}} by {initiator}} + ${ColonyActionType.CreateStreamingPayment} {Stream {amount} {tokenSymbol} / {period} to {recipient} by {initiator}} other {Generic action we don't have information about} }`, 'action.type': `{actionType, select, @@ -160,6 +161,7 @@ const actionsMessageDescriptors = { ${ExtendedColonyActionType.UpdateColonyObjectiveMotion} {Manage objective} ${ExtendedColonyActionType.UpdateColonyObjectiveMultisig} {Manage objective} ${ExtendedColonyActionType.SplitPayment} {Split payment} + ${ColonyActionType.CreateStreamingPayment} {Streaming payment} other {Generic} }`, }; diff --git a/src/i18n/en.json b/src/i18n/en.json index 3e5a95cccd6..79195c9973e 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -646,6 +646,7 @@ "supporting.documents.title": "extension support", "supporting.documents.subtitle": "Supporting guides and documentation", "hours": "Hours", + "days": "Days", "special.hour.input.error.min.value": "Hours can not be 0", "special.hour.input.error.max.value": "Hours must be less than { maxValue }", "special.percentage.input.error.min.value": "Percentage must be greater than 0", @@ -1172,8 +1173,15 @@ "actionSidebar.teamPurpose": "Team purpose", "actionSidebar.teamName": "Team name", "actionSidebar.teamColour": "Team colour", - "actionSidebar.starts": "Select start", - "actionSidebar.starts.placeholder": "Select date and time", + "actionSidebar.amountPer": "Amount per", + "actionSidebar.amountPer.placeholder": "Select period", + "actionSidebar.amountPer.options.title": "Select amount per period", + "actionSidebar.amountPer.options.hour": "Hour", + "actionSidebar.amountPer.options.day": "Day", + "actionSidebar.amountPer.options.week": "Week", + "actionSidebar.amountPer.options.custom": "Custom", + "actionSidebar.starts": "Starts", + "actionSidebar.starts.placeholder": "Select start", "actionSidebar.starts.warningTooltip": "The start date is in the past. The claimable amount will be calculated from the start date entered.", "actionSidebar.starts.options.title": "Start conditions", "actionSidebar.starts.options.startImidiately": "Start immediately", @@ -1553,6 +1561,7 @@ "actionSidebar.payments": "Payments", "actionSidebar.fundFrom": "Fund from", "actionSidebar.transactions": "Transactions", + "actionSidebar.streamFrom": "Stream from", "table.column.claimDelay": "Claim delay", "table.column.claimDelayField": "{hours} {hours, plural, =1 {Hour} other {Hours}}", "table.column.claimDelayFieldSuffix": "{hours, plural, =1 {Hour} other {Hours}}", @@ -1689,7 +1698,9 @@ "errors.manageMembers.required": "Please select manage option", "errors.value.greaterThanZero": "Value must be greater than zero", "errors.amount.tokenIsLocked": "This token is locked and is not able to be used for payments. Check with the token creator for details.", - "errors.amount.notEnoughTokens": "Not enough funds to cover the payment and network fees", + "errors.amount.notEnoughTokens":"Not enough funds to cover the payment and network fees", + "errors.amount.notEnoughTokensIn": "Not enough tokens in {paymentIndex, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} payment.", + "errors.amount.greaterThan": "Amount must be greater than {amount}", "errors.amount.greaterThanZero": "Amount must be greater than zero", "errors.amount.greaterThanZeroIn": "Amount must be greater than zero in {paymentIndex, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} payment", "errors.amount.smallerThanZero": "Claim delay can't be smaller than zero", @@ -1724,6 +1735,9 @@ "errors.milestone.requiredIn": "Name is required in {paymentIndex, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} milestone", "errors.milestone.characters": "{paymentIndex, selectordinal, one {#st} two {#nd} few {#rd} other {#th}} milestone exceeds limit of 80 characters.", "errors.fundFrom.required": "Fund from field is required", + "errors.amountPer.required": "Amount per field is required", + "errors.amountPer.min": "Custom Amount per must be 1 or more days.", + "errors.amountPer.max": "Amount per payment must be less than {max}", "editColony.socialLinks.custom": "Custom URL", "editColony.socialLinks.discord": "Discord URL", "editColony.socialLinks.github": "Github URL", @@ -1987,5 +2001,7 @@ "form.min": "{fieldName} must be at least {length} characters", "form.max": "{fieldName} must be a maximum of {length} characters", "multiSig.rejectAction": "Reject action", - "multiSig.shareAction": "Share action" + "multiSig.shareAction": "Share action", + "streamingPayment.description.placeholder": "Streaming Payment to a single recipient by {initiator}", + "streamingPayment.description.days": "{days} {days, plural, =1 {day} other {days}}" } diff --git a/src/redux/sagas/expenditures/createStreamingPayment.ts b/src/redux/sagas/expenditures/createStreamingPayment.ts index 8153eec117d..ccf46a85f2b 100644 --- a/src/redux/sagas/expenditures/createStreamingPayment.ts +++ b/src/redux/sagas/expenditures/createStreamingPayment.ts @@ -57,6 +57,7 @@ function* createStreamingPaymentAction({ annotationMessage, }, meta, + meta: { setTxHash }, }: Action) { const apolloClient = getContext(ContextModule.ApolloClient); @@ -250,6 +251,8 @@ function* createStreamingPaymentAction({ payload: {}, meta, }); + + setTxHash?.(txHash); } catch (error) { return yield putError( ActionTypes.STREAMING_PAYMENT_CREATE_ERROR, diff --git a/src/utils/validation/amountGreaterThanValidation.ts b/src/utils/validation/amountGreaterThanValidation.ts new file mode 100644 index 00000000000..313047afe51 --- /dev/null +++ b/src/utils/validation/amountGreaterThanValidation.ts @@ -0,0 +1,42 @@ +import { BigNumber } from 'ethers'; +import moveDecimal from 'move-decimal-point'; +import { type TestContext } from 'yup'; + +import { type ColonyFragment } from '~gql'; +import { + getSelectedToken, + getTokenDecimalsWithFallback, +} from '~utils/tokens.ts'; + +export const amountGreaterThanValidation = ({ + value, + context, + colony, + tokenAddress, + greaterThanValue, +}: { + value: string | null | undefined; + context: TestContext; + colony: ColonyFragment; + tokenAddress?: string; + greaterThanValue: string; +}) => { + if (!value) { + return false; + } + + const { parent } = context; + const { tokenAddress: tokenAddressFieldValue } = parent || {}; + + const selectedToken = getSelectedToken( + colony, + tokenAddress || tokenAddressFieldValue, + ); + + return BigNumber.from( + moveDecimal( + value === '' ? '0' : value, + getTokenDecimalsWithFallback(selectedToken?.decimals), + ), + ).gt(greaterThanValue); +}; From 68ec318b18acfc5d0e6d9714f631cafa55897bf7 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Tue, 17 Sep 2024 12:32:32 +0100 Subject: [PATCH 022/126] Fix: C2F address adjustment in createStreamingPayment saga --- src/redux/sagas/expenditures/createStreamingPayment.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/redux/sagas/expenditures/createStreamingPayment.ts b/src/redux/sagas/expenditures/createStreamingPayment.ts index ccf46a85f2b..db672090ade 100644 --- a/src/redux/sagas/expenditures/createStreamingPayment.ts +++ b/src/redux/sagas/expenditures/createStreamingPayment.ts @@ -30,6 +30,7 @@ import { import { TIMESTAMP_IN_FUTURE, adjustRecipientAddress, + createActionMetadataInDB, getColonyManager, getEndTimeByEndCondition, initiateTransaction, @@ -84,7 +85,7 @@ function* createStreamingPaymentAction({ ); const { network } = colonyManager.networkClient; - const paymentAddress = yield adjustRecipientAddress( + const adjustedRecipientAddress = yield adjustRecipientAddress( { tokenAddress, recipientAddress, @@ -216,6 +217,10 @@ function* createStreamingPaymentAction({ }, } = yield waitForTxResult(createStreamingPayment.channel); + if (customActionTitle) { + yield createActionMetadataInDB(txHash, customActionTitle); + } + if (annotationMessage) { yield uploadAnnotation({ txChannel: annotateCreateStreamingPayment, From 316564df03d081e3db3dce04513fac7e14e19f83 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Tue, 17 Sep 2024 12:33:18 +0100 Subject: [PATCH 023/126] Feat: Set action title when creating streaming payment --- src/redux/sagas/expenditures/createStreamingPayment.ts | 1 + src/redux/types/actions/expenditures.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/redux/sagas/expenditures/createStreamingPayment.ts b/src/redux/sagas/expenditures/createStreamingPayment.ts index db672090ade..da7c473736c 100644 --- a/src/redux/sagas/expenditures/createStreamingPayment.ts +++ b/src/redux/sagas/expenditures/createStreamingPayment.ts @@ -56,6 +56,7 @@ function* createStreamingPaymentAction({ endCondition, limitAmount, annotationMessage, + customActionTitle, }, meta, meta: { setTxHash }, diff --git a/src/redux/types/actions/expenditures.ts b/src/redux/types/actions/expenditures.ts index 4c17c60fb70..2cc780a18d8 100644 --- a/src/redux/types/actions/expenditures.ts +++ b/src/redux/types/actions/expenditures.ts @@ -244,6 +244,7 @@ export type ExpendituresActionTypes = endCondition: StreamingPaymentEndCondition; limitAmount?: string; annotationMessage?: string; + customActionTitle?: string; }, MetaWithSetter > From be4db0ba1d8faa7a5bfc50f0c9a6b93e0f4ea787 Mon Sep 17 00:00:00 2001 From: Joanna Date: Fri, 30 Aug 2024 12:50:57 +0200 Subject: [PATCH 024/126] feat: streaming payment preview base --- .../helpers/getActionTitleValues.ts | 4 + .../helpers/mapItemToMessageFormat.tsx | 43 +-- .../partials/ActionBadge/ActionBadge.tsx | 46 ++- .../ActionDescription/ActionDescription.tsx | 9 +- .../SpecialInput/SpecialInputBase.tsx | 2 +- .../v5/common/ActionSidebar/ActionSidebar.tsx | 28 +- .../hooks/useGetActionFormData.ts | 27 ++ .../hooks/useGetStreamingPaymentData.ts | 125 ++++++++ .../partials/PermissionSidebar.tsx | 1 + .../partials/StreamingPaymentDescription.tsx | 19 +- .../ActionSidebarStatusPill.tsx | 54 ++++ .../partials/ActionSidebarStatusPill/types.ts | 12 + .../AmountPerPeriodRow/AmountPerPeriodRow.tsx | 3 +- .../partials/AmountPerPeriodRow/consts.ts | 3 - .../AmountPerPeriodRowField.tsx | 5 +- .../StreamingPaymentStatusPill.tsx | 30 ++ .../StreamingPaymentStatusPill/types.ts | 5 + .../StreamingPaymentStatusPill/utils.ts | 19 ++ .../StreamingPaymentForm.tsx | 19 +- .../forms/StreamingPaymentForm/hooks.ts | 13 +- .../forms/StreamingPaymentForm/utils.ts | 21 +- .../CompletedAction/CompletedAction.tsx | 17 + .../ActionWithPermissionsInfo.tsx | 55 +--- .../StreamingPayment/StreamingPayment.tsx | 299 ++++++++++++++++++ .../AvailableToClaimCounter.tsx | 104 ++++++ .../partials/AvailableToClaimCounter/types.ts | 11 + .../CreatedWithPermissionsInfo.tsx | 87 +++++ .../CreatedWithPermissionsInfo/types.ts | 4 + .../StreamingPaymentWidget.tsx | 274 ++++++++++++++++ .../partials/StreamingPaymentWidget/hooks.ts | 29 ++ .../partials/StreamingPaymentWidget/types.ts | 10 + .../partials/StreamingPayment/types.ts | 10 + .../partials/rows/TeamFrom.tsx | 6 + .../v5/shared/UserInfoPopover/types.ts | 1 + .../v5/tmpDebug/TmpStreamingPayments.tsx | 8 +- src/constants/time.ts | 2 + .../fragments/streamingPayment.graphql | 3 + src/graphql/generated.ts | 7 +- src/i18n/en.json | 11 +- src/types/streamingPayments.ts | 7 + src/utils/date.ts | 53 ++++ src/utils/streamingPayments.ts | 186 +++++++++++ 42 files changed, 1509 insertions(+), 163 deletions(-) create mode 100644 src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts create mode 100644 src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx create mode 100644 src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/types.ts create mode 100644 src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx create mode 100644 src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/types.ts create mode 100644 src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/utils.ts create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/CreatedWithPermissionsInfo.tsx create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/types.ts create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/hooks.ts create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/types.ts create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/types.ts create mode 100644 src/constants/time.ts create mode 100644 src/types/streamingPayments.ts create mode 100644 src/utils/date.ts diff --git a/src/components/common/ColonyActions/helpers/getActionTitleValues.ts b/src/components/common/ColonyActions/helpers/getActionTitleValues.ts index 52ebf2ebb50..8f4b3d890df 100644 --- a/src/components/common/ColonyActions/helpers/getActionTitleValues.ts +++ b/src/components/common/ColonyActions/helpers/getActionTitleValues.ts @@ -7,6 +7,7 @@ import { ColonyActionType, type Colony, type Expenditure, + type StreamingPayment, } from '~types/graphql.ts'; import { getExtendedActionType, @@ -197,12 +198,14 @@ const useGetActionTitleValues = ({ keyFallbackValues, expenditureData, networkInverseFee, + streamingPaymentData, }: { actionData: ColonyAction | null | undefined; colony: Pick | undefined; keyFallbackValues?: Partial>; expenditureData?: Expenditure; networkInverseFee?: string; + streamingPaymentData?: StreamingPayment; }) => { const { isMotion, pendingColonyMetadata } = actionData || {}; @@ -212,6 +215,7 @@ const useGetActionTitleValues = ({ keyFallbackValues, expenditureData, networkInverseFee, + streamingPaymentData, }); if (!actionData || !colony) { diff --git a/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx b/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx index 601f05e9f78..173d0441d67 100644 --- a/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx +++ b/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx @@ -21,6 +21,7 @@ import { type Expenditure, type ExpenditureStage, type ExpenditureSlot, + type StreamingPayment, } from '~types/graphql.ts'; import { getFormatValuesArbitraryTransactions } from '~utils/arbitraryTxs.ts'; import { notMaybe, notNull } from '~utils/arrays/index.ts'; @@ -30,6 +31,7 @@ import { getAmountLessFee } from '~utils/getAmountLessFee.ts'; import { formatText, intl } from '~utils/intl.ts'; import { formatReputationChange } from '~utils/reputation.ts'; import { getAddedSafeChainName } from '~utils/safes/index.ts'; +import { getAmountPerValue } from '~utils/streamingPayments.ts'; import { getSelectedToken, getTokenDecimalsWithFallback, @@ -214,11 +216,13 @@ export const useMapColonyActionToExpectedFormat = ({ keyFallbackValues = {}, expenditureData, networkInverseFee, + streamingPaymentData, }: { actionData: ColonyAction | null | undefined; colony: Pick | undefined; keyFallbackValues?: Partial>; expenditureData?: Expenditure; + streamingPaymentData?: StreamingPayment; networkInverseFee?: string; }) => { const getFormattedValueWithFallback = ( @@ -305,13 +309,17 @@ export const useMapColonyActionToExpectedFormat = ({ , ActionTitleMessageKeys.Amount, - notMaybe(actionData?.amount), + notMaybe( + streamingPaymentData ? streamingPaymentData.amount : actionData?.amount, + ), ), [ActionTitleMessageKeys.Direction]: formattedRolesTitle, [ActionTitleMessageKeys.FromDomain]: getFormattedValueWithFallback( @@ -334,23 +342,14 @@ export const useMapColonyActionToExpectedFormat = ({ ActionTitleMessageKeys.ToDomain, notMaybe(actionData.toDomain?.metadata?.name), ), - [ActionTitleMessageKeys.TokenSymbol]: getFormattedValueWithFallback( - expenditureData - ? getSelectedToken( - colony, - expenditureData?.slots?.[0]?.payouts?.[0]?.tokenAddress || '', - )?.symbol - : actionData.token?.symbol, - ActionTitleMessageKeys.TokenSymbol, - notMaybe( - expenditureData - ? getSelectedToken( - colony, - expenditureData?.slots?.[0]?.payouts?.[0]?.tokenAddress || '', - )?.symbol - : actionData.token?.symbol, - ), - ), + [ActionTitleMessageKeys.TokenSymbol]: + getSelectedToken( + colony, + expenditureData?.slots?.[0]?.payouts?.[0]?.tokenAddress ?? '', + )?.symbol ?? + getSelectedToken(colony, streamingPaymentData?.tokenAddress ?? '') + ?.symbol ?? + actionData.token?.symbol, [ActionTitleMessageKeys.ReputationChangeNumeral]: getFormattedValueWithFallback( actionData.amount && ( @@ -448,6 +447,8 @@ export const useMapColonyActionToExpectedFormat = ({ ), ).size, // @todo: update this to use the actual period value - [ActionTitleMessageKeys.Period]: 'Day', + [ActionTitleMessageKeys.Period]: streamingPaymentData + ? getAmountPerValue(streamingPaymentData.interval).toLowerCase() + : undefined, }; }; diff --git a/src/components/common/ColonyActionsTable/partials/ActionBadge/ActionBadge.tsx b/src/components/common/ColonyActionsTable/partials/ActionBadge/ActionBadge.tsx index 2a9c3d43850..dc7811af85b 100644 --- a/src/components/common/ColonyActionsTable/partials/ActionBadge/ActionBadge.tsx +++ b/src/components/common/ColonyActionsTable/partials/ActionBadge/ActionBadge.tsx @@ -1,9 +1,11 @@ -import clsx from 'clsx'; import React, { type FC } from 'react'; +import LoadingSkeleton from '~common/LoadingSkeleton/LoadingSkeleton.tsx'; import { MotionState } from '~utils/colonyMotions.ts'; import { useGetExpenditureData } from '~v5/common/ActionSidebar/hooks/useGetExpenditureData.ts'; +import { useGetStreamingPaymentData } from '~v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts'; import ExpenditureActionStatusBadge from '~v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx'; +import StreamingPaymentStatusPill from '~v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx'; import MotionStateBadge from '~v5/common/Pills/MotionStateBadge/MotionStateBadge.tsx'; import { type ActionBadgeProps } from './types.ts'; @@ -17,22 +19,34 @@ const ActionBadge: FC = ({ const { expenditure, loadingExpenditure } = useGetExpenditureData(expenditureId); - const isLoading = loading || loadingExpenditure; + const { streamingPaymentData, paymentStatus, loadingStreamingPayment } = + useGetStreamingPaymentData(expenditureId); - return expenditure ? ( - - ) : ( - + const isLoading = loading || loadingExpenditure || loadingStreamingPayment; + + return ( + + {streamingPaymentData ? ( + + ) : ( + <> + {expenditure ? ( + + ) : ( + + )} + + )} + ); }; diff --git a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx index 6a9eb75d5c5..c982e1a2614 100644 --- a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx +++ b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx @@ -10,6 +10,7 @@ import useShouldDisplayMotionCountdownTime from '~hooks/useShouldDisplayMotionCo import useUserByAddress from '~hooks/useUserByAddress.ts'; import { formatText } from '~utils/intl.ts'; import { useGetExpenditureData } from '~v5/common/ActionSidebar/hooks/useGetExpenditureData.ts'; +import { useGetStreamingPaymentData } from '~v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts'; import MotionCountDownTimer from '~v5/common/ActionSidebar/partials/Motions/partials/MotionCountDownTimer/index.ts'; import { UserAvatar } from '~v5/shared/UserAvatar/UserAvatar.tsx'; import UserInfoPopover from '~v5/shared/UserInfoPopover/UserInfoPopover.tsx'; @@ -44,7 +45,11 @@ const ActionDescription: FC = ({ const { expenditure, loadingExpenditure } = useGetExpenditureData(expenditureId); - const isLoading = loading || loadingExpenditure || loadingUser; + const { streamingPaymentData, loadingStreamingPayment } = + useGetStreamingPaymentData(expenditureId); + + const isLoading = + loading || loadingExpenditure || loadingStreamingPayment || loadingUser; const walletAddress = user?.walletAddress || initiatorAddress || ADDRESS_ZERO; const refetchMotionState = () => { @@ -62,7 +67,6 @@ const ActionDescription: FC = ({ const { networkInverseFee } = useNetworkInverseFee(); - // @todo: add streaming payment data const actionMetadataDescription = formatText( { id: 'action.title' }, useGetActionTitleValues({ @@ -74,6 +78,7 @@ const ActionDescription: FC = ({ colony, expenditureData: expenditure ?? undefined, networkInverseFee, + streamingPaymentData: streamingPaymentData ?? undefined, }), ); diff --git a/src/components/common/Extensions/SpecialInput/SpecialInputBase.tsx b/src/components/common/Extensions/SpecialInput/SpecialInputBase.tsx index afd7818a42a..e8744c5c3f9 100644 --- a/src/components/common/Extensions/SpecialInput/SpecialInputBase.tsx +++ b/src/components/common/Extensions/SpecialInput/SpecialInputBase.tsx @@ -38,7 +38,7 @@ const SpecialInputBase: FC = ({ defaultValue={defaultValue} type="number" className={clsx( - 'z-base -mr-px w-[3.75rem] shrink-0 rounded-l rounded-r-none border bg-base-white px-3.5 py-3 transition-colors duration-normal focus:outline-none group-focus-within:border-blue-200 group-hover:border-blue-200', + 'z-base -mr-px w-[3.75rem] shrink-0 flex-grow rounded-l rounded-r-none border bg-base-white px-3.5 py-3 transition-colors duration-normal focus:outline-none group-focus-within:border-blue-200 group-hover:border-blue-200', { 'border-gray-300': !isError, '!border-negative-400': isError, diff --git a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx index 1ad718640c8..cf8926683bd 100644 --- a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx +++ b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx @@ -28,6 +28,7 @@ import { formatText } from '~utils/intl.ts'; import Modal from '~v5/shared/Modal/index.ts'; import CompletedAction from '../CompletedAction/index.ts'; +import FourOFourMessage from '../FourOFourMessage/index.ts'; import PillsBase from '../Pills/PillsBase.tsx'; import { ACTION_TYPE_FIELD_NAME, actionSidebarAnimation } from './consts.ts'; @@ -36,6 +37,7 @@ import useGetGroupedActionComponent from './hooks/useGetGroupedActionComponent.t import { ActionNotFound } from './partials/ActionNotFound.tsx'; import ActionSidebarContent from './partials/ActionSidebarContent/ActionSidebarContent.tsx'; import ActionSidebarLoadingSkeleton from './partials/ActionSidebarLoadingSkeleton/ActionSidebarLoadingSkeleton.tsx'; +import ActionSidebarStatusPill from './partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx'; import ExpenditureActionStatusBadge from './partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx'; import { GoBackButton } from './partials/GoBackButton/GoBackButton.tsx'; import MotionOutcomeBadge from './partials/MotionOutcomeBadge/index.ts'; @@ -118,7 +120,9 @@ const ActionSidebar: FC> = ({ const getSidebarContent = () => { if (action) { - return ; + return ( + + ); } if (actionNotFound) { @@ -246,22 +250,14 @@ const ActionSidebar: FC> = ({ {getShareButton()} - {action && - !isMotion && - !isMultiSig && - !expenditure && - !loadingExpenditure && ( - - {formatText({ id: 'action.passed' })} - - )} - {!!expenditure && ( - )} {(!!( diff --git a/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts b/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts index 50ff00a446c..3ab30ef325c 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts @@ -35,11 +35,20 @@ import { ModificationOption } from '../partials/forms/ManageReputationForm/const import { calculatePercentageValue } from '../partials/forms/SplitPaymentForm/partials/SplitPaymentRecipientsField/utils.ts'; import useGetColonyAction from './useGetColonyAction.ts'; +import { useGetStreamingPaymentData } from './useGetStreamingPaymentData.ts'; const useGetActionFormData = (transactionId: string | undefined) => { const { action, expenditure } = useGetColonyAction(transactionId); const allTokens = useGetAllTokens(); + const { + streamingPaymentData, + loadingStreamingPayment, + paymentStatus, + amounts, + refetchStreamingPayment, + updateAmountsAndStatus, + } = useGetStreamingPaymentData(action?.expenditureId); const defaultValues = useMemo(() => { if (!action) { @@ -396,6 +405,24 @@ const useGetActionFormData = (transactionId: string | undefined) => { return { defaultValues, + isInvalidTransactionHash, + loadingAction, + isMotion: !!action?.isMotion, + isMultiSig: !!action?.isMultiSig, + networkMotionState, + motionState, + expenditure, + loadingExpenditure, + streamingPayment: { + streamingPaymentData, + loadingStreamingPayment, + paymentStatus, + amounts, + refetchStreamingPayment, + updateAmountsAndStatus, + }, + startPollingForAction, + stopPollingForAction, }; }; diff --git a/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts new file mode 100644 index 00000000000..848835c8688 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts @@ -0,0 +1,125 @@ +import { useCallback, useEffect, useState } from 'react'; + +import { FAILED_LOADING_DURATION as POLLING_TIMEOUT } from '~frame/LoadingTemplate/index.ts'; +import { useGetStreamingPaymentQuery } from '~gql'; +import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; +import { type StreamingPayment } from '~types/graphql.ts'; +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; +import noop from '~utils/noop.ts'; +import { getSafePollingInterval } from '~utils/queries.ts'; +import { + getStatus, + getStreamingPaymentAmountsLeft, +} from '~utils/streamingPayments.ts'; + +export const useGetStreamingPaymentData = ( + streamingPaymentId: string | null | undefined, +) => { + const pollInterval = getSafePollingInterval(); + + const { data, refetch, loading, startPolling, stopPolling } = + useGetStreamingPaymentQuery({ + variables: { + streamingPaymentId: streamingPaymentId || '', + }, + skip: Number.isNaN(streamingPaymentId), + fetchPolicy: 'cache-and-network', + pollInterval, + }); + + const streamingPayment = data?.getStreamingPayment; + const [isPolling, setIsPolling] = useState( + streamingPaymentId && !streamingPayment, + ); + const [amounts, setAmounts] = useState<{ + amountAvailableToClaim: string; + amountClaimedToDate: string; + }>({ + amountAvailableToClaim: '0', + amountClaimedToDate: '0', + }); + const [paymentStatus, setPaymentStatus] = useState( + StreamingPaymentStatus.NotStarted, + ); + const { currentBlockTime: blockTime, fetchCurrentBlockTime } = + useCurrentBlockTime(); + + useEffect(() => { + const shouldPoll = streamingPaymentId && !streamingPayment; + + setIsPolling(shouldPoll); + + if (!shouldPoll) { + return noop; + } + + const cancelPollingTimer = setTimeout(stopPolling, POLLING_TIMEOUT); + + startPolling(pollInterval); + + return () => { + if (cancelPollingTimer) { + clearTimeout(cancelPollingTimer); + } + + stopPolling(); + }; + }, [ + streamingPayment, + streamingPaymentId, + stopPolling, + startPolling, + pollInterval, + ]); + + const updateAmountsAndStatus = useCallback( + ( + payment: StreamingPayment, + currentTimestamp: number, + isMotion?: boolean, + ) => { + const { amountAvailableToClaim, amountClaimedToDate } = + getStreamingPaymentAmountsLeft(payment, currentTimestamp); + + const status = getStatus({ + streamingPayment, + currentTimestamp, + isMotion, + amountAvailableToClaim: amounts.amountAvailableToClaim, + }); + + setPaymentStatus(status); + setAmounts({ amountAvailableToClaim, amountClaimedToDate }); + }, + [amounts.amountAvailableToClaim, streamingPayment], + ); + + useEffect(() => { + if (!loading) { + fetchCurrentBlockTime(); + } + }, [fetchCurrentBlockTime, loading]); + + useEffect(() => { + if (streamingPayment) { + const currentTimestamp = Math.floor(blockTime ?? Date.now() / 1000); + + updateAmountsAndStatus(streamingPayment, currentTimestamp); + } + }, [blockTime, streamingPayment, updateAmountsAndStatus]); + + return { + streamingPaymentData: streamingPayment, + loadingStreamingPayment: loading || !!isPolling, + refetchStreamingPayment: refetch, + startPolling, + stopPolling, + updateAmountsAndStatus, + paymentStatus, + amounts, + }; +}; + +export type UseGetStreamingPaymentDataReturnType = ReturnType< + typeof useGetStreamingPaymentData +>; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/partials/PermissionSidebar.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/partials/PermissionSidebar.tsx index 191cc11a7a4..e0fec485e53 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/partials/PermissionSidebar.tsx +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarContent/partials/PermissionSidebar.tsx @@ -1,6 +1,7 @@ import React, { type FC } from 'react'; import PermissionRow from '~frame/v5/pages/VerifiedPage/partials/PermissionRow/index.ts'; +import { formatDate } from '~utils/date.ts'; import { formatText } from '~utils/intl.ts'; import MenuWithStatusText from '~v5/shared/MenuWithStatusText/index.ts'; import RelativeDate from '~v5/shared/RelativeDate/index.ts'; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/partials/StreamingPaymentDescription.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/partials/StreamingPaymentDescription.tsx index ec2e87fb614..84b11139b23 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/partials/StreamingPaymentDescription.tsx +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarDescription/partials/StreamingPaymentDescription.tsx @@ -6,14 +6,10 @@ import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; import Numeral from '~shared/Numeral/Numeral.tsx'; import { ColonyActionType } from '~types/graphql.ts'; import { formatText } from '~utils/intl.ts'; +import { getAmountPerValue } from '~utils/streamingPayments.ts'; import { getSelectedToken } from '~utils/tokens.ts'; - -import { - ONE_DAY_IN_SECONDS, - OPTIONS, -} from '../../AmountPerPeriodRow/consts.ts'; -import { type StreamingPaymentFormValues } from '../../forms/StreamingPaymentForm/hooks.ts'; -import { getInterval } from '../../forms/StreamingPaymentForm/utils.ts'; +import { type StreamingPaymentFormValues } from '~v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts'; +import { getInterval } from '~v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/utils.ts'; import CurrentUser from './CurrentUser.tsx'; import RecipientUser from './RecipientUser.tsx'; @@ -62,14 +58,7 @@ export const StreamingPaymentDescription = () => { amount: , period: period && interval - ? OPTIONS[0].options.find(({ value }) => value === period.interval) - ?.label || - formatText( - { id: 'streamingPayment.description.days' }, - { - days: interval / ONE_DAY_IN_SECONDS, - }, - ) + ? getAmountPerValue(interval.toString()).toLowerCase() : formatText({ id: 'actionSidebar.amountPer.options.week', }).toLowerCase(), diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx new file mode 100644 index 00000000000..aebe43b3a1b --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx @@ -0,0 +1,54 @@ +import React, { type FC } from 'react'; + +import { ColonyActionType } from '~gql'; +import { formatText } from '~utils/intl.ts'; +import PillsBase from '~v5/common/Pills/PillsBase.tsx'; + +import ExpenditureActionStatusBadge from '../ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx'; +import MotionOutcomeBadge from '../MotionOutcomeBadge/MotionOutcomeBadge.tsx'; +import StreamingPaymentStatusPill from '../StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx'; + +import { type ActionSidebarStatusPillProps } from './types.ts'; + +const ActionSidebarStatusPill: FC = ({ + action, + isMotion, + motionState, + expenditure, + streamingPaymentStatus, + isMultiSig, +}) => { + if (expenditure && action?.type === ColonyActionType.CreateExpenditure) { + return ( + + ); + } + + if ( + streamingPaymentStatus && + action?.type === ColonyActionType.CreateStreamingPayment + ) { + return ; + } + + if (isMotion || isMultiSig) { + if (!motionState) { + return null; + } + return ; + } + + return action ? ( + + {formatText({ id: 'action.passed' })} + + ) : null; +}; + +export default ActionSidebarStatusPill; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/types.ts b/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/types.ts new file mode 100644 index 00000000000..5a4f4db9d6c --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/types.ts @@ -0,0 +1,12 @@ +import { type ColonyAction, type Expenditure } from '~types/graphql.ts'; +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; +import { type MotionState } from '~utils/colonyMotions.ts'; + +export interface ActionSidebarStatusPillProps { + action: ColonyAction | null | undefined; + motionState: MotionState | undefined; + expenditure: Expenditure | null | undefined; + streamingPaymentStatus: StreamingPaymentStatus | undefined; + isMotion: boolean; + isMultiSig: boolean; +} diff --git a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/AmountPerPeriodRow.tsx b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/AmountPerPeriodRow.tsx index d3b6f359713..68a458f2bba 100644 --- a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/AmountPerPeriodRow.tsx +++ b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/AmountPerPeriodRow.tsx @@ -3,8 +3,7 @@ import React from 'react'; import { formatText } from '~utils/intl.ts'; import ActionFormRow from '~v5/common/ActionFormRow/index.ts'; - -import useHasNoDecisionMethods from '../../hooks/permissions/useHasNoDecisionMethods.ts'; +import useHasNoDecisionMethods from '~v5/common/ActionSidebar/hooks/permissions/useHasNoDecisionMethods.ts'; import { OPTIONS } from './consts.ts'; import AmountPerPeriodRowField from './partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx'; diff --git a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/consts.ts b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/consts.ts index 53d3a567d7c..e4a9c6be085 100644 --- a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/consts.ts +++ b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/consts.ts @@ -3,9 +3,6 @@ import { type CardSelectOptionsGroup } from '~v5/common/Fields/CardSelect/types. import { AmountPerInterval } from './types.ts'; -export const ONE_HOUR_IN_SECONDS = 3600; -export const ONE_DAY_IN_SECONDS = ONE_HOUR_IN_SECONDS * 24; - export const OPTIONS: CardSelectOptionsGroup[] = [ { key: '1', diff --git a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx index 08141805982..28e4b2d392c 100644 --- a/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx +++ b/src/components/v5/common/ActionSidebar/partials/AmountPerPeriodRow/partials/AmountPerPeriodRowField/AmountPerPeriodRowField.tsx @@ -3,13 +3,12 @@ import React, { useState, type FC } from 'react'; import { useController } from 'react-hook-form'; import SpecialInputBase from '~common/Extensions/SpecialInput/SpecialInputBase.tsx'; +import { ONE_DAY_IN_SECONDS } from '~constants/time.ts'; import { useMobile } from '~hooks'; +import { AmountPerInterval } from '~v5/common/ActionSidebar/partials/AmountPerPeriodRow/types.ts'; import CardSelect from '~v5/common/Fields/CardSelect/CardSelect.tsx'; import { FieldState } from '~v5/common/Fields/consts.ts'; -import { ONE_DAY_IN_SECONDS } from '../../consts.ts'; -import { AmountPerInterval } from '../../types.ts'; - import { type AmountPerPeriodRowFieldProps } from './types.ts'; const displayName = diff --git a/src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx b/src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx new file mode 100644 index 00000000000..9bd5aac332d --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx @@ -0,0 +1,30 @@ +import clsx from 'clsx'; +import React, { type FC } from 'react'; + +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; +import PillsBase from '~v5/common/Pills/PillsBase.tsx'; + +import { type StreamingPaymentStatusPillProps } from './types.ts'; +import { getStatusLabel } from './utils.ts'; + +const StreamingPaymentStatusPill: FC = ({ + status, +}) => ( + + {getStatusLabel(status)} + +); + +export default StreamingPaymentStatusPill; diff --git a/src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/types.ts b/src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/types.ts new file mode 100644 index 00000000000..375c10a8e62 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/types.ts @@ -0,0 +1,5 @@ +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; + +export interface StreamingPaymentStatusPillProps { + status: StreamingPaymentStatus; +} diff --git a/src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/utils.ts b/src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/utils.ts new file mode 100644 index 00000000000..65140a3bcb5 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/utils.ts @@ -0,0 +1,19 @@ +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; +import { formatText } from '~utils/intl.ts'; + +export const getStatusLabel = (paymentStatus: StreamingPaymentStatus) => { + switch (paymentStatus) { + case StreamingPaymentStatus.Active: + return formatText({ id: 'streamingPayment.status.active' }); + case StreamingPaymentStatus.NotStarted: + return formatText({ id: 'streamingPayment.status.notStarted' }); + case StreamingPaymentStatus.Ended: + return formatText({ id: 'streamingPayment.status.ended' }); + case StreamingPaymentStatus.Cancelled: + return formatText({ id: 'streamingPayment.status.cancelled' }); + case StreamingPaymentStatus.LimitReached: + return formatText({ id: 'streamingPayment.status.limitReached' }); + default: + return ''; + } +}; diff --git a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx index 65171ddf474..28cb910a25c 100644 --- a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx +++ b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx @@ -8,18 +8,17 @@ import { formatText } from '~utils/intl.ts'; import ActionFormRow from '~v5/common/ActionFormRow/ActionFormRow.tsx'; import useHasNoDecisionMethods from '~v5/common/ActionSidebar/hooks/permissions/useHasNoDecisionMethods.ts'; import useFilterCreatedInField from '~v5/common/ActionSidebar/hooks/useFilterCreatedInField.ts'; +import AmountField from '~v5/common/ActionSidebar/partials/AmountField/AmountField.tsx'; +import AmountPerPeriodRow from '~v5/common/ActionSidebar/partials/AmountPerPeriodRow/AmountPerPeriodRow.tsx'; +import AmountRow from '~v5/common/ActionSidebar/partials/AmountRow/AmountRow.tsx'; +import CreatedIn from '~v5/common/ActionSidebar/partials/CreatedIn/CreatedIn.tsx'; +import DecisionMethodField from '~v5/common/ActionSidebar/partials/DecisionMethodField/DecisionMethodField.tsx'; +import Description from '~v5/common/ActionSidebar/partials/Description/Description.tsx'; +import TeamsSelect from '~v5/common/ActionSidebar/partials/TeamsSelect/TeamsSelect.tsx'; +import TimeRow from '~v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx'; +import UserSelect from '~v5/common/ActionSidebar/partials/UserSelect/UserSelect.tsx'; import { type ActionFormBaseProps } from '~v5/common/ActionSidebar/types.ts'; -import AmountField from '../../AmountField/AmountField.tsx'; -import AmountPerPeriodRow from '../../AmountPerPeriodRow/AmountPerPeriodRow.tsx'; -import AmountRow from '../../AmountRow/AmountRow.tsx'; -import CreatedIn from '../../CreatedIn/CreatedIn.tsx'; -import DecisionMethodField from '../../DecisionMethodField/DecisionMethodField.tsx'; -import Description from '../../Description/Description.tsx'; -import TeamsSelect from '../../TeamsSelect/TeamsSelect.tsx'; -import TimeRow from '../../TimeRow/TimeRow.tsx'; -import UserSelect from '../../UserSelect/UserSelect.tsx'; - import { useStreamingPayment } from './hooks.ts'; const StreamingPaymentForm: FC = ({ getFormOptions }) => { diff --git a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts index fb2d00418c0..7d07f67006b 100644 --- a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts +++ b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts @@ -5,8 +5,10 @@ import { useFormContext, useWatch } from 'react-hook-form'; import { type DeepPartial } from 'utility-types'; import { type InferType, number, object, string, date, lazy, mixed } from 'yup'; +import { ONE_DAY_IN_SECONDS } from '~constants/time.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; import { StreamingPaymentEndCondition } from '~gql'; +import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; import useNetworkInverseFee from '~hooks/useNetworkInverseFee.ts'; import { ActionTypes } from '~redux/index.ts'; import { mapPayload, pipe } from '~utils/actions.ts'; @@ -16,11 +18,9 @@ import { amountGreaterThanValidation } from '~utils/validation/amountGreaterThan import { amountGreaterThanZeroValidation } from '~utils/validation/amountGreaterThanZeroValidation.ts'; import { hasEnoughFundsValidation } from '~utils/validation/hasEnoughFundsValidation.ts'; import { ACTION_BASE_VALIDATION_SCHEMA } from '~v5/common/ActionSidebar/consts.ts'; - -import useActionFormBaseHook from '../../../hooks/useActionFormBaseHook.ts'; -import { type ActionFormBaseProps } from '../../../types.ts'; -import { ONE_DAY_IN_SECONDS } from '../../AmountPerPeriodRow/consts.ts'; -import { AmountPerInterval } from '../../AmountPerPeriodRow/types.ts'; +import useActionFormBaseHook from '~v5/common/ActionSidebar/hooks/useActionFormBaseHook.ts'; +import { AmountPerInterval } from '~v5/common/ActionSidebar/partials/AmountPerPeriodRow/types.ts'; +import { type ActionFormBaseProps } from '~v5/common/ActionSidebar/types.ts'; import { getStreamingPaymentPayload } from './utils.ts'; @@ -150,6 +150,7 @@ export const useStreamingPayment = ( const limitTokenAddress = useWatch({ name: 'limitTokenAddress' }); const endCondition = useWatch({ name: 'ends' }); const { setValue, resetField, trigger } = useFormContext(); + const { currentBlockTime: blockTime } = useCurrentBlockTime(); useEffect(() => { if ( @@ -189,7 +190,7 @@ export const useStreamingPayment = ( transform: useCallback( pipe( mapPayload((values: StreamingPaymentFormValues) => { - return getStreamingPaymentPayload(colony, values); + return getStreamingPaymentPayload(colony, values, blockTime); }), ), [colony, networkInverseFee], diff --git a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/utils.ts b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/utils.ts index 98ee0108324..62d58cb6470 100644 --- a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/utils.ts +++ b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/utils.ts @@ -1,6 +1,7 @@ import isDate from 'date-fns/isDate'; import { BigNumber } from 'ethers'; +import { ONE_DAY_IN_SECONDS, ONE_HOUR_IN_SECONDS } from '~constants/time.ts'; import { StreamingPaymentEndCondition } from '~gql'; import { type CreateStreamingPaymentPayload } from '~redux/sagas/expenditures/createStreamingPayment.ts'; import { DecisionMethod } from '~types/actions.ts'; @@ -10,13 +11,8 @@ import { getSelectedToken, getTokenDecimalsWithFallback, } from '~utils/tokens.ts'; - -import { - ONE_DAY_IN_SECONDS, - ONE_HOUR_IN_SECONDS, -} from '../../AmountPerPeriodRow/consts.ts'; -import { AmountPerInterval } from '../../AmountPerPeriodRow/types.ts'; -import { START_IMMEDIATELY_VALUE } from '../../TimeRow/consts.ts'; +import { AmountPerInterval } from '~v5/common/ActionSidebar/partials/AmountPerPeriodRow/types.ts'; +import { START_IMMEDIATELY_VALUE } from '~v5/common/ActionSidebar/partials/TimeRow/consts.ts'; import { type StreamingPaymentFormValues } from './hooks.ts'; @@ -38,6 +34,7 @@ export const getInterval = (period: StreamingPaymentFormValues['period']) => { export const getStreamingPaymentPayload = ( colony: Colony, values: StreamingPaymentFormValues, + blockTime: number | null, ): CreateStreamingPaymentPayload | null => { const { amount, @@ -80,12 +77,16 @@ export const getStreamingPaymentPayload = ( recipientAddress: recipient ?? '', startTimestamp: starts === START_IMMEDIATELY_VALUE - ? '0' - : BigNumber.from(new Date(starts).getTime()).toString(), + ? BigNumber.from( + Math.floor(blockTime ?? new Date().getTime() / 1000), + ).toString() + : BigNumber.from( + Math.floor(new Date(starts).getTime() / 1000), + ).toString(), tokenAddress, tokenDecimals: decimals, endTimestamp: isDate(ends) - ? BigNumber.from(new Date(ends).getTime()).toString() + ? BigNumber.from(Math.floor(new Date(ends).getTime() / 1000)).toString() : undefined, limitAmount: ends === StreamingPaymentEndCondition.LimitReached ? limit : undefined, diff --git a/src/components/v5/common/CompletedAction/CompletedAction.tsx b/src/components/v5/common/CompletedAction/CompletedAction.tsx index 586c7f22964..a959b466af8 100644 --- a/src/components/v5/common/CompletedAction/CompletedAction.tsx +++ b/src/components/v5/common/CompletedAction/CompletedAction.tsx @@ -6,6 +6,7 @@ import { ColonyActionType } from '~gql'; import { ExtendedColonyActionType } from '~types/actions.ts'; import { getExtendedActionType } from '~utils/colonyActions.ts'; +import { type UseGetStreamingPaymentDataReturnType } from '../ActionSidebar/hooks/useGetStreamingPaymentData.ts'; import PermissionSidebar from '../ActionSidebar/partials/ActionSidebarContent/partials/PermissionSidebar.tsx'; import Motions from '../ActionSidebar/partials/Motions/index.ts'; import MultiSigSidebar from '../ActionSidebar/partials/MultiSigSidebar/MultiSigSidebar.tsx'; @@ -24,6 +25,8 @@ import RemoveVerifiedMembers from './partials/RemoveVerifiedMembers/index.ts'; import SetUserRoles from './partials/SetUserRoles/index.ts'; import SimplePayment from './partials/SimplePayment/index.ts'; import SplitPayment from './partials/SplitPayment/SplitPayment.tsx'; +import StreamingPaymentWidget from './partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx'; +import StreamingPayment from './partials/StreamingPayment/StreamingPayment.tsx'; import TransferFunds from './partials/TransferFunds/index.ts'; import UnlockToken from './partials/UnlockToken/index.ts'; import UpgradeColonyObjective from './partials/UpgradeColonyObjective/index.ts'; @@ -116,6 +119,13 @@ const CompletedAction = ({ action }: ICompletedAction) => { return ; case ExtendedColonyActionType.SplitPayment: return ; + case ColonyActionType.CreateStreamingPayment: + return ( + + ); default: console.warn('Unsupported action display', action); return
Not implemented yet
; @@ -165,6 +175,13 @@ const CompletedAction = ({ action }: ICompletedAction) => { case ExtendedColonyActionType.StagedPayment: case ExtendedColonyActionType.SplitPayment: return ; + case ColonyActionType.CreateStreamingPayment: + return ( + + ); default: return ; } diff --git a/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/ActionWithPermissionsInfo/ActionWithPermissionsInfo.tsx b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/ActionWithPermissionsInfo/ActionWithPermissionsInfo.tsx index c9bc01e24e8..6b91580a058 100644 --- a/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/ActionWithPermissionsInfo/ActionWithPermissionsInfo.tsx +++ b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/ActionWithPermissionsInfo/ActionWithPermissionsInfo.tsx @@ -1,9 +1,7 @@ -import { isToday, isYesterday } from 'date-fns'; import React, { type FC } from 'react'; -import { FormattedDate, defineMessages } from 'react-intl'; import PermissionRow from '~frame/v5/pages/VerifiedPage/partials/PermissionRow/index.ts'; -import { getFormattedDateFrom } from '~utils/getFormattedDateFrom.ts'; +import { formatDate } from '~utils/date.ts'; import { formatText } from '~utils/intl.ts'; import MenuWithStatusText from '~v5/shared/MenuWithStatusText/index.ts'; import { StatusTypes } from '~v5/shared/StatusText/consts.ts'; @@ -13,55 +11,7 @@ import UserPopover from '~v5/shared/UserPopover/UserPopover.tsx'; import { type ActionWithPermissionsInfoProps } from './types.ts'; const displayName = - 'v5.common.CompletedAction.partials.ActionWithPermissionsInfoProps'; - -const MSG = defineMessages({ - todayAt: { - id: `${displayName}.todayAt`, - defaultMessage: 'Today at', - }, - yestardayAt: { - id: `${displayName}.yestardayAt`, - defaultMessage: 'Yesterday at', - }, - at: { - id: `${displayName}.at`, - defaultMessage: 'at', - }, -}); - -const formatDate = (value: string | undefined) => { - if (!value) { - return undefined; - } - - const date = new Date(value); - - if (isToday(date)) { - return ( - <> - {formatText(MSG.todayAt)}{' '} - - - ); - } - - if (isYesterday(date)) { - return ( - <> - {formatText(MSG.yestardayAt)}{' '} - - - ); - } - - return ( - <> - {getFormattedDateFrom(value)} {formatText(MSG.at)}{' '} - - - ); -}; + 'v5.common.CompletedAction.partials.ActionWithPermissionsInfo'; const ActionWithPermissionsInfo: FC = ({ action, @@ -142,4 +92,5 @@ const ActionWithPermissionsInfo: FC = ({ ); }; +ActionWithPermissionsInfo.displayName = displayName; export default ActionWithPermissionsInfo; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx new file mode 100644 index 00000000000..d0415733d6a --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -0,0 +1,299 @@ +import { ColonyRole } from '@colony/colony-js'; +import { + Calendar, + CalendarCheck, + CalendarPlus, + Copy, + HandPalm, + Prohibit, + UserFocus, +} from '@phosphor-icons/react'; +import clsx from 'clsx'; +import format from 'date-fns/format'; +import { BigNumber } from 'ethers'; +import React, { type FC } from 'react'; +import { defineMessages } from 'react-intl'; +import { generatePath } from 'react-router-dom'; + +import MeatballMenuCopyItem from '~common/ColonyActionsTable/partials/MeatballMenuCopyItem/MeatballMenuCopyItem.tsx'; +import { ADDRESS_ZERO, APP_URL } from '~constants'; +import { useAppContext } from '~context/AppContext/AppContext.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { ColonyActionType, StreamingPaymentEndCondition } from '~gql'; +import { useMobile } from '~hooks'; +import { + COLONY_ACTIVITY_ROUTE, + COLONY_HOME_ROUTE, + TX_SEARCH_PARAM, +} from '~routes'; +import SpinnerLoader from '~shared/Preloaders/SpinnerLoader.tsx'; +import { addressHasRoles } from '~utils/checks/userHasRoles.ts'; +import { findDomainByNativeId } from '~utils/domains.ts'; +import { formatText } from '~utils/intl.ts'; +import { + getAmountPerValue, + getStreamingPaymentLimit, +} from '~utils/streamingPayments.ts'; +import { getSelectedToken } from '~utils/tokens.ts'; +import { END_OPTIONS } from '~v5/common/ActionSidebar/partials/TimeRow/consts.ts'; +import { DEFAULT_DATE_TIME_FORMAT } from '~v5/common/Fields/datepickers/common/consts.ts'; +import MeatBallMenu from '~v5/shared/MeatBallMenu/index.ts'; +import { type MeatBallMenuItem } from '~v5/shared/MeatBallMenu/types.ts'; +import UserInfoPopover from '~v5/shared/UserInfoPopover/UserInfoPopover.tsx'; +import UserPopover from '~v5/shared/UserPopover/UserPopover.tsx'; + +import { + ActionDataGrid, + ActionSubtitle, + ActionTitle, +} from '../Blocks/Blocks.tsx'; +import ActionData from '../rows/ActionData.tsx'; +import ActionTypeRow from '../rows/ActionType.tsx'; +import AmountRow from '../rows/Amount.tsx'; +import CreatedInRow from '../rows/CreatedIn.tsx'; +import DecisionMethodRow from '../rows/DecisionMethod.tsx'; +import DescriptionRow from '../rows/Description.tsx'; +import TeamFromRow from '../rows/TeamFrom.tsx'; +import { getFormattedTokenAmount } from '../utils.ts'; + +import { type StreamingPaymentProps } from './types.ts'; + +const displayName = 'v5.common.CompletedAction.partials.StreamingPayment'; + +const MSG = defineMessages({ + defaultTitle: { + id: `${displayName}.defaultTitle`, + defaultMessage: 'Streaming payment', + }, +}); + +const StreamingPayment: FC = ({ + action, + streamingPayment, +}) => { + const { colony } = useColonyContext(); + const { user } = useAppContext(); + const isMobile = useMobile(); + + const { loadingStreamingPayment, streamingPaymentData } = streamingPayment; + + if (loadingStreamingPayment) { + return ( +
+ +

+ {formatText({ id: 'actionSidebar.loading' })} +

+
+ ); + } + + if (!streamingPaymentData) { + return null; + } + + const { metadata, initiatorUser, transactionHash } = action || {}; + const { customTitle = formatText(MSG.defaultTitle) } = metadata || {}; + const { + amount, + tokenAddress, + recipientAddress, + interval, + nativeDomainId, + endTime, + startTime, + metadata: streamingPaymentMetadata, + } = streamingPaymentData; + const selectedToken = getSelectedToken(colony, tokenAddress || ''); + const formattedAmount = getFormattedTokenAmount( + amount || '1', + selectedToken?.decimals, + ); + const { endCondition } = streamingPaymentMetadata || {}; + + const selectedTeam = findDomainByNativeId(nativeDomainId, colony); + const limitAmount = getStreamingPaymentLimit({ + streamingPayment: streamingPaymentData, + }); + + const hasPermissions = addressHasRoles({ + address: user?.walletAddress || '', + colony, + requiredRoles: [ColonyRole.Arbitration], + requiredRolesDomains: [streamingPaymentData.nativeDomainId], + }); + + // @todo: update cancel-related logic in separate PR + const showCancelOption = + streamingPaymentData.isCancelled && + (user?.walletAddress === initiatorUser?.walletAddress || hasPermissions); + + const meatballOptions: MeatBallMenuItem[] = [ + ...(showCancelOption + ? [ + { + key: '1', + label: formatText({ id: 'expenditure.cancelPayment' }), + icon: Prohibit, + onClick: () => {}, + }, + ] + : []), + { + key: '2', + label: formatText({ id: 'expenditure.copyLink' }), + renderItemWrapper: (itemWrapperProps, children) => ( + + {children} + + ), + icon: Copy, + }, + ]; + + return ( + <> +
+ {customTitle} + +
+ + {formatText( + { id: 'action.title' }, + { + actionType: ColonyActionType.CreateStreamingPayment, + amount: formattedAmount, + tokenSymbol: selectedToken?.symbol, + period: getAmountPerValue(interval).toLowerCase(), + recipient: recipientAddress ? ( + + ) : null, + initiator: initiatorUser ? ( + + {initiatorUser.profile?.displayName} + + ) : null, + }, + )} + + + + {selectedTeam?.metadata && ( + + )} + + } + RowIcon={UserFocus} + tooltipContent={formatText({ + id: 'actionSidebar.tooltip.simplePayment.recipient', + })} + /> + + {format( + new Date(BigNumber.from(Number(startTime) * 1000).toNumber()), + DEFAULT_DATE_TIME_FORMAT, + )} +

+ } + RowIcon={CalendarPlus} + tooltipContent={formatText({ + id: 'actionSidebar.tooltip.streamingPayment.starts', + })} + /> + + {format( + new Date(BigNumber.from(Number(endTime) * 1000).toNumber()), + DEFAULT_DATE_TIME_FORMAT, + )} +

+ ) : ( +

+ { + END_OPTIONS[0].options.find( + ({ value }) => value === endCondition, + )?.label + } +

+ ) + } + RowIcon={CalendarCheck} + tooltipContent={formatText({ + id: 'actionSidebar.tooltip.streamingPayment.ends', + })} + /> + + {getAmountPerValue(interval)}

} + RowIcon={Calendar} + tooltipContent={formatText({ + id: 'actionSidebar.tooltip.streamingPayment.amount.per', + })} + /> + {endCondition === StreamingPaymentEndCondition.LimitReached && + limitAmount && ( + + )} + + + {action.motionData?.motionDomain.metadata && ( + + )} +
+ {action.annotation?.message && ( + + )} + + ); +}; + +StreamingPayment.displayName = displayName; + +export default StreamingPayment; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx new file mode 100644 index 00000000000..f4ca76697f4 --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx @@ -0,0 +1,104 @@ +import { WarningCircle } from '@phosphor-icons/react'; +import clsx from 'clsx'; +import Decimal from 'decimal.js'; +import { AnimatePresence, motion } from 'framer-motion'; +import React, { useEffect, type FC } from 'react'; + +import Numeral from '~shared/Numeral/Numeral.tsx'; +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; + +import { type AvailableToClaimCounterProps } from './types.ts'; + +const displayName = + 'v5.common.CompletedAction.partials.StreamingPayment.partials.AvailableToClaimCounter'; + +const AvailableToClaimCounter: FC = ({ + hasEnoughFunds, + status, + onTimeEnd, + amountAvailableToClaim, + decimals, + tokenSymbol, + getAmounts, +}) => { + useEffect(() => { + const timer = setInterval(() => { + getAmounts(); + }, 1000); + + if ( + ![ + StreamingPaymentStatus.Active, + StreamingPaymentStatus.NotStarted, + ].includes(status) + ) { + onTimeEnd(); + clearInterval(timer); + } + + return () => { + clearInterval(timer); + }; + }, [getAmounts, onTimeEnd, status]); + + const formattedNumber = new Decimal(amountAvailableToClaim) + .div(10 ** decimals) + .toDecimalPlaces(5) + .toString(); + + const digits = formattedNumber.split('').map((char, index) => ({ + char, + key: `${char}-${index}`, + isStatic: char === ',' || char === '.', // Handle commas as static + })); + + return status === StreamingPaymentStatus.Active ? ( + + +
+ {digits.map(({ char, key, isStatic }) => ( +
+ {isStatic ? ( +
+ {char} +
+ ) : ( + + + {char} + + + )} +
+ ))} +
+ {tokenSymbol} +
+ {!hasEnoughFunds && } +
+ ) : ( + + ); +}; + +AvailableToClaimCounter.displayName = displayName; +export default AvailableToClaimCounter; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts new file mode 100644 index 00000000000..5f529134e6c --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts @@ -0,0 +1,11 @@ +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; + +export interface AvailableToClaimCounterProps { + hasEnoughFunds: boolean; + status: StreamingPaymentStatus; + onTimeEnd: () => void; + amountAvailableToClaim: string; + decimals: number; + tokenSymbol: string; + getAmounts: () => void; +} diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/CreatedWithPermissionsInfo.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/CreatedWithPermissionsInfo.tsx new file mode 100644 index 00000000000..601c13c6698 --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/CreatedWithPermissionsInfo.tsx @@ -0,0 +1,87 @@ +import React, { type FC } from 'react'; + +import PermissionRow from '~frame/v5/pages/VerifiedPage/partials/PermissionRow/index.ts'; +import { formatDate } from '~utils/date.ts'; +import { formatText } from '~utils/intl.ts'; +import MenuWithStatusText from '~v5/shared/MenuWithStatusText/index.ts'; +import { StatusTypes } from '~v5/shared/StatusText/consts.ts'; +import UserPopover from '~v5/shared/UserPopover/UserPopover.tsx'; + +import { type CreatedWithPermissionsInfoProps } from './types.ts'; + +const displayName = + 'v5.common.CompletedAction.partials.CreatedWithPermissionsInfo'; + +const CreatedWithPermissionsInfo: FC = ({ + userAdddress, + createdAt, +}) => { + const formattedDate = formatDate(createdAt); + + return ( + +

+ {formatText({ + id: 'action.executed.permissions.overview', + })} +

+ {userAdddress && ( + <> +
+ + {formatText({ + id: 'action.executed.permissions.member', + })} + +
+ +
+
+
+ + {formatText({ + id: 'action.executed.permissions.permission', + })} + + +
+ + )} + {createdAt && ( +
+ + {formatText({ + id: 'action.executed.permissions.date', + })} + + {formattedDate} +
+ )} + + ), + }, + ]} + /> + ); +}; + +CreatedWithPermissionsInfo.displayName = displayName; +export default CreatedWithPermissionsInfo; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/types.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/types.ts new file mode 100644 index 00000000000..c6ec613cc9b --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/types.ts @@ -0,0 +1,4 @@ +export interface CreatedWithPermissionsInfoProps { + userAdddress: string | undefined | null; + createdAt?: string; +} diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx new file mode 100644 index 00000000000..ac12e01dbca --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx @@ -0,0 +1,274 @@ +import { Id } from '@colony/colony-js'; +import clsx from 'clsx'; +import { BigNumber } from 'ethers'; +import React, { type FC, useState, useEffect } from 'react'; +import { defineMessages } from 'react-intl'; + +import LoadingSkeleton from '~common/LoadingSkeleton/LoadingSkeleton.tsx'; +import { Action } from '~constants/actions.ts'; +import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import useAsyncFunction from '~hooks/useAsyncFunction.ts'; +import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; +import useEnabledExtensions from '~hooks/useEnabledExtensions.ts'; +import { ActionTypes } from '~redux'; +import { type ClaimStreamingPaymentPayload } from '~redux/sagas/expenditures/claimStreamingPayment.ts'; +import Numeral from '~shared/Numeral/Numeral.tsx'; +import { formatText } from '~utils/intl.ts'; +import { getSelectedToken } from '~utils/tokens.ts'; +import { ACTION_TYPE_FIELD_NAME } from '~v5/common/ActionSidebar/consts.ts'; +import StreamingPaymentStatusPill from '~v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx'; +import Button from '~v5/shared/Button/Button.tsx'; +import MenuWithSections from '~v5/shared/MenuWithSections/MenuWithSections.tsx'; + +import AvailableToClaimCounter from '../AvailableToClaimCounter/AvailableToClaimCounter.tsx'; +import CreatedWithPermissionsInfo from '../CreatedWithPermissionsInfo/CreatedWithPermissionsInfo.tsx'; + +import { useHasEnoughTokensToClaim } from './hooks.ts'; +import { type StreamingPaymentWidgetProps } from './types.ts'; + +const displayName = + 'v5.common.CompletedAction.partials.StreamingPayment.partials.StreamingPaymentWidget'; + +const MSG = defineMessages({ + streamingStatus: { + id: `${displayName}.streamingStatus`, + defaultMessage: 'Streaming status', + }, + paidToDate: { + id: `${displayName}.paidToDate`, + defaultMessage: 'Paid to date', + }, + availableToClaim: { + id: `${displayName}.availableToClaim`, + defaultMessage: 'Available to claim', + }, + payFunds: { + id: `${displayName}.payFunds`, + defaultMessage: 'Pay funds', + }, + insufficientFunds: { + id: `${displayName}.insufficientFunds`, + defaultMessage: 'Insufficient funds in team. Ensure team is funded.', + }, + transferFunds: { + id: `${displayName}.transferFunds`, + defaultMessage: 'Transfer required funds', + }, +}); + +const StreamingPaymentWidget: FC = ({ + action, + streamingPayment, +}) => { + const { + streamingPaymentData, + refetchStreamingPayment, + loadingStreamingPayment, + amounts, + paymentStatus, + updateAmountsAndStatus, + } = streamingPayment; + const { colony } = useColonyContext(); + const { streamingPaymentsAddress } = useEnabledExtensions(); + const { currentBlockTime: blockTime, fetchCurrentBlockTime } = + useCurrentBlockTime(); + const { + actionSidebarToggle: [, { toggleOn: toggleActionSidebarOn }], + } = useActionSidebarContext(); + const [isLoading, setIsLoading] = useState(false); + + useEffect(() => { + if (streamingPaymentData && !loadingStreamingPayment) { + updateAmountsAndStatus( + streamingPaymentData, + Math.floor(blockTime ?? Date.now() / 1000), + !!action.isMotion, + ); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [loadingStreamingPayment, streamingPaymentData]); + + const checkIfHasEnoughFunds = useHasEnoughTokensToClaim( + streamingPaymentData?.nativeDomainId || Id.RootDomain, + streamingPaymentData?.tokenAddress || '', + amounts.amountAvailableToClaim, + ); + + const [hasEnoughFunds, setHasEnoughFunds] = useState(checkIfHasEnoughFunds()); + + const claim = useAsyncFunction({ + submit: ActionTypes.STREAMING_PAYMENT_CLAIM, + error: ActionTypes.STREAMING_PAYMENT_CLAIM_ERROR, + success: ActionTypes.STREAMING_PAYMENT_CLAIM_SUCCESS, + }); + + const handleClaim = async () => { + if (!streamingPaymentData) { + return; + } + + setIsLoading(true); + + try { + const hasEnoughFundsToMakeClaim = checkIfHasEnoughFunds(); + + if (!hasEnoughFundsToMakeClaim) { + setHasEnoughFunds(false); + return; + } + + const claimPayload: ClaimStreamingPaymentPayload = { + colonyAddress: colony.colonyAddress, + streamingPaymentsAddress: streamingPaymentsAddress ?? '', + streamingPayment: streamingPaymentData, + }; + + await claim(claimPayload); + + refetchStreamingPayment(); + fetchCurrentBlockTime(); + } catch (error) { + console.error(error); + } finally { + setIsLoading(false); + } + }; + + if (!streamingPaymentData) { + return null; + } + + const { tokenAddress, createdAt } = streamingPaymentData; + const selectedToken = getSelectedToken(colony, tokenAddress || ''); + + return ( +
+ +

+ {formatText(MSG.insufficientFunds)} +

+ + + ), + }, + ]), + { + key: '1', + content: ( + <> +
+

{formatText(MSG.streamingStatus)}

+ + + +
+
+ + {formatText(MSG.paidToDate)} + + + + +
+
+ + {formatText(MSG.availableToClaim)} + + + + updateAmountsAndStatus( + streamingPaymentData, + Math.floor(blockTime ?? Date.now() / 1000), + !!action.isMotion, + ) + } + /> + +
+
+ +
+ + ), + }, + ]} + /> + {action.isMotion ? ( +

Add motion steps here

+ ) : ( + + )} +
+ ); +}; + +StreamingPaymentWidget.displayName = displayName; +export default StreamingPaymentWidget; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/hooks.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/hooks.ts new file mode 100644 index 00000000000..3a5e7d5e2ff --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/hooks.ts @@ -0,0 +1,29 @@ +import { BigNumber } from 'ethers'; +import { useCallback } from 'react'; + +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { getBalanceForTokenAndDomain } from '~utils/tokens.ts'; + +export const useHasEnoughTokensToClaim = ( + domainId: number, + tokenAddress: string, + availableToClaim: string | null | undefined, +) => { + const { + colony: { balances }, + } = useColonyContext(); + + const checkIfHasEnoughFunds = useCallback(() => { + const selectedTokenBalance = getBalanceForTokenAndDomain( + balances, + tokenAddress, + domainId, + ); + + return BigNumber.from(selectedTokenBalance ?? '0').gte( + availableToClaim ?? '0', + ); + }, [availableToClaim, balances, domainId, tokenAddress]); + + return checkIfHasEnoughFunds; +}; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/types.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/types.ts new file mode 100644 index 00000000000..77b5c5497dc --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/types.ts @@ -0,0 +1,10 @@ +import { type ColonyAction } from '~types/graphql.ts'; +import { type UseGetStreamingPaymentDataReturnType } from '~v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts'; + +export interface StreamingPaymentWidgetProps { + action: ColonyAction; + streamingPayment: Omit< + UseGetStreamingPaymentDataReturnType, + 'startPolling' | 'stopPolling' + >; +} diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/types.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/types.ts new file mode 100644 index 00000000000..4c4bb82c6ac --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/types.ts @@ -0,0 +1,10 @@ +import { type ColonyAction } from '~types/graphql.ts'; +import { type UseGetStreamingPaymentDataReturnType } from '~v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts'; + +export interface StreamingPaymentProps { + action: ColonyAction; + streamingPayment: Omit< + UseGetStreamingPaymentDataReturnType, + 'startPolling' | 'stopPolling' + >; +} diff --git a/src/components/v5/common/CompletedAction/partials/rows/TeamFrom.tsx b/src/components/v5/common/CompletedAction/partials/rows/TeamFrom.tsx index ca75d9eb2bd..0f92b2847b1 100644 --- a/src/components/v5/common/CompletedAction/partials/rows/TeamFrom.tsx +++ b/src/components/v5/common/CompletedAction/partials/rows/TeamFrom.tsx @@ -24,6 +24,10 @@ const TeamFromRow = ({ teamMetadata, actionType }: TeamFromRowProps) => { return formatText({ id: 'actionSidebar.tooltip.managePermissions.team', }); + case ColonyActionType.CreateStreamingPayment: + return formatText({ + id: 'actionSidebar.tooltip.streamingPayment.from', + }); default: return formatText({ id: 'actionSidebar.tooltip.simplePayment.from', @@ -39,6 +43,8 @@ const TeamFromRow = ({ teamMetadata, actionType }: TeamFromRowProps) => { return formatText({ id: 'actionSidebar.team' }); case ColonyActionType.CreateExpenditure: return formatText({ id: 'actionSidebar.fundFrom' }); + case ColonyActionType.CreateStreamingPayment: + return formatText({ id: 'actionSidebar.streamFrom' }); default: return formatText({ id: 'actionSidebar.from' }); } diff --git a/src/components/v5/shared/UserInfoPopover/types.ts b/src/components/v5/shared/UserInfoPopover/types.ts index 41e12b919d2..77fa7a46b73 100644 --- a/src/components/v5/shared/UserInfoPopover/types.ts +++ b/src/components/v5/shared/UserInfoPopover/types.ts @@ -21,4 +21,5 @@ export interface UserInfoPopoverProps { withVerifiedBadge?: boolean; children?: ((user?: UserFragment) => React.ReactNode) | React.ReactNode; showMultiSigPermissions?: boolean; + withUserName?: boolean; } diff --git a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx index edfb27c60b6..df855af75d9 100644 --- a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx +++ b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx @@ -15,7 +15,6 @@ import useAsyncFunction from '~hooks/useAsyncFunction.ts'; import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; import useEnabledExtensions from '~hooks/useEnabledExtensions.ts'; import useExtensionData from '~hooks/useExtensionData.ts'; -import useStreamingPaymentAmountsLeft from '~hooks/useStreamingPaymentAmountsLeft.ts'; import { ActionTypes } from '~redux'; import { type ClaimStreamingPaymentPayload } from '~redux/sagas/expenditures/claimStreamingPayment.ts'; import { type CreateStreamingPaymentPayload } from '~redux/sagas/expenditures/createStreamingPayment.ts'; @@ -31,7 +30,10 @@ import { import Numeral from '~shared/Numeral/Numeral.tsx'; import { getStreamingPaymentDatabaseId } from '~utils/databaseId.ts'; import { findDomainByNativeId } from '~utils/domains.ts'; -import { getStreamingPaymentLimit } from '~utils/streamingPayments.ts'; +import { + getStreamingPaymentLimit, + getStreamingPaymentAmountsLeft, +} from '~utils/streamingPayments.ts'; import { getSelectedToken } from '~utils/tokens.ts'; import InputBase from '~v5/common/Fields/InputBase/InputBase.tsx'; import Select from '~v5/common/Fields/Select/Select.tsx'; @@ -143,7 +145,7 @@ const TmpStreamingPayments = () => { }); const { amountAvailableToClaim, amountClaimedToDate } = - useStreamingPaymentAmountsLeft( + getStreamingPaymentAmountsLeft( streamingPayment, Math.floor(blockTime ?? Date.now() / 1000), ); diff --git a/src/constants/time.ts b/src/constants/time.ts new file mode 100644 index 00000000000..9f160323b47 --- /dev/null +++ b/src/constants/time.ts @@ -0,0 +1,2 @@ +export const ONE_HOUR_IN_SECONDS = 3600; +export const ONE_DAY_IN_SECONDS = ONE_HOUR_IN_SECONDS * 24; diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index 34200d183f3..ea7ce0c271e 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -14,6 +14,9 @@ fragment StreamingPayment on StreamingPayment { ...ExpenditurePayout } amount + isCancelled + isWaived + createdAt metadata { endCondition changelog { diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index dbd6d4fbfa9..57d5f16d6ae 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -11044,7 +11044,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; @@ -11576,7 +11576,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ }>; -export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -12979,6 +12979,9 @@ export const StreamingPaymentFragmentDoc = gql` ...Token } amount + isCancelled + isWaived + createdAt metadata { endCondition changelog { diff --git a/src/i18n/en.json b/src/i18n/en.json index 79195c9973e..37282289902 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1173,6 +1173,7 @@ "actionSidebar.teamPurpose": "Team purpose", "actionSidebar.teamName": "Team name", "actionSidebar.teamColour": "Team colour", + "actionSidebar.limit": "Limit", "actionSidebar.amountPer": "Amount per", "actionSidebar.amountPer.placeholder": "Select period", "actionSidebar.amountPer.options.title": "Select amount per period", @@ -2003,5 +2004,13 @@ "multiSig.rejectAction": "Reject action", "multiSig.shareAction": "Share action", "streamingPayment.description.placeholder": "Streaming Payment to a single recipient by {initiator}", - "streamingPayment.description.days": "{days} {days, plural, =1 {day} other {days}}" + "streamingPayment.description.days": "{days} {days, plural, =1 {day} other {days}}", + "streamingPayment.status.active": "Active", + "streamingPayment.status.notStarted": "Not started", + "streamingPayment.status.ended": "Ended", + "streamingPayment.status.cancelled": "Cancelled", + "streamingPayment.status.limitReached": "Limit reached", + "action.createdAt.todayAt": "Today at {time}", + "action.createdAt.yesterdayAt": "Yesterday at {time}", + "action.createdAt.at": "{date} at {time}" } diff --git a/src/types/streamingPayments.ts b/src/types/streamingPayments.ts new file mode 100644 index 00000000000..c263474f3f5 --- /dev/null +++ b/src/types/streamingPayments.ts @@ -0,0 +1,7 @@ +export enum StreamingPaymentStatus { + Active = 'Active', + Cancelled = 'Cancelled', + NotStarted = 'Not started', + Ended = 'Ended', + LimitReached = 'Limit reached', +} diff --git a/src/utils/date.ts b/src/utils/date.ts new file mode 100644 index 00000000000..b347d6bcb44 --- /dev/null +++ b/src/utils/date.ts @@ -0,0 +1,53 @@ +import isToday from 'date-fns/isToday'; +import isYesterday from 'date-fns/isYesterday'; +import { type ReactNode } from 'react'; + +import { getFormattedDateFrom } from './getFormattedDateFrom.ts'; +import { formatText, intl } from './intl.ts'; + +const { formatDate: intlFormatDate } = intl(); + +export const formatDate = (value: string | undefined) => { + if (!value) { + return undefined; + } + + const date = new Date(value); + + if (isToday(date)) { + return formatText( + { id: 'action.createdAt.todayAt' }, + { + time: intlFormatDate(date, { + hour: 'numeric', + minute: 'numeric', + }), + }, + ); + } + + if (isYesterday(date)) { + return formatText( + { id: 'action.createdAt.yesterdayAt' }, + { + time: intlFormatDate(date, { + hour: 'numeric', + minute: 'numeric', + }), + }, + ); + } + + return formatText( + { + id: 'action.createdAt.at', + }, + { + date: getFormattedDateFrom(value), + time: intlFormatDate(date, { + hour: 'numeric', + minute: 'numeric', + }), + }, + ); +}; diff --git a/src/utils/streamingPayments.ts b/src/utils/streamingPayments.ts index e9d76aee83c..6230322e3af 100644 --- a/src/utils/streamingPayments.ts +++ b/src/utils/streamingPayments.ts @@ -1,7 +1,11 @@ import { BigNumber } from 'ethers'; +import { ONE_DAY_IN_SECONDS, ONE_HOUR_IN_SECONDS } from '~constants/time.ts'; import { StreamingPaymentEndCondition } from '~gql'; import { type StreamingPayment } from '~types/graphql.ts'; +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; + +import { formatText } from './intl.ts'; export const getStreamingPaymentLimit = ({ streamingPayment, @@ -27,3 +31,185 @@ export const getStreamingPaymentLimit = ({ return limitInWei.toString(); }; + +interface GetStreamingPaymentAmountsLeftReturn { + amountClaimedToDate: string; + amountAvailableToClaim: string; +} + +export const getStreamingPaymentAmountsLeft = ( + streamingPayment: StreamingPayment | null | undefined, + currentTimestamp: number, +): GetStreamingPaymentAmountsLeftReturn => { + if (!streamingPayment || !streamingPayment.amount) { + return { + amountClaimedToDate: '0', + amountAvailableToClaim: '0', + }; + } + + const amountClaimedToDate = + streamingPayment.claims?.reduce((sum, claim) => { + const newAmount = BigNumber.from(claim.amount).add(sum); + + return newAmount.toString(); + }, '0') ?? '0'; + + let amountAvailableToClaim: BigNumber; + + const { + startTime: startTimeString, + endTime: endTimeString, + amount, + interval, + } = streamingPayment; + + const startTime = BigNumber.from(startTimeString); + const endTime = BigNumber.from(endTimeString); + + if (startTime.gte(currentTimestamp)) { + amountAvailableToClaim = BigNumber.from(0); + } else { + const durationToClaim = endTime.lt(currentTimestamp) + ? endTime.sub(startTime) // End time has already passed, the whole duration can be claimed. + : BigNumber.from(currentTimestamp).sub(startTime); // End time has not passed, calculate duration to be claimed. + + const amountAvailableSinceStart = BigNumber.from(amount) + .mul(durationToClaim) + .div(interval); + + amountAvailableToClaim = amountAvailableSinceStart.sub(amountClaimedToDate); + + amountAvailableToClaim = amountAvailableToClaim.lt(0) + ? BigNumber.from(0) + : amountAvailableToClaim; + } + + return { + amountClaimedToDate, + amountAvailableToClaim: amountAvailableToClaim.toString(), + }; +}; + +export const checkIfStarted = ({ + isMotion, + startTime, + currentTimestamp, +}: { + // @todo: update when reputation decision method will be implemented + isMotion?: boolean; + startTime: string; + currentTimestamp: number; +}) => { + if (isMotion) { + return false; + } + + const startTimeValue = BigNumber.from(startTime); + + return startTimeValue.lte(currentTimestamp); +}; + +export const checkIfEnded = ({ + endCondition, + amountAvailableToClaim, + limitAmount, + isCancelled, + endTime, + currentTimestamp, +}: { + endCondition: StreamingPaymentEndCondition | undefined; + amountAvailableToClaim: string; + limitAmount: string | null | undefined; + isCancelled: boolean; + endTime: string; + currentTimestamp: number; +}) => { + if (!endCondition) { + return { + ended: false, + status: StreamingPaymentStatus.NotStarted, + }; + } + + switch (endCondition) { + case StreamingPaymentEndCondition.LimitReached: + return { + ended: BigNumber.from(amountAvailableToClaim).eq( + BigNumber.from(limitAmount), + ), + status: StreamingPaymentStatus.LimitReached, + }; + case StreamingPaymentEndCondition.WhenCancelled: + return { ended: isCancelled, status: StreamingPaymentStatus.Cancelled }; + default: { + const endTimeValue = BigNumber.from(endTime); + + return { + ended: endTimeValue.lte(currentTimestamp), + status: StreamingPaymentStatus.Ended, + }; + } + } +}; + +export const getStatus = ({ + streamingPayment, + currentTimestamp, + isMotion, + amountAvailableToClaim, +}: { + streamingPayment: StreamingPayment | null | undefined; + currentTimestamp: number; + isMotion?: boolean; + amountAvailableToClaim: string; +}) => { + if (!streamingPayment) { + return StreamingPaymentStatus.NotStarted; + } + + const { endTime, startTime, isCancelled, metadata } = streamingPayment; + const { endCondition } = metadata || {}; + const limitAmount = getStreamingPaymentLimit({ streamingPayment }); + const started = checkIfStarted({ + isMotion, + startTime, + currentTimestamp, + }); + const { ended, status } = checkIfEnded({ + amountAvailableToClaim, + endCondition, + endTime, + isCancelled: isCancelled ?? false, + limitAmount, + currentTimestamp, + }); + + if (!started) { + return StreamingPaymentStatus.NotStarted; + } + + if (!ended) { + return StreamingPaymentStatus.Active; + } + + return status; +}; + +export const getAmountPerValue = (interval: string) => { + switch (interval) { + case `${ONE_HOUR_IN_SECONDS}`: + return formatText({ id: 'actionSidebar.amountPer.options.hour' }); + case `${ONE_DAY_IN_SECONDS}`: + return formatText({ id: 'actionSidebar.amountPer.options.day' }); + case `${ONE_DAY_IN_SECONDS * 7}`: + return formatText({ id: 'actionSidebar.amountPer.options.week' }); + default: + return formatText( + { id: 'streamingPayment.description.days' }, + { + days: BigNumber.from(interval).div(ONE_DAY_IN_SECONDS).toNumber(), + }, + ); + } +}; From 2521f32e98e6cbb9be7b80b017d777468a5548bb Mon Sep 17 00:00:00 2001 From: Joanna Date: Tue, 3 Sep 2024 14:13:23 +0200 Subject: [PATCH 025/126] feat: user hub updated with streams --- .../common/Extensions/UserHub/UserHub.tsx | 2 +- .../partials/BalanceTab/BalanceTab.styles.ts | 11 - .../partials/BalanceTab/BalanceTab.tsx | 53 ++--- .../UserHub/partials/BalanceTab/index.ts | 3 - .../AvailableToClaimCounter.tsx | 84 ++++++++ .../partials/AvailableToClaimCounter/types.ts | 6 + .../partials/BalanceTab/partials/Balance.tsx | 199 ------------------ .../BalanceInfoRow/BalanceInfoRow.tsx | 159 ++++++++++++++ .../partials/BalanceInfoRow/types.ts | 10 + .../PendingReputation/PendingReputation.tsx | 104 --------- .../partials/PendingReputation/index.ts | 1 - .../StreamsInfoRow/StreamsInfoRow.tsx | 141 +++++++++++++ .../partials/StreamsInfoRow/hooks.ts | 129 ++++++++++++ .../partials/StreamsInfoRow/types.ts | 5 + .../partials/StreamsInfoRow/utils.ts | 137 ++++++++++++ .../BalanceTab/partials/TotalReputation.tsx | 95 --------- .../UserHub/partials/BalanceTab/types.ts | 24 --- .../partials/ReputationTab/ReputationTab.tsx | 50 +++++ .../PendingReputation/PendingReputation.tsx | 120 +++++++++++ .../partials/PendingReputation/types.ts | 9 + .../partials/PendingReputation/utils.ts | 0 .../TotalReputation/TotalReputation.tsx | 101 +++++++++ .../partials/TotalReputation/types.ts | 9 + .../UserHubInfoSection/UserHubInfoSection.tsx | 81 +++++++ .../partials/UserHubInfoSection/types.ts | 17 ++ .../Extensions/Tooltip/Tooltip.styles.ts | 2 + .../hooks/useGetStreamingPaymentData.ts | 4 +- .../AvailableToClaimCounter.tsx | 10 +- .../partials/AvailableToClaimCounter/types.ts | 1 + .../StreamingPaymentWidget.tsx | 5 + .../v5/shared/Button/TextButton.tsx | 6 +- src/components/v5/shared/Button/types.ts | 2 +- .../NotificationBanner/NotificationBanner.tsx | 3 +- .../v5/shared/NotificationBanner/types.ts | 1 + src/graphql/generated.ts | 59 ++++++ src/graphql/queries/streamingPayments.graphql | 21 ++ src/types/streamingPayments.ts | 4 +- src/utils/streamingPayments.ts | 20 +- 38 files changed, 1203 insertions(+), 485 deletions(-) delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/types.ts delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/hooks.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/types.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/ReputationTab/ReputationTab.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/PendingReputation.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/types.ts rename src/components/common/Extensions/UserHub/partials/{BalanceTab => ReputationTab}/partials/PendingReputation/utils.ts (100%) create mode 100644 src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/TotalReputation.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/types.ts create mode 100644 src/components/common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/UserHubInfoSection/types.ts diff --git a/src/components/common/Extensions/UserHub/UserHub.tsx b/src/components/common/Extensions/UserHub/UserHub.tsx index 3d2f549aeec..d73b14e5dfe 100644 --- a/src/components/common/Extensions/UserHub/UserHub.tsx +++ b/src/components/common/Extensions/UserHub/UserHub.tsx @@ -13,13 +13,13 @@ import NotificationsEnabledWrapper from '~v5/common/NotificationsEnabledWrapper/ import TitleLabel from '~v5/shared/TitleLabel/index.ts'; import { tabList } from './consts.ts'; -import BalanceTab from './partials/BalanceTab/index.ts'; import CryptoToFiatTab from './partials/CryptoToFiatTab/CryptoToFiatTab.tsx'; import NotificationsTab from './partials/NotificationsTab/NotificationsTab.tsx'; import StakesTab from './partials/StakesTab/index.ts'; import TransactionsTab from './partials/TransactionsTab/index.ts'; import UnreadNotifications from './partials/UnreadNotifications.tsx'; import { UserHubTab } from './types.ts'; +import BalanceTab from './partials/BalanceTab/BalanceTab.tsx'; // @BETA: Disabled for now // import { COLONY_HOME_ROUTE } from '~routes'; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts deleted file mode 100644 index dd4640e5a0f..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { tw } from '~utils/css/index.ts'; - -const balanceTabClasses = { - rowName: tw`min-w-[2.875rem] text-md`, - row: tw`flex justify-between font-medium`, - numeral: tw`ml-1 text-sm font-medium`, - icon: tw`mr-1 w-[0.875rem] text-blue-400`, - reputationValue: tw`mt-px text-blue-400`, -}; - -export default balanceTabClasses; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx index 754cf0f8749..e0e3f5d851a 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx @@ -1,52 +1,53 @@ -import React from 'react'; -import { useIntl } from 'react-intl'; +import React, { type FC } from 'react'; +import { defineMessages } from 'react-intl'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { formatText } from '~utils/intl.ts'; -import Balance from './partials/Balance.tsx'; -import PendingReputation from './partials/PendingReputation/index.ts'; -import TotalReputation from './partials/TotalReputation.tsx'; +import BalanceInfoRow from './partials/BalanceInfoRow/BalanceInfoRow.tsx'; +import StreamsInfoRow from './partials/StreamsInfoRow/StreamsInfoRow.tsx'; import { type BalanceTabProps } from './types.ts'; const displayName = 'common.Extensions.UserHub.partials.BalanceTab'; -const BalanceTab = ({ onTabChange }: BalanceTabProps) => { - const { formatMessage } = useIntl(); - const { - colony: { colonyAddress, nativeToken }, - } = useColonyContext(); +const MSG = defineMessages({ + title: { + id: `${displayName}.title`, + defaultMessage: 'Your overview in {colonyName}', + }, + titleColonyOverview: { + id: `${displayName}.titleColonyOverview`, + defaultMessage: 'Your overview', + }, +}); + +const BalanceTab: FC = ({ onTabChange }) => { + const { colony } = useColonyContext(); + const { metadata, nativeToken } = colony; + const { displayName: colonyDisplayName = '' } = metadata || {}; + const { wallet } = useAppContext(); if (!wallet) { return null; } - // @TODO: handle empty state return (
-

- {formatMessage({ id: 'userHub.reputation' })} -

- + {formatText(MSG.title, { colonyName: colonyDisplayName })} + + - - +
); }; BalanceTab.displayName = displayName; - export default BalanceTab; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts deleted file mode 100644 index 59d643f5aa6..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default } from './BalanceTab.tsx'; -export { default as TotalReputation } from './partials/TotalReputation.tsx'; -export { default as PendingReputation } from './partials/PendingReputation/index.ts'; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx new file mode 100644 index 00000000000..5b20b280b8b --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx @@ -0,0 +1,84 @@ +import clsx from 'clsx'; +import { AnimatePresence, motion } from 'framer-motion'; +import React, { type FC, useEffect } from 'react'; + +import { currencySymbolMap } from '~constants/currency.ts'; +import { useCurrencyContext } from '~context/CurrencyContext/CurrencyContext.ts'; + +import { type AvailableToClaimCounterProps } from './types.ts'; + +const AvailableToClaimCounter: FC = ({ + amountAvailableToClaim, + getTotalFunds, + isAtLeastOnePaymentActive, + ratePerSecond, +}) => { + const { currency } = useCurrencyContext(); + + useEffect(() => { + const timer = setInterval(() => { + getTotalFunds(); + }, 1000); + + return () => { + clearInterval(timer); + }; + }, [getTotalFunds]); + + const decimalPlaces = ratePerSecond.toString().split('.')[1]?.length || 0; + const fixedDecimalPlaces = decimalPlaces < 5 ? decimalPlaces : 5; + + const formattedNumber = Number( + amountAvailableToClaim.toFixed(fixedDecimalPlaces), + ).toLocaleString(undefined, { + minimumFractionDigits: fixedDecimalPlaces, + maximumFractionDigits: fixedDecimalPlaces, + }); + + const digits = formattedNumber.split('').map((char, index) => ({ + char, + key: `${char}-${index}`, + isStatic: char === ',' || char === '.', // Handle commas as static + })); + + return isAtLeastOnePaymentActive ? ( +
+ {currencySymbolMap[currency]} +
+ {digits.map(({ char, key, isStatic }) => ( +
+ {isStatic ? ( +
+ {char} +
+ ) : ( + + + {char} + + + )} +
+ ))} +
+ {currency} +
+ ) : ( + + {currencySymbolMap[currency]} {formattedNumber} {currency} + + ); +}; + +export default AvailableToClaimCounter; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/types.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/types.ts new file mode 100644 index 00000000000..6ee91ca0154 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/types.ts @@ -0,0 +1,6 @@ +export interface AvailableToClaimCounterProps { + amountAvailableToClaim: number; + getTotalFunds: () => Promise; + isAtLeastOnePaymentActive?: boolean; + ratePerSecond: number; +} diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx deleted file mode 100644 index e63120390b9..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx +++ /dev/null @@ -1,199 +0,0 @@ -import { - ArrowCircleDownRight, - ArrowCircleUpRight, - Eye, -} from '@phosphor-icons/react'; -import React, { type FC, useMemo } from 'react'; -import { defineMessages, useIntl } from 'react-intl'; - -import { UserHubTab } from '~common/Extensions/UserHub/types.ts'; -import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import { useTokensModalContext } from '~context/TokensModalContext/TokensModalContext.ts'; -import { useGetUserTokenBalanceQuery } from '~gql'; -import { useMobile } from '~hooks/index.ts'; -import Numeral from '~shared/Numeral/index.ts'; -import { formatText } from '~utils/intl.ts'; -import { multiLineTextEllipsis } from '~utils/strings.ts'; -import { getTokenDecimalsWithFallback } from '~utils/tokens.ts'; -import { TokensModalType } from '~v5/common/TokensModal/consts.ts'; -import Button from '~v5/shared/Button/index.ts'; -import TitleLabel from '~v5/shared/TitleLabel/index.ts'; - -import balanceTabClasses from '../BalanceTab.styles.ts'; -import { type BalanceProps, type ViewStakedButtonProps } from '../types.ts'; - -const displayName = - 'common.Extensions.UserHub.partials.ReputationTab.partials.Balance'; - -const MSG = defineMessages({ - nativeToken: { - id: `${displayName}.nativeToken`, - defaultMessage: 'Native token balance', - }, -}); - -const ViewStakedButton: FC = ({ - isFullSize, - onClick, -}) => ( - */} - -
-
- - {formatMessage({ id: 'total.balance' })} - -
- - {percentageReputation === ZeroValue.NearZero && ( - - {percentageReputation} - - )} - {percentageReputation && - percentageReputation !== ZeroValue.NearZero && ( - - )} -
-
-
- - {formatMessage({ id: 'reputation.points' })} - - -
-
- - ); -}; - -TotalReputation.displayName = displayName; - -export default TotalReputation; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts index c73f47e9a41..091261a8921 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts @@ -1,29 +1,5 @@ import { type UserHubTab } from '~common/Extensions/UserHub/types.ts'; -import { type Token } from '~types/graphql.ts'; -import { type ColonyWallet } from '~types/wallet.ts'; export interface BalanceTabProps { onTabChange: (newTab: UserHubTab) => void; } - -export interface BalanceProps extends Pick { - nativeToken: Token; - wallet: ColonyWallet; -} - -export interface ViewStakedButtonProps { - isFullSize?: boolean; - onClick: () => void; -} - -export interface TotalReputationProps { - colonyAddress: string; - wallet: ColonyWallet; - nativeToken: Token; -} - -export interface PendingReputationProps { - nativeToken: Token; - colonyAddress: string; - wallet: ColonyWallet; -} diff --git a/src/components/common/Extensions/UserHub/partials/ReputationTab/ReputationTab.tsx b/src/components/common/Extensions/UserHub/partials/ReputationTab/ReputationTab.tsx new file mode 100644 index 00000000000..416bf610197 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/ReputationTab/ReputationTab.tsx @@ -0,0 +1,50 @@ +import React from 'react'; +import { defineMessages, useIntl } from 'react-intl'; + +import { useAppContext } from '~context/AppContext/AppContext.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; + +import PendingReputation from './partials/PendingReputation/PendingReputation.tsx'; +import TotalReputation from './partials/TotalReputation/TotalReputation.tsx'; + +const displayName = 'common.Extensions.UserHub.partials.ReputationTab'; + +const MSG = defineMessages({ + title: { + id: `${displayName}.title`, + defaultMessage: 'Reputation', + }, +}); + +const ReputationTab = () => { + const { formatMessage } = useIntl(); + const { + colony: { colonyAddress, nativeToken }, + } = useColonyContext(); + const { wallet } = useAppContext(); + + if (!wallet) { + return null; + } + + return ( +
+
{formatMessage(MSG.title)}
+ + +
+ ); +}; + +ReputationTab.displayName = displayName; + +export default ReputationTab; diff --git a/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/PendingReputation.tsx b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/PendingReputation.tsx new file mode 100644 index 00000000000..c7575b6e7e8 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/PendingReputation.tsx @@ -0,0 +1,120 @@ +import React, { type FC, useEffect, useState } from 'react'; +import { defineMessages } from 'react-intl'; + +import UserHubInfoSection from '~common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx'; +import { useGetReputationMiningCycleMetadataQuery } from '~gql'; +import useUserReputation from '~hooks/useUserReputation.ts'; +import TimeRelative from '~shared/TimeRelative/index.ts'; +import { formatText } from '~utils/intl.ts'; + +import { type PendingReputationProps } from './types.ts'; +import { + getNextMiningCycleDate, + getReputationDecayInNextDay, +} from './utils.ts'; + +const displayName = + 'common.Extensions.UserHub.partials.ReputationTab.partials.PendingReputation'; + +const MSG = defineMessages({ + title: { + id: `${displayName}.title`, + defaultMessage: 'Pending reputation', + }, + nextUpdate: { + id: `${displayName}.nextUpdate`, + defaultMessage: 'Next update', + }, + nextUpdateTooltip: { + id: `${displayName}.nextUpdateTooltip`, + defaultMessage: 'New reputation takes two update cycles to display ', + }, + reputationDecay: { + id: `${displayName}.reputationDecay`, + defaultMessage: 'Reputation decay', + }, + reputationDecayValue: { + id: `${displayName}.reputationDecayValue`, + defaultMessage: + '{points} {points, plural, one {pt} other {pts}} in next day', + }, +}); + +const UPDATE_INTERVAL = 15; + +const PendingReputation: FC = ({ + colonyAddress, + wallet, + nativeToken, + className, +}) => { + const { userReputation } = useUserReputation({ + colonyAddress, + walletAddress: wallet?.address, + }); + + const { data } = useGetReputationMiningCycleMetadataQuery(); + const { lastCompletedAt } = data?.getReputationMiningCycleMetadata ?? {}; + + const [nextMiningCycleDate, setNextMiningCycleDate] = useState( + lastCompletedAt + ? getNextMiningCycleDate(new Date(lastCompletedAt ?? '')) + : null, + ); + + useEffect(() => { + const intervalTimer = setInterval(() => { + if (!nextMiningCycleDate) { + return; + } + + const halfIntervalAgo = new Date( + Date.now() - (UPDATE_INTERVAL / 2) * 1000, + ); + + if (nextMiningCycleDate < halfIntervalAgo) { + setNextMiningCycleDate(getNextMiningCycleDate(nextMiningCycleDate)); + } + }, UPDATE_INTERVAL * 1000); + + return () => clearInterval(intervalTimer); + }, [nextMiningCycleDate]); + + return ( + + ) : ( + '-' + ), + }, + { + key: '2', + label: formatText(MSG.reputationDecay), + value: formatText(MSG.reputationDecayValue, { + points: userReputation + ? getReputationDecayInNextDay( + userReputation, + nativeToken.decimals, + ) + : '0', + }), + }, + ]} + /> + ); +}; + +PendingReputation.displayName = displayName; + +export default PendingReputation; diff --git a/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/types.ts b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/types.ts new file mode 100644 index 00000000000..c25e84e6e49 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/types.ts @@ -0,0 +1,9 @@ +import { type Token } from '~types/graphql.ts'; +import { type ColonyWallet } from '~types/wallet.ts'; + +export interface PendingReputationProps { + nativeToken: Token; + colonyAddress: string; + wallet: ColonyWallet; + className?: string; +} diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/utils.ts similarity index 100% rename from src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts rename to src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/utils.ts diff --git a/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/TotalReputation.tsx b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/TotalReputation.tsx new file mode 100644 index 00000000000..ab84ec357da --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/TotalReputation.tsx @@ -0,0 +1,101 @@ +import { Star } from '@phosphor-icons/react'; +import Decimal from 'decimal.js'; +import React, { type FC } from 'react'; +import { defineMessages } from 'react-intl'; + +import UserHubInfoSection from '~common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx'; +import { DEFAULT_TOKEN_DECIMALS } from '~constants/index.ts'; +import useUserReputation from '~hooks/useUserReputation.ts'; +import Numeral from '~shared/Numeral/index.ts'; +import { formatText } from '~utils/intl.ts'; +import { ZeroValue, calculatePercentageReputation } from '~utils/reputation.ts'; +import { + getFormattedTokenValue, + getTokenDecimalsWithFallback, +} from '~utils/tokens.ts'; + +import { type TotalReputationProps } from './types.ts'; + +const displayName = + 'common.Extensions.UserHub.partials.ReputationTab.partials.TotalReputation'; + +const MSG = defineMessages({ + title: { + id: `${displayName}.title`, + defaultMessage: 'Total reputation in THIS Colony', + }, + influence: { + id: `${displayName}.influence`, + defaultMessage: 'Influence', + }, + reputationPoints: { + id: `${displayName}.reputationPoints`, + defaultMessage: 'Reputation points', + }, +}); + +const TotalReputation: FC = ({ + colonyAddress, + wallet, + nativeToken, + className, +}) => { + const { userReputation, totalReputation } = useUserReputation({ + colonyAddress, + walletAddress: wallet?.address, + }); + + const percentageReputation = calculatePercentageReputation( + userReputation || '0', + totalReputation || '0', + ); + + const formattedReputationPoints = getFormattedTokenValue( + new Decimal(userReputation || 0).toString(), + getTokenDecimalsWithFallback(nativeToken.decimals, DEFAULT_TOKEN_DECIMALS), + ); + + return ( + + + {percentageReputation && ( + + )} + + ), + }, + { + key: '2', + label: formatText(MSG.reputationPoints), + value: ( + + ), + }, + ]} + /> + ); +}; + +TotalReputation.displayName = displayName; + +export default TotalReputation; diff --git a/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/types.ts b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/types.ts new file mode 100644 index 00000000000..bc271597124 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/types.ts @@ -0,0 +1,9 @@ +import { type Token } from '~types/graphql.ts'; +import { type ColonyWallet } from '~types/wallet.ts'; + +export interface TotalReputationProps { + colonyAddress: string; + wallet: ColonyWallet; + nativeToken: Token; + className?: string; +} diff --git a/src/components/common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx b/src/components/common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx new file mode 100644 index 00000000000..6933b7650ca --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx @@ -0,0 +1,81 @@ +import clsx from 'clsx'; +import React, { type PropsWithChildren, type FC, Fragment } from 'react'; + +import Tooltip from '~shared/Extensions/Tooltip/Tooltip.tsx'; +import TextButton from '~v5/shared/Button/TextButton.tsx'; +import Link from '~v5/shared/Link/Link.tsx'; + +import { type UserHubInfoSectionProps } from './types.ts'; + +const UserHubInfoSection: FC> = ({ + title, + items, + viewLinkProps, + className, + children, +}) => { + return ( +
+
+
+ {title} +
+ {viewLinkProps && ( + <> + {'to' in viewLinkProps ? ( + + ) : ( + + )} + + )} +
+ {!!items.length && ( +
+ {items.map(({ key, label, labelTooltip, value, valueTooltip }) => ( + +
+ {labelTooltip ? ( + + {label} + + ) : ( + label + )} +
+
+ {valueTooltip ? ( + + {value} + + ) : ( + value + )} +
+
+ ))} +
+ )} + {children &&
{children}
} +
+ ); +}; + +export default UserHubInfoSection; diff --git a/src/components/common/Extensions/UserHub/partials/UserHubInfoSection/types.ts b/src/components/common/Extensions/UserHub/partials/UserHubInfoSection/types.ts new file mode 100644 index 00000000000..f61f64f642f --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/UserHubInfoSection/types.ts @@ -0,0 +1,17 @@ +import { type TextButtonProps } from '~v5/shared/Button/types.ts'; +import { type LinkProps } from '~v5/shared/Link/types.ts'; + +export interface UserHubInfoSectionItem { + key: string; + label: string; + labelTooltip?: string; + value: React.ReactNode; + valueTooltip?: string; +} + +export interface UserHubInfoSectionProps { + title: string; + items: UserHubInfoSectionItem[]; + viewLinkProps?: TextButtonProps | LinkProps; + className?: string; +} diff --git a/src/components/shared/Extensions/Tooltip/Tooltip.styles.ts b/src/components/shared/Extensions/Tooltip/Tooltip.styles.ts index 5cad2e9a082..18c57ca984a 100644 --- a/src/components/shared/Extensions/Tooltip/Tooltip.styles.ts +++ b/src/components/shared/Extensions/Tooltip/Tooltip.styles.ts @@ -42,6 +42,7 @@ const bottomPlacementClasses = tw` const topAndBottomStartPlacementClasses = tw` group-data-[popper-placement='bottom-start']:!left-2 group-data-[popper-placement='top-start']:!left-2 + group-data-[popper-placement='top-start']:!top-auto group-data-[popper-placement='bottom-start']:!transform-none group-data-[popper-placement='top-start']:!transform-none `; @@ -84,6 +85,7 @@ const tooltipClasses = { ${topAndBottomEndPlacementClasses} ${topAndBottomStartPlacementClasses} ${rightPlacementClasses} + ${topAndBottomEndPlacementClasses} `, }; diff --git a/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts index 848835c8688..2195d0b62a4 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts @@ -8,8 +8,8 @@ import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; import noop from '~utils/noop.ts'; import { getSafePollingInterval } from '~utils/queries.ts'; import { - getStatus, getStreamingPaymentAmountsLeft, + getStreamingPaymentStatus, } from '~utils/streamingPayments.ts'; export const useGetStreamingPaymentData = ( @@ -81,7 +81,7 @@ export const useGetStreamingPaymentData = ( const { amountAvailableToClaim, amountClaimedToDate } = getStreamingPaymentAmountsLeft(payment, currentTimestamp); - const status = getStatus({ + const status = getStreamingPaymentStatus({ streamingPayment, currentTimestamp, isMotion, diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx index f4ca76697f4..5e873a3ec93 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx @@ -20,6 +20,7 @@ const AvailableToClaimCounter: FC = ({ decimals, tokenSymbol, getAmounts, + ratePerSecond, }) => { useEffect(() => { const timer = setInterval(() => { @@ -41,9 +42,16 @@ const AvailableToClaimCounter: FC = ({ }; }, [getAmounts, onTimeEnd, status]); + const formattedRate = new Decimal(ratePerSecond) + .div(10 ** decimals) + .toString(); + + const decimalPlaces = formattedRate.toString().split('.')[1]?.length || 0; + const fixedDecimalPlaces = decimalPlaces < 5 ? decimalPlaces : 5; + const formattedNumber = new Decimal(amountAvailableToClaim) .div(10 ** decimals) - .toDecimalPlaces(5) + .toFixed(fixedDecimalPlaces) .toString(); const digits = formattedNumber.split('').map((char, index) => ({ diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts index 5f529134e6c..ca13193faed 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts @@ -8,4 +8,5 @@ export interface AvailableToClaimCounterProps { decimals: number; tokenSymbol: string; getAmounts: () => void; + ratePerSecond: string; } diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx index ac12e01dbca..f90e4c6993d 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx @@ -142,6 +142,10 @@ const StreamingPaymentWidget: FC = ({ const { tokenAddress, createdAt } = streamingPaymentData; const selectedToken = getSelectedToken(colony, tokenAddress || ''); + const ratePerSecond = BigNumber.from(streamingPaymentData.amount || '0') + .div(streamingPaymentData.interval || 1) + .toString(); + return (
= ({ !!action.isMotion, ) } + ratePerSecond={ratePerSecond} />
diff --git a/src/components/v5/shared/Button/TextButton.tsx b/src/components/v5/shared/Button/TextButton.tsx index 71b50a05976..62343a9d626 100644 --- a/src/components/v5/shared/Button/TextButton.tsx +++ b/src/components/v5/shared/Button/TextButton.tsx @@ -47,13 +47,11 @@ const TextButton: FC> = ({ 'flex items-center font-medium transition-all duration-normal hover:text-blue-400 disabled:text-gray-400', { 'text-sm text-gray-900': mode === 'default', - }, - { 'text-md': mode === 'medium', - }, - { 'bold text-xs underline hover:text-blue-400': mode === 'underlined', + 'text-xs font-medium leading-[1.125rem] text-blue-400': + mode === 'link', 'pointer-events-none': disabled, 'disabled:text-gray-400': !isErrorColor, 'text-negative-400': isErrorColor, diff --git a/src/components/v5/shared/Button/types.ts b/src/components/v5/shared/Button/types.ts index a300aafab95..6bdfcc23616 100644 --- a/src/components/v5/shared/Button/types.ts +++ b/src/components/v5/shared/Button/types.ts @@ -40,7 +40,7 @@ export type ButtonSize = | 'medium' | 'large'; -export type TextButtonMode = 'default' | 'medium' | 'underlined'; +export type TextButtonMode = 'default' | 'medium' | 'underlined' | 'link'; export interface ButtonContentProps { icon?: Icon; diff --git a/src/components/v5/shared/NotificationBanner/NotificationBanner.tsx b/src/components/v5/shared/NotificationBanner/NotificationBanner.tsx index 2e51f801fde..1a52364cf78 100644 --- a/src/components/v5/shared/NotificationBanner/NotificationBanner.tsx +++ b/src/components/v5/shared/NotificationBanner/NotificationBanner.tsx @@ -9,6 +9,7 @@ const NotificationBanner: FC = ({ className, status, icon: Icon, + iconSize = 16, children, description, callToAction, @@ -33,7 +34,7 @@ const NotificationBanner: FC = ({ > {Icon ? ( | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null } | null> } | null }; +export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ + colonyId: Scalars['ID']; + sortDirection?: InputMaybe; + limit?: InputMaybe; + nextToken?: InputMaybe; + recipientAddress: Scalars['String']; +}>; + + +export type GetStreamingPaymentsByColonyQuery = { __typename?: 'Query', getStreamingPaymentsByColony?: { __typename?: 'ModelStreamingPaymentConnection', nextToken?: string | null, items: Array<{ __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null> } | null }; + export type GetTokenByAddressQueryVariables = Exact<{ address: Scalars['ID']; }>; @@ -16355,6 +16366,54 @@ export function useGetUserStakesLazyQuery(baseOptions?: Apollo.LazyQueryHookOpti export type GetUserStakesQueryHookResult = ReturnType; export type GetUserStakesLazyQueryHookResult = ReturnType; export type GetUserStakesQueryResult = Apollo.QueryResult; +export const GetStreamingPaymentsByColonyDocument = gql` + query GetStreamingPaymentsByColony($colonyId: ID!, $sortDirection: ModelSortDirection = ASC, $limit: Int = 100, $nextToken: String, $recipientAddress: String!) { + getStreamingPaymentsByColony( + colonyId: $colonyId + sortDirection: $sortDirection + limit: $limit + nextToken: $nextToken + filter: {recipientAddress: {eq: $recipientAddress}} + ) { + items { + ...StreamingPayment + } + nextToken + } +} + ${StreamingPaymentFragmentDoc}`; + +/** + * __useGetStreamingPaymentsByColonyQuery__ + * + * To run a query within a React component, call `useGetStreamingPaymentsByColonyQuery` and pass it any options that fit your needs. + * When your component renders, `useGetStreamingPaymentsByColonyQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetStreamingPaymentsByColonyQuery({ + * variables: { + * colonyId: // value for 'colonyId' + * sortDirection: // value for 'sortDirection' + * limit: // value for 'limit' + * nextToken: // value for 'nextToken' + * recipientAddress: // value for 'recipientAddress' + * }, + * }); + */ +export function useGetStreamingPaymentsByColonyQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetStreamingPaymentsByColonyDocument, options); + } +export function useGetStreamingPaymentsByColonyLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetStreamingPaymentsByColonyDocument, options); + } +export type GetStreamingPaymentsByColonyQueryHookResult = ReturnType; +export type GetStreamingPaymentsByColonyLazyQueryHookResult = ReturnType; +export type GetStreamingPaymentsByColonyQueryResult = Apollo.QueryResult; export const GetTokenByAddressDocument = gql` query GetTokenByAddress($address: ID!) { getTokenByAddress(id: $address) { diff --git a/src/graphql/queries/streamingPayments.graphql b/src/graphql/queries/streamingPayments.graphql index 0e8ac9f2441..a91bcae0fd2 100644 --- a/src/graphql/queries/streamingPayments.graphql +++ b/src/graphql/queries/streamingPayments.graphql @@ -3,3 +3,24 @@ query GetStreamingPayment($streamingPaymentId: ID!) { ...StreamingPayment } } + +query GetStreamingPaymentsByColony( + $colonyId: ID! + $sortDirection: ModelSortDirection = ASC + $limit: Int = 100 + $nextToken: String + $recipientAddress: String! +) { + getStreamingPaymentsByColony( + colonyId: $colonyId + sortDirection: $sortDirection + limit: $limit + nextToken: $nextToken + filter: { recipientAddress: { eq: $recipientAddress } } + ) { + items { + ...StreamingPayment + } + nextToken + } +} diff --git a/src/types/streamingPayments.ts b/src/types/streamingPayments.ts index c263474f3f5..14eb1d5c40d 100644 --- a/src/types/streamingPayments.ts +++ b/src/types/streamingPayments.ts @@ -1,7 +1,7 @@ export enum StreamingPaymentStatus { Active = 'Active', Cancelled = 'Cancelled', - NotStarted = 'Not started', + NotStarted = 'NotStarted', Ended = 'Ended', - LimitReached = 'Limit reached', + LimitReached = 'LimitReached', } diff --git a/src/utils/streamingPayments.ts b/src/utils/streamingPayments.ts index 6230322e3af..9770679b166 100644 --- a/src/utils/streamingPayments.ts +++ b/src/utils/streamingPayments.ts @@ -7,6 +7,11 @@ import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; import { formatText } from './intl.ts'; +interface GetStreamingPaymentAmountsLeftReturn { + amountClaimedToDate: string; + amountAvailableToClaim: string; +} + export const getStreamingPaymentLimit = ({ streamingPayment, }: { @@ -32,11 +37,6 @@ export const getStreamingPaymentLimit = ({ return limitInWei.toString(); }; -interface GetStreamingPaymentAmountsLeftReturn { - amountClaimedToDate: string; - amountAvailableToClaim: string; -} - export const getStreamingPaymentAmountsLeft = ( streamingPayment: StreamingPayment | null | undefined, currentTimestamp: number, @@ -91,7 +91,7 @@ export const getStreamingPaymentAmountsLeft = ( }; }; -export const checkIfStarted = ({ +export const checkIfStreamingPaymentStarted = ({ isMotion, startTime, currentTimestamp, @@ -110,7 +110,7 @@ export const checkIfStarted = ({ return startTimeValue.lte(currentTimestamp); }; -export const checkIfEnded = ({ +export const checkIfStreamingPaymentEnded = ({ endCondition, amountAvailableToClaim, limitAmount, @@ -153,7 +153,7 @@ export const checkIfEnded = ({ } }; -export const getStatus = ({ +export const getStreamingPaymentStatus = ({ streamingPayment, currentTimestamp, isMotion, @@ -171,12 +171,12 @@ export const getStatus = ({ const { endTime, startTime, isCancelled, metadata } = streamingPayment; const { endCondition } = metadata || {}; const limitAmount = getStreamingPaymentLimit({ streamingPayment }); - const started = checkIfStarted({ + const started = checkIfStreamingPaymentStarted({ isMotion, startTime, currentTimestamp, }); - const { ended, status } = checkIfEnded({ + const { ended, status } = checkIfStreamingPaymentEnded({ amountAvailableToClaim, endCondition, endTime, From b5ccf4e87e26bb80afbddc95100c5f5fb0bb6048 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Tue, 1 Oct 2024 20:57:39 +0100 Subject: [PATCH 026/126] Chore: post-rebase fixes --- .../ColonyActions/helpers/getActionTitleValues.ts | 11 +++++++++++ .../StreamingPaymentForm/StreamingPaymentForm.tsx | 1 - .../partials/StreamingPayment/StreamingPayment.tsx | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/common/ColonyActions/helpers/getActionTitleValues.ts b/src/components/common/ColonyActions/helpers/getActionTitleValues.ts index 8f4b3d890df..3c7fb2a0cd5 100644 --- a/src/components/common/ColonyActions/helpers/getActionTitleValues.ts +++ b/src/components/common/ColonyActions/helpers/getActionTitleValues.ts @@ -48,6 +48,9 @@ export enum ActionTitleMessageKeys { } /* Maps actionTypes to message values as found in en-actions.ts */ +/** + * @TODO: Refactor to use comparison instead of includes which is just a partial match on the string + */ const getMessageDescriptorKeys = (actionType: AnyActionType) => { switch (true) { case actionType === ColonyActionType.Payment: @@ -65,6 +68,14 @@ const getMessageDescriptorKeys = (actionType: AnyActionType) => { ActionTitleMessageKeys.Initiator, ActionTitleMessageKeys.Period, ]; + case actionType.includes(ColonyActionType.Payment) && + !actionType.includes(ExtendedColonyActionType.SplitPayment): + return [ + ActionTitleMessageKeys.Recipient, + ActionTitleMessageKeys.Amount, + ActionTitleMessageKeys.TokenSymbol, + ActionTitleMessageKeys.Initiator, + ]; case actionType.includes(ColonyActionType.MoveFunds): return [ ActionTitleMessageKeys.Amount, diff --git a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx index 28cb910a25c..e5c2a70d135 100644 --- a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx +++ b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/StreamingPaymentForm.tsx @@ -112,7 +112,6 @@ const StreamingPaymentForm: FC = ({ getFormOptions }) => { = ({ address: user?.walletAddress || '', colony, requiredRoles: [ColonyRole.Arbitration], - requiredRolesDomains: [streamingPaymentData.nativeDomainId], + requiredRolesDomain: streamingPaymentData.nativeDomainId, }); // @todo: update cancel-related logic in separate PR @@ -279,7 +279,7 @@ const StreamingPayment: FC = ({ RowIcon={HandPalm} /> )} - + {action.motionData?.motionDomain.metadata && ( Date: Fri, 4 Oct 2024 08:41:39 +0200 Subject: [PATCH 027/126] feat: add streaming payments subpage --- .../frame/Extensions/layouts/consts.ts | 185 ++++++++++++++++++ .../StreamingPaymentsPage.tsx | 18 ++ src/routes/Routes.tsx | 6 + src/routes/routeConstants.ts | 3 +- 4 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 src/components/frame/Extensions/layouts/consts.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx diff --git a/src/components/frame/Extensions/layouts/consts.ts b/src/components/frame/Extensions/layouts/consts.ts new file mode 100644 index 00000000000..53d87bff5e5 --- /dev/null +++ b/src/components/frame/Extensions/layouts/consts.ts @@ -0,0 +1,185 @@ +import { + ArrowDownRight, + ChartBar, + ChatsCircle, + HandHeart, + Layout, + PresentationChart, + PuzzlePiece, + UsersFour, + UsersThree, + Signature, + // @BETA: Disabled for now + // SealCheck, + // ChartPieSlice, + // ListChecks, + ChartLine, + // Intersect, + // Briefcase, + // BookOpenText, +} from '@phosphor-icons/react'; + +import { + COLONY_ACTIVITY_ROUTE, + COLONY_AGREEMENTS_ROUTE, + COLONY_BALANCES_ROUTE, + COLONY_MEMBERS_ROUTE, + COLONY_EXTENSIONS_ROUTE, + COLONY_INCOMING_ROUTE, + COLONY_FOLLOWERS_ROUTE, + // @BETA: Disabled for now + // COLONY_INCORPORATION_ROUTE, + // COLONY_INTEGRATIONS_ROUTE, + COLONY_PERMISSIONS_ROUTE, + // COLONY_REPUTATION_ROUTE, + COLONY_TEAMS_ROUTE, + COLONY_STREAMING_PAYMENTS_ROUTE, + // COLONY_VERIFIED_ROUTE, +} from '~routes/routeConstants.ts'; +import { formatText } from '~utils/intl.ts'; +import { type NavigationSidebarLinksListProps } from '~v5/frame/NavigationSidebar/partials/NavigationSidebarLinksList/types.ts'; + +export const membersMenu: NavigationSidebarLinksListProps['items'] = [ + { + key: '1', + label: formatText({ id: 'navigation.members.members' }), + to: COLONY_FOLLOWERS_ROUTE, + icon: UsersThree, + }, + { + key: '2', + label: formatText({ id: 'navigation.members.contributors' }) || '', + to: COLONY_MEMBERS_ROUTE, + icon: HandHeart, + }, + // @BETA: Disabled for now + // { + // key: '3', + // label: formatText({ id: 'navigation.members.verifiedMembers' }), + // to: COLONY_VERIFIED_ROUTE, + // icon: SealCheck, + // }, + { + key: '4', + label: formatText({ id: 'navigation.members.permissions' }), + to: COLONY_PERMISSIONS_ROUTE, + icon: Signature, + }, + { + key: '5', + label: formatText({ id: 'navigation.members.teams' }), + to: COLONY_TEAMS_ROUTE, + icon: UsersFour, + }, +]; + +// @todo: update routes when pages will be ready +export const financesMenu: NavigationSidebarLinksListProps['items'] = [ + // @BETA: Disabled for now + // { + // key: '1', + // label: formatText({ id: 'navigation.finances.overview' }), + // to: '/overview', + // icon: ChartPieSlice, + // tagProps: { + // text: 'New', + // mode: 'new', + // }, + // }, + { + key: '2', + label: formatText({ id: 'navigation.finances.balance' }), + to: COLONY_BALANCES_ROUTE, + icon: ChartBar, + }, + { + key: '3', + label: formatText({ id: 'navigation.finances.incomingFunds' }), + to: COLONY_INCOMING_ROUTE, + icon: ArrowDownRight, + }, + // @BETA: Disabled for now + // { + // key: '4', + // label: formatText({ id: 'navigation.finances.transactions' }), + // to: '/transactions', + // icon: ListChecks, + // disabled: true, + // tagProps: { + // text: 'Coming soon', + // }, + // }, + { + key: '5', + label: formatText({ id: 'navigation.finances.streamingPayments' }), + to: COLONY_STREAMING_PAYMENTS_ROUTE, + icon: ChartLine, + }, +]; + +// @todo: update routes when pages will be ready +export const agreementsMenu: NavigationSidebarLinksListProps['items'] = [ + { + key: '1', + label: formatText({ id: 'navigation.agreements.allAgreements' }), + to: COLONY_AGREEMENTS_ROUTE, + icon: ChatsCircle, + tagProps: { + text: formatText({ id: 'status.new' }), + mode: 'new', + }, + }, +]; + +export const adminMenu: NavigationSidebarLinksListProps['items'] = [ + // @BETA: Disabled for now + // { + // key: '2', + // label: formatText({ id: 'navigation.admin.reputation' }), + // to: COLONY_REPUTATION_ROUTE, + // icon: Star, + // }, + { + key: '3', + label: formatText({ id: 'navigation.admin.extensions' }), + to: COLONY_EXTENSIONS_ROUTE, + icon: PuzzlePiece, + }, + // @BETA: Disabled for now + // { + // key: '4', + // label: formatText({ id: 'navigation.admin.integrations' }), + // to: COLONY_INTEGRATIONS_ROUTE, + // icon: Intersect, + // }, + // { + // key: '5', + // label: formatText({ id: 'navigation.admin.incorporation' }), + // to: COLONY_INCORPORATION_ROUTE, + // icon: Briefcase, + // disabled: true, + // tagProps: { + // text: formatText({ id: 'extension.status.coming-soon' }), + // }, + // }, +]; + +// @todo: update routes when pages will be ready +export const dashboardMainMenu: NavigationSidebarLinksListProps['items'] = [ + { + key: '1', + label: formatText({ id: 'navigation.dashboard.dashboard' }), + to: '', + icon: Layout, + }, +]; + +// @todo: update routes when pages will be ready +export const dashboardMenu: NavigationSidebarLinksListProps['items'] = [ + { + key: '1', + label: formatText({ id: 'navigation.dashboard.activityFeed' }), + to: COLONY_ACTIVITY_ROUTE, + icon: PresentationChart, + }, +]; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx new file mode 100644 index 00000000000..6dc13864489 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -0,0 +1,18 @@ +import React from 'react'; + +import { useSetPageHeadingTitle } from '~context/PageHeadingContext/PageHeadingContext.ts'; +import { formatText } from '~utils/intl.ts'; + +const displayName = 'v5.pages.StreamingPaymentsPage'; + +const StreamingPaymentsPage = () => { + useSetPageHeadingTitle( + formatText({ id: 'navigation.finances.streamingPayments' }), + ); + + return
; +}; + +StreamingPaymentsPage.displayName = displayName; + +export default StreamingPaymentsPage; diff --git a/src/routes/Routes.tsx b/src/routes/Routes.tsx index 66602cbf8ac..bf3d87a22cb 100644 --- a/src/routes/Routes.tsx +++ b/src/routes/Routes.tsx @@ -22,6 +22,7 @@ import MembersPage, { ContributorsPage, } from '~frame/v5/pages/MembersPage/index.ts'; import OnboardingPage from '~frame/v5/pages/OnboardingPage/index.ts'; +import StreamingPaymentsPage from '~frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx'; import TeamsPage from '~frame/v5/pages/TeamsPage/index.ts'; import UserAdvancedPage from '~frame/v5/pages/UserAdvancedPage/index.ts'; import UserCryptoToFiatPage from '~frame/v5/pages/UserCryptoToFiatPage/CryptoToFiatPage.tsx'; @@ -65,6 +66,7 @@ import { COLONY_AGREEMENTS_ROUTE, USER_CRYPTO_TO_FIAT_ROUTE, RESERVED_ROUTES, + COLONY_STREAMING_PAYMENTS_ROUTE, // ACTIONS_PAGE_ROUTE, // UNWRAP_TOKEN_ROUTE, // CLAIM_TOKEN_ROUTE, @@ -148,6 +150,10 @@ const Routes = () => { } /> } /> } /> + } + /> } /> diff --git a/src/routes/routeConstants.ts b/src/routes/routeConstants.ts index f52b3371095..f71737621ba 100644 --- a/src/routes/routeConstants.ts +++ b/src/routes/routeConstants.ts @@ -25,8 +25,9 @@ export const COLONY_EXTENSION_DETAILS_ROUTE = `${COLONY_EXTENSIONS_ROUTE}/:exten export const COLONY_INCOMING_ROUTE = `incoming`; export const COLONY_BALANCES_ROUTE = `balances`; export const COLONY_FOLLOWERS_ROUTE = `members/followers`; -export const COLONY_MEMBERS_WITH_DOMAIN_ROUTE = `members/:domainId`; +export const COLONY_STREAMING_PAYMENTS_ROUTE = `streaming-payments`; export const COLONY_MEMBERS_ROUTE = `members`; +export const COLONY_MEMBERS_WITH_DOMAIN_ROUTE = `members/:domainId`; export const COLONY_VERIFIED_ROUTE = `verified`; export const COLONY_TEAMS_ROUTE = `teams`; export const COLONY_AGREEMENTS_ROUTE = `agreements`; From 92fd5d41bcbb244127502198c2e4e52e0fd322aa Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 7 Nov 2024 09:40:27 +0100 Subject: [PATCH 028/126] fixes after rebase --- .../partials/BalanceTab/BalanceTab.styles.ts | 11 + .../partials/BalanceTab/BalanceTab.tsx | 53 +++-- .../UserHub/partials/BalanceTab/index.ts | 3 + .../partials/BalanceTab/partials/Balance.tsx | 199 ++++++++++++++++++ .../PendingReputation/PendingReputation.tsx | 104 +++++++++ .../partials/PendingReputation/index.ts | 1 + .../partials/PendingReputation/utils.ts | 0 .../BalanceTab/partials/TotalReputation.tsx | 95 +++++++++ .../UserHub/partials/BalanceTab/types.ts | 24 +++ .../StreamingPayment/StreamingPayment.tsx | 5 +- .../CompletedAction/partials/rows/Amount.tsx | 26 ++- 11 files changed, 484 insertions(+), 37 deletions(-) create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts rename src/components/common/Extensions/UserHub/partials/{ReputationTab => BalanceTab}/partials/PendingReputation/utils.ts (100%) create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts new file mode 100644 index 00000000000..dd4640e5a0f --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts @@ -0,0 +1,11 @@ +import { tw } from '~utils/css/index.ts'; + +const balanceTabClasses = { + rowName: tw`min-w-[2.875rem] text-md`, + row: tw`flex justify-between font-medium`, + numeral: tw`ml-1 text-sm font-medium`, + icon: tw`mr-1 w-[0.875rem] text-blue-400`, + reputationValue: tw`mt-px text-blue-400`, +}; + +export default balanceTabClasses; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx index e0e3f5d851a..754cf0f8749 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx @@ -1,53 +1,52 @@ -import React, { type FC } from 'react'; -import { defineMessages } from 'react-intl'; +import React from 'react'; +import { useIntl } from 'react-intl'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import { formatText } from '~utils/intl.ts'; -import BalanceInfoRow from './partials/BalanceInfoRow/BalanceInfoRow.tsx'; -import StreamsInfoRow from './partials/StreamsInfoRow/StreamsInfoRow.tsx'; +import Balance from './partials/Balance.tsx'; +import PendingReputation from './partials/PendingReputation/index.ts'; +import TotalReputation from './partials/TotalReputation.tsx'; import { type BalanceTabProps } from './types.ts'; const displayName = 'common.Extensions.UserHub.partials.BalanceTab'; -const MSG = defineMessages({ - title: { - id: `${displayName}.title`, - defaultMessage: 'Your overview in {colonyName}', - }, - titleColonyOverview: { - id: `${displayName}.titleColonyOverview`, - defaultMessage: 'Your overview', - }, -}); - -const BalanceTab: FC = ({ onTabChange }) => { - const { colony } = useColonyContext(); - const { metadata, nativeToken } = colony; - const { displayName: colonyDisplayName = '' } = metadata || {}; - +const BalanceTab = ({ onTabChange }: BalanceTabProps) => { + const { formatMessage } = useIntl(); + const { + colony: { colonyAddress, nativeToken }, + } = useColonyContext(); const { wallet } = useAppContext(); if (!wallet) { return null; } + // @TODO: handle empty state return (
-
- {formatText(MSG.title, { colonyName: colonyDisplayName })} -
- + {formatMessage({ id: 'userHub.reputation' })} +

+ - + +
); }; BalanceTab.displayName = displayName; + export default BalanceTab; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts new file mode 100644 index 00000000000..59d643f5aa6 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts @@ -0,0 +1,3 @@ +export { default } from './BalanceTab.tsx'; +export { default as TotalReputation } from './partials/TotalReputation.tsx'; +export { default as PendingReputation } from './partials/PendingReputation/index.ts'; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx new file mode 100644 index 00000000000..e63120390b9 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx @@ -0,0 +1,199 @@ +import { + ArrowCircleDownRight, + ArrowCircleUpRight, + Eye, +} from '@phosphor-icons/react'; +import React, { type FC, useMemo } from 'react'; +import { defineMessages, useIntl } from 'react-intl'; + +import { UserHubTab } from '~common/Extensions/UserHub/types.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { useTokensModalContext } from '~context/TokensModalContext/TokensModalContext.ts'; +import { useGetUserTokenBalanceQuery } from '~gql'; +import { useMobile } from '~hooks/index.ts'; +import Numeral from '~shared/Numeral/index.ts'; +import { formatText } from '~utils/intl.ts'; +import { multiLineTextEllipsis } from '~utils/strings.ts'; +import { getTokenDecimalsWithFallback } from '~utils/tokens.ts'; +import { TokensModalType } from '~v5/common/TokensModal/consts.ts'; +import Button from '~v5/shared/Button/index.ts'; +import TitleLabel from '~v5/shared/TitleLabel/index.ts'; + +import balanceTabClasses from '../BalanceTab.styles.ts'; +import { type BalanceProps, type ViewStakedButtonProps } from '../types.ts'; + +const displayName = + 'common.Extensions.UserHub.partials.ReputationTab.partials.Balance'; + +const MSG = defineMessages({ + nativeToken: { + id: `${displayName}.nativeToken`, + defaultMessage: 'Native token balance', + }, +}); + +const ViewStakedButton: FC = ({ + isFullSize, + onClick, +}) => ( +
+ )} + + + + {isMobile && ( +
+
+ )} + + + {/* @TODO: stacked icon viewed? */} +
+
+
+ + {formatMessage({ id: 'staked' })} + + {!isMobile && ( + onTabChange(UserHubTab.Stakes)} + /> + )} +
+ +
+ {isMobile && ( +
+ onTabChange(UserHubTab.Stakes)} + isFullSize + /> +
+ )} +
+ + + ); +}; + +Balance.displayName = displayName; + +export default Balance; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx new file mode 100644 index 00000000000..7c9961460a1 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx @@ -0,0 +1,104 @@ +import React, { type FC, useEffect, useState } from 'react'; +import { useIntl } from 'react-intl'; + +import balanceTabClasses from '~common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts'; +import { type PendingReputationProps } from '~common/Extensions/UserHub/partials/BalanceTab/types.ts'; +import { useGetReputationMiningCycleMetadataQuery } from '~gql'; +import useUserReputation from '~hooks/useUserReputation.ts'; +import TimeRelative from '~shared/TimeRelative/index.ts'; +import TitleLabel from '~v5/shared/TitleLabel/index.ts'; + +import { + getNextMiningCycleDate, + getReputationDecayInNextDay, +} from './utils.ts'; + +const displayName = + 'common.Extensions.UserHub.partials.ReputationTab.partials.PendingReputation'; + +const UPDATE_INTERVAL = 15; + +const PendingReputation: FC = ({ + colonyAddress, + wallet, + nativeToken, +}) => { + const { formatMessage } = useIntl(); + + const { userReputation } = useUserReputation({ + colonyAddress, + walletAddress: wallet?.address, + }); + + const { data } = useGetReputationMiningCycleMetadataQuery(); + const { lastCompletedAt } = data?.getReputationMiningCycleMetadata ?? {}; + + const [nextMiningCycleDate, setNextMiningCycleDate] = useState( + lastCompletedAt + ? getNextMiningCycleDate(new Date(lastCompletedAt ?? '')) + : null, + ); + + useEffect(() => { + const intervalTimer = setInterval(() => { + if (!nextMiningCycleDate) { + return; + } + + const halfIntervalAgo = new Date( + Date.now() - (UPDATE_INTERVAL / 2) * 1000, + ); + + if (nextMiningCycleDate < halfIntervalAgo) { + setNextMiningCycleDate(getNextMiningCycleDate(nextMiningCycleDate)); + } + }, UPDATE_INTERVAL * 1000); + + return () => clearInterval(intervalTimer); + }, [nextMiningCycleDate]); + + return ( +
+ +
+
+

+ {formatMessage({ id: 'userHub.reputationNextUpdate' })} +

+ + {nextMiningCycleDate ? ( + + ) : ( + '-' + )} + +
+
+

+ {formatMessage({ id: 'userHub.reputationDecayLabel' })} +

+ + {formatMessage( + { id: 'userHub.reputationDecayValue' }, + { + points: userReputation + ? getReputationDecayInNextDay( + userReputation, + nativeToken.decimals, + ) + : '0', + }, + )} + +
+
+
+ ); +}; + +PendingReputation.displayName = displayName; + +export default PendingReputation; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts new file mode 100644 index 00000000000..10737e3b7f6 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts @@ -0,0 +1 @@ +export { default } from './PendingReputation.tsx'; diff --git a/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/utils.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts similarity index 100% rename from src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/utils.ts rename to src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx new file mode 100644 index 00000000000..e42da76a115 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx @@ -0,0 +1,95 @@ +import { Star } from '@phosphor-icons/react'; +import clsx from 'clsx'; +import Decimal from 'decimal.js'; +import React, { type FC } from 'react'; +import { useIntl } from 'react-intl'; + +import useUserReputation from '~hooks/useUserReputation.ts'; +import Numeral from '~shared/Numeral/index.ts'; +import { calculatePercentageReputation, ZeroValue } from '~utils/reputation.ts'; +import { + getFormattedTokenValue, + getTokenDecimalsWithFallback, +} from '~utils/tokens.ts'; +import TitleLabel from '~v5/shared/TitleLabel/index.ts'; + +import balanceTabClasses from '../BalanceTab.styles.ts'; +import { type TotalReputationProps } from '../types.ts'; + +const displayName = + 'common.Extensions.UserHub.partials.ReputationTab.partials.TotalReputation'; + +const TotalReputation: FC = ({ + colonyAddress, + wallet, + nativeToken, +}) => { + const { formatMessage } = useIntl(); + const { userReputation, totalReputation } = useUserReputation({ + colonyAddress, + walletAddress: wallet?.address, + }); + + const percentageReputation = calculatePercentageReputation( + userReputation || '0', + totalReputation || '0', + ); + + const formattedReputationPoints = getFormattedTokenValue( + new Decimal(userReputation || 0).toString(), + getTokenDecimalsWithFallback(nativeToken.decimals), + ); + + return ( +
+
+ + {/* @BETA: add action */} + {/* */} +
+
+
+ + {formatMessage({ id: 'total.balance' })} + +
+ + {percentageReputation === ZeroValue.NearZero && ( + + {percentageReputation} + + )} + {percentageReputation && + percentageReputation !== ZeroValue.NearZero && ( + + )} +
+
+
+ + {formatMessage({ id: 'reputation.points' })} + + +
+
+
+ ); +}; + +TotalReputation.displayName = displayName; + +export default TotalReputation; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts index 091261a8921..c73f47e9a41 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts @@ -1,5 +1,29 @@ import { type UserHubTab } from '~common/Extensions/UserHub/types.ts'; +import { type Token } from '~types/graphql.ts'; +import { type ColonyWallet } from '~types/wallet.ts'; export interface BalanceTabProps { onTabChange: (newTab: UserHubTab) => void; } + +export interface BalanceProps extends Pick { + nativeToken: Token; + wallet: ColonyWallet; +} + +export interface ViewStakedButtonProps { + isFullSize?: boolean; + onClick: () => void; +} + +export interface TotalReputationProps { + colonyAddress: string; + wallet: ColonyWallet; + nativeToken: Token; +} + +export interface PendingReputationProps { + nativeToken: Token; + colonyAddress: string; + wallet: ColonyWallet; +} diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 881caaef227..d9f76b8902a 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -34,7 +34,7 @@ import { getAmountPerValue, getStreamingPaymentLimit, } from '~utils/streamingPayments.ts'; -import { getSelectedToken } from '~utils/tokens.ts'; +import { getNumeralTokenAmount, getSelectedToken } from '~utils/tokens.ts'; import { END_OPTIONS } from '~v5/common/ActionSidebar/partials/TimeRow/consts.ts'; import { DEFAULT_DATE_TIME_FORMAT } from '~v5/common/Fields/datepickers/common/consts.ts'; import MeatBallMenu from '~v5/shared/MeatBallMenu/index.ts'; @@ -54,7 +54,6 @@ import CreatedInRow from '../rows/CreatedIn.tsx'; import DecisionMethodRow from '../rows/DecisionMethod.tsx'; import DescriptionRow from '../rows/Description.tsx'; import TeamFromRow from '../rows/TeamFrom.tsx'; -import { getFormattedTokenAmount } from '../utils.ts'; import { type StreamingPaymentProps } from './types.ts'; @@ -105,7 +104,7 @@ const StreamingPayment: FC = ({ metadata: streamingPaymentMetadata, } = streamingPaymentData; const selectedToken = getSelectedToken(colony, tokenAddress || ''); - const formattedAmount = getFormattedTokenAmount( + const formattedAmount = getNumeralTokenAmount( amount || '1', selectedToken?.decimals, ); diff --git a/src/components/v5/common/CompletedAction/partials/rows/Amount.tsx b/src/components/v5/common/CompletedAction/partials/rows/Amount.tsx index e74aaa0cfd1..a6961fbab35 100644 --- a/src/components/v5/common/CompletedAction/partials/rows/Amount.tsx +++ b/src/components/v5/common/CompletedAction/partials/rows/Amount.tsx @@ -1,4 +1,4 @@ -import { Coins } from '@phosphor-icons/react'; +import { Coins, type Icon } from '@phosphor-icons/react'; import React from 'react'; import { type Token } from '~types/graphql.ts'; @@ -13,18 +13,30 @@ const displayName = 'v5.common.CompletedAction.partials.AmountRow'; interface AmountRowProps { amount: string; token?: Token; + rowLabel?: string; + tooltipContent?: string; + RowIcon?: Icon; } -const AmountRow = ({ amount, token }: AmountRowProps) => { +const AmountRow = ({ + amount, + token, + rowLabel, + tooltipContent, + RowIcon, +}: AmountRowProps) => { const formattedAmount = getNumeralTokenAmount(amount, token?.decimals); return ( {formattedAmount} From d76ee3cef1c202bfeca7a946b3c111f338cb4955 Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 7 Nov 2024 09:45:02 +0100 Subject: [PATCH 029/126] fixes after rebase --- .../BalanceInfoRow/BalanceInfoRow.tsx | 159 ------------------ .../partials/BalanceInfoRow/types.ts | 10 -- .../partials/PendingReputation/utils.ts | 31 ++++ .../TotalReputation/TotalReputation.tsx | 9 +- .../CreatedWithPermissionsInfo.tsx | 24 +-- 5 files changed, 46 insertions(+), 187 deletions(-) delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts create mode 100644 src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/utils.ts diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx deleted file mode 100644 index 9ff538a93f9..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx +++ /dev/null @@ -1,159 +0,0 @@ -import { ArrowDownRight, ArrowUpRight } from '@phosphor-icons/react'; -import React, { type FC, useMemo } from 'react'; -import { defineMessages } from 'react-intl'; - -import UserHubInfoSection from '~common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx'; -import { UserHubTab } from '~common/Extensions/UserHub/types.ts'; -import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import { useTokensModalContext } from '~context/TokensModalContext/TokensModalContext.ts'; -import { useGetUserTokenBalanceQuery } from '~gql'; -import Numeral from '~shared/Numeral/index.ts'; -import { formatText } from '~utils/intl.ts'; -import { multiLineTextEllipsis } from '~utils/strings.ts'; -import { getTokenDecimalsWithFallback } from '~utils/tokens.ts'; -import { TokensModalType } from '~v5/common/TokensModal/consts.ts'; -import Button from '~v5/shared/Button/index.ts'; - -import { type BalanceInfoRowProps } from './types.ts'; - -const displayName = - 'common.Extensions.UserHub.partials.BalanceTab.partials.BalanceInfoRow'; - -const MSG = defineMessages({ - title: { - id: `${displayName}.title`, - defaultMessage: 'Balance in this colony', - }, - viewStakes: { - id: `${displayName}.viewStakes`, - defaultMessage: 'View stakes', - }, - totalBalance: { - id: `${displayName}.totalBalance`, - defaultMessage: 'Total balance', - }, - activeFunds: { - id: `${displayName}.activeFunds`, - defaultMessage: 'Active funds', - }, - stakedFunds: { - id: `${displayName}.stakedFunds`, - defaultMessage: 'Staked funds', - }, - depositFunds: { - id: `${displayName}.depositFunds`, - defaultMessage: 'Deposit funds', - }, - withdrawalFunds: { - id: `${displayName}.withdrawalFunds`, - defaultMessage: 'Withdrawal funds', - }, -}); - -const BalanceInfoRow: FC = ({ - nativeToken, - wallet, - onTabChange, - className, -}) => { - const { - colony: { colonyAddress }, - } = useColonyContext(); - - const { data: tokenBalanceQueryData } = useGetUserTokenBalanceQuery({ - variables: { - input: { - walletAddress: wallet?.address ?? '', - tokenAddress: nativeToken?.tokenAddress ?? '', - colonyAddress, - }, - }, - skip: !wallet?.address || !nativeToken?.tokenAddress, - }); - const tokenBalanceData = tokenBalanceQueryData?.getUserTokenBalance; - - const tokenDecimals = useMemo( - () => getTokenDecimalsWithFallback(nativeToken?.decimals), - [nativeToken], - ); - - const { toggleOnTokensModal, setTokensModalType } = useTokensModalContext(); - - return ( - onTabChange(UserHubTab.Stakes), - }} - items={[ - { - key: '1', - label: formatText(MSG.totalBalance), - value: ( - - ), - }, - { - key: '2', - label: formatText(MSG.activeFunds), - value: ( - - ), - }, - { - key: '3', - label: formatText(MSG.stakedFunds), - value: ( - - ), - }, - ]} - > -
-
-
- ); -}; - -BalanceInfoRow.displayName = displayName; - -export default BalanceInfoRow; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts deleted file mode 100644 index 54b9737e5e9..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { type UserHubTab } from '~common/Extensions/UserHub/types.ts'; -import { type Token } from '~types/graphql.ts'; -import { type ColonyWallet } from '~types/wallet.ts'; - -export interface BalanceInfoRowProps { - nativeToken: Token; - wallet: ColonyWallet; - onTabChange: (newTab: UserHubTab) => void; - className?: string; -} diff --git a/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/utils.ts b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/utils.ts new file mode 100644 index 00000000000..94a2fdbd974 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/PendingReputation/utils.ts @@ -0,0 +1,31 @@ +import Decimal from 'decimal.js'; + +/** + * Function calculating and formatting the amount of reputation decay in the next day + */ +export const getReputationDecayInNextDay = ( + currentReputation: string, + nativeTokenDecimals: number, +) => { + const convertedReputation = new Decimal(currentReputation); + const nextDayDecay = convertedReputation.sub( + convertedReputation.mul(new Decimal(0.5).pow(1 / 90)), + ); + return nextDayDecay + .div(new Decimal(10).pow(nativeTokenDecimals)) + .round() + .toString(); +}; + +const REPUTATION_CYCLE_DURATION_IN_HOURS = 1; + +/** + * Function calculating the date of the next reputation mining cycle, based on the date of the last completed cycle + */ +export const getNextMiningCycleDate = (lastCompletedAt: Date) => { + const nextCycleTime = new Date(lastCompletedAt); + nextCycleTime.setHours( + nextCycleTime.getHours() + REPUTATION_CYCLE_DURATION_IN_HOURS, + ); + return nextCycleTime; +}; diff --git a/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/TotalReputation.tsx b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/TotalReputation.tsx index ab84ec357da..3d1f8ddcc2d 100644 --- a/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/TotalReputation.tsx +++ b/src/components/common/Extensions/UserHub/partials/ReputationTab/partials/TotalReputation/TotalReputation.tsx @@ -74,7 +74,6 @@ const TotalReputation: FC = ({ : percentageReputation || 0 } suffix=" %" - appearance={{ size: 'small' }} /> )} @@ -83,13 +82,7 @@ const TotalReputation: FC = ({ { key: '2', label: formatText(MSG.reputationPoints), - value: ( - - ), + value: , }, ]} /> diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/CreatedWithPermissionsInfo.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/CreatedWithPermissionsInfo.tsx index 601c13c6698..cccf2cf2d24 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/CreatedWithPermissionsInfo.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CreatedWithPermissionsInfo/CreatedWithPermissionsInfo.tsx @@ -5,6 +5,7 @@ import { formatDate } from '~utils/date.ts'; import { formatText } from '~utils/intl.ts'; import MenuWithStatusText from '~v5/shared/MenuWithStatusText/index.ts'; import { StatusTypes } from '~v5/shared/StatusText/consts.ts'; +import StatusText from '~v5/shared/StatusText/StatusText.tsx'; import UserPopover from '~v5/shared/UserPopover/UserPopover.tsx'; import { type CreatedWithPermissionsInfoProps } from './types.ts'; @@ -20,16 +21,19 @@ const CreatedWithPermissionsInfo: FC = ({ return ( + {formatText({ + id: 'action.executed.permissions.description', + })} + + } sections={[ { key: '1', From 4efeb322bd953c5145265393881de2afe871e419 Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Fri, 15 Nov 2024 10:06:18 +0100 Subject: [PATCH 030/126] fix: use streamingPaymentId --- .../hooks/useGetActionFormData.ts | 2 +- src/graphql/fragments/actions.graphql | 1 + src/graphql/generated.ts | 25 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts b/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts index 3ab30ef325c..4fa0521a8a5 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts @@ -48,7 +48,7 @@ const useGetActionFormData = (transactionId: string | undefined) => { amounts, refetchStreamingPayment, updateAmountsAndStatus, - } = useGetStreamingPaymentData(action?.expenditureId); + } = useGetStreamingPaymentData(action?.streamingPaymentId); const defaultValues = useMemo(() => { if (!action) { diff --git a/src/graphql/fragments/actions.graphql b/src/graphql/fragments/actions.graphql index d4c4dd3b812..766bbefb0ff 100644 --- a/src/graphql/fragments/actions.graphql +++ b/src/graphql/fragments/actions.graphql @@ -128,6 +128,7 @@ fragment ColonyAction on ColonyAction { members rootHash expenditureId + streamingPaymentId isMultiSig multiSigId multiSigData { diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 0ff5391816b..6bb4244522b 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -10936,7 +10936,11 @@ export type VotingReputationParamsInput = { voterRewardFraction: Scalars['String']; }; +<<<<<<< HEAD export type ColonyActionFragment = { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null }; +======= +export type ColonyActionFragment = { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null }; +>>>>>>> 965e8b3cf (fix: use streamingPaymentId) export type ApprovedTokenChangesFragment = { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array }; @@ -11038,11 +11042,15 @@ export type SafeTransactionDataFragment = { __typename?: 'SafeTransactionData', export type SafeTransactionFragment = { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null }; +<<<<<<< HEAD export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type: UserStakeType, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null }; export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; +======= +export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null }; +>>>>>>> 965e8b3cf (fix: use streamingPaymentId) export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; @@ -11296,14 +11304,22 @@ export type GetColonyActionsQueryVariables = Exact<{ }>; +<<<<<<< HEAD export type GetColonyActionsQuery = { __typename?: 'Query', getActionsByColony?: { __typename?: 'ModelColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null> } | null }; +======= +export type GetColonyActionsQuery = { __typename?: 'Query', getActionsByColony?: { __typename?: 'ModelColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null> } | null }; +>>>>>>> 965e8b3cf (fix: use streamingPaymentId) export type GetColonyActionQueryVariables = Exact<{ transactionHash: Scalars['ID']; }>; +<<<<<<< HEAD export type GetColonyActionQuery = { __typename?: 'Query', getColonyAction?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null }; +======= +export type GetColonyActionQuery = { __typename?: 'Query', getColonyAction?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null }; +>>>>>>> 965e8b3cf (fix: use streamingPaymentId) export type GetColonyMotionQueryVariables = Exact<{ id: Scalars['ID']; @@ -11348,6 +11364,7 @@ export type SearchActionsQueryVariables = Exact<{ }>; +<<<<<<< HEAD export type SearchActionsQuery = { __typename?: 'Query', searchColonyActions?: { __typename?: 'SearchableColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null> } | null }; export type OnCreateColonyActionMetadataSubscriptionVariables = Exact<{ [key: string]: never; }>; @@ -11359,6 +11376,9 @@ export type OnUpdateColonyActionMetadataSubscriptionVariables = Exact<{ [key: st export type OnUpdateColonyActionMetadataSubscription = { __typename?: 'Subscription', onUpdateColonyActionMetadata?: { __typename?: 'ColonyActionMetadata', id: string } | null }; +======= +export type SearchActionsQuery = { __typename?: 'Query', searchColonyActions?: { __typename?: 'SearchableColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null> } | null }; +>>>>>>> 965e8b3cf (fix: use streamingPaymentId) export type GetDomainBalanceQueryVariables = Exact<{ input: DomainBalanceArguments; @@ -11692,7 +11712,11 @@ export type GetUserStakesQueryVariables = Exact<{ }>; +<<<<<<< HEAD export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type: UserStakeType, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null } | null> } | null }; +======= +export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null } | null> } | null }; +>>>>>>> 965e8b3cf (fix: use streamingPaymentId) export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ colonyId: Scalars['ID']; @@ -12921,6 +12945,7 @@ export const ColonyActionFragmentDoc = gql` members rootHash expenditureId + streamingPaymentId isMultiSig multiSigId multiSigData { From b4a3d18336234fba0c2f7f955b5043a20ce6ce0a Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 12 Nov 2024 12:31:42 +0100 Subject: [PATCH 031/126] fix: remove validation for streaming payments when enter too big amount --- .../partials/forms/StreamingPaymentForm/hooks.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts index 7d07f67006b..c0a89c7e3ec 100644 --- a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts +++ b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts @@ -16,7 +16,6 @@ import getLastIndexFromPath from '~utils/getLastIndexFromPath.ts'; import { formatText } from '~utils/intl.ts'; import { amountGreaterThanValidation } from '~utils/validation/amountGreaterThanValidation.ts'; import { amountGreaterThanZeroValidation } from '~utils/validation/amountGreaterThanZeroValidation.ts'; -import { hasEnoughFundsValidation } from '~utils/validation/hasEnoughFundsValidation.ts'; import { ACTION_BASE_VALIDATION_SCHEMA } from '~v5/common/ActionSidebar/consts.ts'; import useActionFormBaseHook from '~v5/common/ActionSidebar/hooks/useActionFormBaseHook.ts'; import { AmountPerInterval } from '~v5/common/ActionSidebar/partials/AmountPerPeriodRow/types.ts'; @@ -51,18 +50,6 @@ export const useValidationSchema = (networkInverseFee: string | undefined) => { }, (value, context) => amountGreaterThanZeroValidation({ value, context, colony }), - ) - .test( - 'enough-tokens', - formatText({ id: 'errors.amount.notEnoughTokens' }) || '', - (value, context) => - hasEnoughFundsValidation({ - value, - context, - domainId: fromDomainId, - colony, - networkInverseFee, - }), ), tokenAddress: string().address().required(), limitTokenAddress: string().address(), From ae6fadec4ffbf7355a825cf256fa46051f51a6b5 Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 12 Nov 2024 16:21:14 +0100 Subject: [PATCH 032/126] fix: console error --- .../common/ActionSidebar/partials/AmountField/AmountField.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/v5/common/ActionSidebar/partials/AmountField/AmountField.tsx b/src/components/v5/common/ActionSidebar/partials/AmountField/AmountField.tsx index eb47844be4d..9d29ab2b8b6 100644 --- a/src/components/v5/common/ActionSidebar/partials/AmountField/AmountField.tsx +++ b/src/components/v5/common/ActionSidebar/partials/AmountField/AmountField.tsx @@ -72,8 +72,8 @@ const AmountField: FC = ({ tokenAddressController.value, ); - const [value, setValue] = useState( - field.value ? formatNumeral(field.value, formattingOptions) : undefined, + const [value, setValue] = useState( + field.value ? formatNumeral(field.value, formattingOptions) : '', ); const handleFieldChange = (e: ChangeEvent) => { From 07d17c27affe235643fe715997793cfcfde6cc8a Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 7 Nov 2024 11:51:04 +0100 Subject: [PATCH 033/126] feat: streaming payment redo --- .../StreamingPayment/StreamingPayment.tsx | 100 +++++++++++++++++- 1 file changed, 96 insertions(+), 4 deletions(-) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index d9f76b8902a..03225127f98 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -6,6 +6,7 @@ import { Copy, HandPalm, Prohibit, + Repeat, UserFocus, } from '@phosphor-icons/react'; import clsx from 'clsx'; @@ -17,6 +18,9 @@ import { generatePath } from 'react-router-dom'; import MeatballMenuCopyItem from '~common/ColonyActionsTable/partials/MeatballMenuCopyItem/MeatballMenuCopyItem.tsx'; import { ADDRESS_ZERO, APP_URL } from '~constants'; +import { Action } from '~constants/actions.ts'; +import { ONE_DAY_IN_SECONDS, ONE_HOUR_IN_SECONDS } from '~constants/time.ts'; +import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; import { ColonyActionType, StreamingPaymentEndCondition } from '~gql'; @@ -35,7 +39,22 @@ import { getStreamingPaymentLimit, } from '~utils/streamingPayments.ts'; import { getNumeralTokenAmount, getSelectedToken } from '~utils/tokens.ts'; -import { END_OPTIONS } from '~v5/common/ActionSidebar/partials/TimeRow/consts.ts'; +import { + ACTION_TYPE_FIELD_NAME, + AMOUNT_FIELD_NAME, + CREATED_IN_FIELD_NAME, + DECISION_METHOD_FIELD_NAME, + DESCRIPTION_FIELD_NAME, + FROM_FIELD_NAME, + RECIPIENT_FIELD_NAME, + TITLE_FIELD_NAME, + TOKEN_FIELD_NAME, +} from '~v5/common/ActionSidebar/consts.ts'; +import { + END_OPTIONS, + START_IMMEDIATELY_VALUE, +} from '~v5/common/ActionSidebar/partials/TimeRow/consts.ts'; +import { useDecisionMethod } from '~v5/common/CompletedAction/hooks.ts'; import { DEFAULT_DATE_TIME_FORMAT } from '~v5/common/Fields/datepickers/common/consts.ts'; import MeatBallMenu from '~v5/shared/MeatBallMenu/index.ts'; import { type MeatBallMenuItem } from '~v5/shared/MeatBallMenu/types.ts'; @@ -73,6 +92,13 @@ const StreamingPayment: FC = ({ const { colony } = useColonyContext(); const { user } = useAppContext(); const isMobile = useMobile(); + const { + actionSidebarToggle: [ + , + { toggleOn: toggleActionSidebarOn, toggleOff: toggleActionSidebarOff }, + ], + } = useActionSidebarContext(); + const decisionMethod = useDecisionMethod(action); const { loadingStreamingPayment, streamingPaymentData } = streamingPayment; @@ -91,7 +117,15 @@ const StreamingPayment: FC = ({ return null; } - const { metadata, initiatorUser, transactionHash } = action || {}; + const { + metadata, + initiatorUser, + transactionHash, + isMotion, + motionData, + annotation, + createdAt, + } = action || {}; const { customTitle = formatText(MSG.defaultTitle) } = metadata || {}; const { amount, @@ -109,12 +143,18 @@ const StreamingPayment: FC = ({ selectedToken?.decimals, ); const { endCondition } = streamingPaymentMetadata || {}; + const motionDomain = motionData?.motionDomain ?? null; const selectedTeam = findDomainByNativeId(nativeDomainId, colony); const limitAmount = getStreamingPaymentLimit({ streamingPayment: streamingPaymentData, }); + const formattedLimitAmount = getNumeralTokenAmount( + limitAmount || '0', + selectedToken?.decimals, + ); + const hasPermissions = addressHasRoles({ address: user?.walletAddress || '', colony, @@ -127,11 +167,63 @@ const StreamingPayment: FC = ({ streamingPaymentData.isCancelled && (user?.walletAddress === initiatorUser?.walletAddress || hasPermissions); + const isCustomInterval = + Number(interval) !== ONE_HOUR_IN_SECONDS && + Number(interval) !== ONE_DAY_IN_SECONDS && + Number(interval) !== ONE_DAY_IN_SECONDS * 7; + const startTimeDate = new Date(Number(startTime) * 1000); + + const isStartImmediately = + Math.abs(startTimeDate.getTime() - new Date(createdAt).getTime()) < 60000; + const meatballOptions: MeatBallMenuItem[] = [ + { + key: '1', + label: formatText({ id: 'completedAction.redoAction' }), + icon: Repeat, + onClick: () => { + toggleActionSidebarOff(); + + setTimeout(() => { + toggleActionSidebarOn({ + [TITLE_FIELD_NAME]: customTitle, + [ACTION_TYPE_FIELD_NAME]: Action.StreamingPayment, + [FROM_FIELD_NAME]: streamingPaymentData?.nativeDomainId, + [RECIPIENT_FIELD_NAME]: recipientAddress, + [AMOUNT_FIELD_NAME]: formattedAmount, + [TOKEN_FIELD_NAME]: selectedToken?.tokenAddress, + [DECISION_METHOD_FIELD_NAME]: decisionMethod, + starts: isStartImmediately + ? START_IMMEDIATELY_VALUE + : startTimeDate, + ends: + endCondition === StreamingPaymentEndCondition.FixedTime + ? new Date(Number(endTime) * 1000) + : endCondition, + period: isCustomInterval + ? { + custom: Number(interval), + interval: 'custom', + } + : { + interval: getAmountPerValue(interval).toLowerCase(), + }, + limit: limitAmount ? formattedLimitAmount : undefined, + limitTokenAddress: limitAmount + ? selectedToken?.tokenAddress + : undefined, + [CREATED_IN_FIELD_NAME]: isMotion + ? motionDomain?.nativeId + : streamingPaymentData?.nativeDomainId, + [DESCRIPTION_FIELD_NAME]: annotation?.message, + }); + }, 500); + }, + }, ...(showCancelOption ? [ { - key: '1', + key: '2', label: formatText({ id: 'expenditure.cancelPayment' }), icon: Prohibit, onClick: () => {}, @@ -139,7 +231,7 @@ const StreamingPayment: FC = ({ ] : []), { - key: '2', + key: '3', label: formatText({ id: 'expenditure.copyLink' }), renderItemWrapper: (itemWrapperProps, children) => ( Date: Thu, 7 Nov 2024 22:36:58 +0100 Subject: [PATCH 034/126] fix: use new id --- .../forms/StreamingPaymentForm/hooks.ts | 2 +- .../StreamingPayment/StreamingPayment.tsx | 3 +++ src/graphql/generated.ts | 24 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts index c0a89c7e3ec..4cf10b86ae5 100644 --- a/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts +++ b/src/components/v5/common/ActionSidebar/partials/forms/StreamingPaymentForm/hooks.ts @@ -180,7 +180,7 @@ export const useStreamingPayment = ( return getStreamingPaymentPayload(colony, values, blockTime); }), ), - [colony, networkInverseFee], + [colony, networkInverseFee, blockTime], ), }); }; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 03225127f98..67cdd320b64 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -142,6 +142,7 @@ const StreamingPayment: FC = ({ amount || '1', selectedToken?.decimals, ); + const { endCondition } = streamingPaymentMetadata || {}; const motionDomain = motionData?.motionDomain ?? null; @@ -176,6 +177,8 @@ const StreamingPayment: FC = ({ const isStartImmediately = Math.abs(startTimeDate.getTime() - new Date(createdAt).getTime()) < 60000; + // console.log({isStartImmediately, startTimeDate, createdAt}); + const meatballOptions: MeatBallMenuItem[] = [ { key: '1', diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 6bb4244522b..75a5868b6fe 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -10936,11 +10936,15 @@ export type VotingReputationParamsInput = { voterRewardFraction: Scalars['String']; }; +<<<<<<< HEAD <<<<<<< HEAD export type ColonyActionFragment = { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null }; ======= export type ColonyActionFragment = { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null }; >>>>>>> 965e8b3cf (fix: use streamingPaymentId) +======= +export type ColonyActionFragment = { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null }; +>>>>>>> c263efcff (fix: use new id) export type ApprovedTokenChangesFragment = { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array }; @@ -11042,6 +11046,7 @@ export type SafeTransactionDataFragment = { __typename?: 'SafeTransactionData', export type SafeTransactionFragment = { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null }; +<<<<<<< HEAD <<<<<<< HEAD export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type: UserStakeType, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null }; @@ -11051,6 +11056,9 @@ export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentCh ======= export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null }; >>>>>>> 965e8b3cf (fix: use streamingPaymentId) +======= +export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null }; +>>>>>>> c263efcff (fix: use new id) export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; @@ -11304,22 +11312,30 @@ export type GetColonyActionsQueryVariables = Exact<{ }>; +<<<<<<< HEAD <<<<<<< HEAD export type GetColonyActionsQuery = { __typename?: 'Query', getActionsByColony?: { __typename?: 'ModelColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null> } | null }; ======= export type GetColonyActionsQuery = { __typename?: 'Query', getActionsByColony?: { __typename?: 'ModelColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null> } | null }; >>>>>>> 965e8b3cf (fix: use streamingPaymentId) +======= +export type GetColonyActionsQuery = { __typename?: 'Query', getActionsByColony?: { __typename?: 'ModelColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null> } | null }; +>>>>>>> c263efcff (fix: use new id) export type GetColonyActionQueryVariables = Exact<{ transactionHash: Scalars['ID']; }>; +<<<<<<< HEAD <<<<<<< HEAD export type GetColonyActionQuery = { __typename?: 'Query', getColonyAction?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null }; ======= export type GetColonyActionQuery = { __typename?: 'Query', getColonyAction?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null }; >>>>>>> 965e8b3cf (fix: use streamingPaymentId) +======= +export type GetColonyActionQuery = { __typename?: 'Query', getColonyAction?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null }; +>>>>>>> c263efcff (fix: use new id) export type GetColonyMotionQueryVariables = Exact<{ id: Scalars['ID']; @@ -11364,6 +11380,7 @@ export type SearchActionsQueryVariables = Exact<{ }>; +<<<<<<< HEAD <<<<<<< HEAD export type SearchActionsQuery = { __typename?: 'Query', searchColonyActions?: { __typename?: 'SearchableColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null> } | null }; @@ -11379,6 +11396,9 @@ export type OnUpdateColonyActionMetadataSubscription = { __typename?: 'Subscript ======= export type SearchActionsQuery = { __typename?: 'Query', searchColonyActions?: { __typename?: 'SearchableColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null> } | null }; >>>>>>> 965e8b3cf (fix: use streamingPaymentId) +======= +export type SearchActionsQuery = { __typename?: 'Query', searchColonyActions?: { __typename?: 'SearchableColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null> } | null }; +>>>>>>> c263efcff (fix: use new id) export type GetDomainBalanceQueryVariables = Exact<{ input: DomainBalanceArguments; @@ -11712,11 +11732,15 @@ export type GetUserStakesQueryVariables = Exact<{ }>; +<<<<<<< HEAD <<<<<<< HEAD export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type: UserStakeType, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null } | null> } | null }; ======= export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null } | null> } | null }; >>>>>>> 965e8b3cf (fix: use streamingPaymentId) +======= +export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null } | null> } | null }; +>>>>>>> c263efcff (fix: use new id) export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ colonyId: Scalars['ID']; From 9db05f0a502d3053eae27d246143e308a1948ab5 Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Tue, 12 Nov 2024 10:35:01 +0100 Subject: [PATCH 035/126] fix: add transform to dep array --- .../v5/common/ActionSidebar/hooks/useActionFormBaseHook.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/v5/common/ActionSidebar/hooks/useActionFormBaseHook.ts b/src/components/v5/common/ActionSidebar/hooks/useActionFormBaseHook.ts index 02ec3dd95a9..4fe68961b9f 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useActionFormBaseHook.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useActionFormBaseHook.ts @@ -46,6 +46,7 @@ const useActionFormBaseHook: UseActionFormBaseHook = ({ validationSchema, actionType, id, + transform, primaryButton?.onClick, primaryButton?.type, onFormClose?.shouldShowCancelModal, From f2462f515a949fe618d002e4bd4eadb39bd1787b Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 14 Nov 2024 10:32:20 +0100 Subject: [PATCH 036/126] fix: remove clg --- .../partials/StreamingPayment/StreamingPayment.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 67cdd320b64..4e748b1892c 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -177,8 +177,6 @@ const StreamingPayment: FC = ({ const isStartImmediately = Math.abs(startTimeDate.getTime() - new Date(createdAt).getTime()) < 60000; - // console.log({isStartImmediately, startTimeDate, createdAt}); - const meatballOptions: MeatBallMenuItem[] = [ { key: '1', From 771d0690ce7c286505e3a37432646d7dd28c9fee Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Fri, 3 May 2024 16:02:10 +0100 Subject: [PATCH 037/126] Feat: Cancel streams using permissions --- .../api/colonycdapp/schema/schema.graphql | 12 ++++ src/graphql/generated.ts | 71 +++++++++++++++++++ src/redux/actionTypes.ts | 3 + 3 files changed, 86 insertions(+) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index e255dd51b8d..6944907dc88 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -3672,6 +3672,18 @@ type ApprovedTokenChanges { type ExpenditureSlotChanges { oldSlots: [ExpenditureSlot!]! newSlots: [ExpenditureSlot!]! + """ + ID of the associated streaming payment, if any + """ + streamingPaymentId: ID + @index( + name: "byStreamingPaymentId" + queryField: "getActionByStreamingPaymentId" + ) + """ + Streaming payment associated with the action, if any + """ + streamingPayment: StreamingPayment @hasOne(fields: ["streamingPaymentId"]) } type ColonyActionMetadata @model { diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 75a5868b6fe..8bebbbe0761 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -553,6 +553,7 @@ export type ColonyAction = { streamingPayment?: Maybe; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) /** @@ -570,6 +571,8 @@ export type ColonyAction = { ======= streamingPaymentChanges?: Maybe; >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> 94034ad97 (Feat: Cancel streams using permissions) /** ID of the associated streaming payment, if any */ streamingPaymentId?: Maybe; /** The target Domain of the action, if applicable */ @@ -663,9 +666,11 @@ export enum ColonyActionType { CancelExpenditure = 'CANCEL_EXPENDITURE', /** An action related to a motion to cancel an expenditure */ CancelExpenditureMotion = 'CANCEL_EXPENDITURE_MOTION', +<<<<<<< HEAD /** An action related to a multiSig to cancel a staked expenditure */ CancelStakedExpenditureMultisig = 'CANCEL_STAKED_EXPENDITURE_MULTISIG', <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD /** An action related to cancelling a streaming payment */ CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', @@ -673,10 +678,13 @@ export enum ColonyActionType { CancelStreamingPaymentMotion = 'CANCEL_STREAMING_PAYMENT_MOTION', <<<<<<< HEAD ======= +======= +>>>>>>> 94034ad97 (Feat: Cancel streams using permissions) ======= /** An action related to cancelling a streaming payment */ CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', >>>>>>> 93bc8196f (Feat: Cancel streams using permissions) +<<<<<<< HEAD >>>>>>> ce1397c62 (Feat: Cancel streams using permissions) ======= /** An action related to cancelling a streaming payment */ @@ -684,6 +692,8 @@ export enum ColonyActionType { >>>>>>> 881864577 (Add timestamp to streaming payment claims and code cleanup) ======= >>>>>>> 30262a729 (feat: fix permission proof for StreamingPayment cancel) +======= +>>>>>>> 94034ad97 (Feat: Cancel streams using permissions) /** An action related to editing a Colony's details */ ColonyEdit = 'COLONY_EDIT', /** An action related to editing a Colony's details via a motion */ @@ -1586,6 +1596,7 @@ export type CreateColonyActionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: InputMaybe; ======= @@ -1598,6 +1609,8 @@ export type CreateColonyActionInput = { ======= streamingPaymentChanges?: InputMaybe; >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> 94034ad97 (Feat: Cancel streams using permissions) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -10158,6 +10171,7 @@ export type UpdateColonyActionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: InputMaybe; ======= @@ -10170,6 +10184,8 @@ export type UpdateColonyActionInput = { ======= streamingPaymentChanges?: InputMaybe; >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> 94034ad97 (Feat: Cancel streams using permissions) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -11064,6 +11080,8 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null }; + export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; export type UserTokenBalanceDataFragment = { __typename?: 'GetUserTokenBalanceReturn', balance?: string | null, inactiveBalance?: string | null, lockedBalance?: string | null, activeBalance?: string | null, pendingBalance?: string | null }; @@ -11753,6 +11771,13 @@ export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ export type GetStreamingPaymentsByColonyQuery = { __typename?: 'Query', getStreamingPaymentsByColony?: { __typename?: 'ModelStreamingPaymentConnection', nextToken?: string | null, items: Array<{ __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null> } | null }; +export type GetStreamingPaymentQueryVariables = Exact<{ + streamingPaymentId: Scalars['ID']; +}>; + + +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null } | null }; + export type GetTokenByAddressQueryVariables = Exact<{ address: Scalars['ID']; }>; @@ -13033,6 +13058,7 @@ export const StreamingPaymentFragmentDoc = gql` endTime interval <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD tokenAddress token { @@ -13113,6 +13139,17 @@ export const StreamingPaymentChangesFragmentDoc = gql` } `; >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= + payouts { + ...ExpenditurePayout + } + metadata { + endCondition + limitAmount + } +} + ${ExpenditurePayoutFragmentDoc}`; +>>>>>>> 94034ad97 (Feat: Cancel streams using permissions) export const UserTokenBalanceDataFragmentDoc = gql` fragment UserTokenBalanceData on GetUserTokenBalanceReturn { balance @@ -16415,6 +16452,7 @@ export function useGetUserStakesLazyQuery(baseOptions?: Apollo.LazyQueryHookOpti export type GetUserStakesQueryHookResult = ReturnType; export type GetUserStakesLazyQueryHookResult = ReturnType; export type GetUserStakesQueryResult = Apollo.QueryResult; +<<<<<<< HEAD export const GetStreamingPaymentsByColonyDocument = gql` query GetStreamingPaymentsByColony($colonyId: ID!, $sortDirection: ModelSortDirection = ASC, $limit: Int = 100, $nextToken: String, $recipientAddress: String!) { getStreamingPaymentsByColony( @@ -16428,20 +16466,34 @@ export const GetStreamingPaymentsByColonyDocument = gql` ...StreamingPayment } nextToken +======= +export const GetStreamingPaymentDocument = gql` + query GetStreamingPayment($streamingPaymentId: ID!) { + getStreamingPayment(id: $streamingPaymentId) { + ...StreamingPayment +>>>>>>> 94034ad97 (Feat: Cancel streams using permissions) } } ${StreamingPaymentFragmentDoc}`; /** +<<<<<<< HEAD * __useGetStreamingPaymentsByColonyQuery__ * * To run a query within a React component, call `useGetStreamingPaymentsByColonyQuery` and pass it any options that fit your needs. * When your component renders, `useGetStreamingPaymentsByColonyQuery` returns an object from Apollo Client that contains loading, error, and data properties +======= + * __useGetStreamingPaymentQuery__ + * + * To run a query within a React component, call `useGetStreamingPaymentQuery` and pass it any options that fit your needs. + * When your component renders, `useGetStreamingPaymentQuery` returns an object from Apollo Client that contains loading, error, and data properties +>>>>>>> 94034ad97 (Feat: Cancel streams using permissions) * you can use to render your UI. * * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; * * @example +<<<<<<< HEAD * const { data, loading, error } = useGetStreamingPaymentsByColonyQuery({ * variables: { * colonyId: // value for 'colonyId' @@ -16463,6 +16515,25 @@ export function useGetStreamingPaymentsByColonyLazyQuery(baseOptions?: Apollo.La export type GetStreamingPaymentsByColonyQueryHookResult = ReturnType; export type GetStreamingPaymentsByColonyLazyQueryHookResult = ReturnType; export type GetStreamingPaymentsByColonyQueryResult = Apollo.QueryResult; +======= + * const { data, loading, error } = useGetStreamingPaymentQuery({ + * variables: { + * streamingPaymentId: // value for 'streamingPaymentId' + * }, + * }); + */ +export function useGetStreamingPaymentQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetStreamingPaymentDocument, options); + } +export function useGetStreamingPaymentLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetStreamingPaymentDocument, options); + } +export type GetStreamingPaymentQueryHookResult = ReturnType; +export type GetStreamingPaymentLazyQueryHookResult = ReturnType; +export type GetStreamingPaymentQueryResult = Apollo.QueryResult; +>>>>>>> 94034ad97 (Feat: Cancel streams using permissions) export const GetTokenByAddressDocument = gql` query GetTokenByAddress($address: ID!) { getTokenByAddress(id: $address) { diff --git a/src/redux/actionTypes.ts b/src/redux/actionTypes.ts index f335ccbc475..ef2adbbf775 100644 --- a/src/redux/actionTypes.ts +++ b/src/redux/actionTypes.ts @@ -346,4 +346,7 @@ export enum ActionTypes { CREATE_ARBITRARY_TRANSACTION = 'CREATE_ARBITRARY_TRANSACTION', CREATE_ARBITRARY_TRANSACTION_SUCCESS = 'CREATE_ARBITRARY_TRANSACTION_SUCCESS', CREATE_ARBITRARY_TRANSACTION_ERROR = 'CREATE_ARBITRARY_TRANSACTION_ERROR', + STREAMING_PAYMENT_CANCEL = 'STREAMING_PAYMENT_CANCEL', + STREAMING_PAYMENT_CANCEL_SUCCESS = 'STREAMING_PAYMENT_CANCEL_SUCCESS', + STREAMING_PAYMENT_CANCEL_ERROR = 'STREAMING_PAYMENT_CANCEL_ERROR', } From a798630cb72c7680297a1ee1986bcbb6db48157d Mon Sep 17 00:00:00 2001 From: Dave Creaser Date: Fri, 3 May 2024 17:30:01 +0100 Subject: [PATCH 038/126] Create claim streaming payment saga --- src/graphql/generated.ts | 14 +++++++------- src/hooks/useStreamingPayments.ts | 25 +++++++++++++++++++++++++ src/redux/actionTypes.ts | 3 +++ 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 src/hooks/useStreamingPayments.ts diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 8bebbbe0761..209a04c46c0 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -11627,6 +11627,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ }>; +<<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; export type GetStreamingPaymentQueryVariables = Exact<{ @@ -11635,6 +11636,9 @@ export type GetStreamingPaymentQueryVariables = Exact<{ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null } | null }; +>>>>>>> aca88e004 (Create claim streaming payment saga) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -11771,13 +11775,6 @@ export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ export type GetStreamingPaymentsByColonyQuery = { __typename?: 'Query', getStreamingPaymentsByColony?: { __typename?: 'ModelStreamingPaymentConnection', nextToken?: string | null, items: Array<{ __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null> } | null }; -export type GetStreamingPaymentQueryVariables = Exact<{ - streamingPaymentId: Scalars['ID']; -}>; - - -export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null } | null }; - export type GetTokenByAddressQueryVariables = Exact<{ address: Scalars['ID']; }>; @@ -16453,6 +16450,7 @@ export type GetUserStakesQueryHookResult = ReturnType; export type GetUserStakesQueryResult = Apollo.QueryResult; <<<<<<< HEAD +<<<<<<< HEAD export const GetStreamingPaymentsByColonyDocument = gql` query GetStreamingPaymentsByColony($colonyId: ID!, $sortDirection: ModelSortDirection = ASC, $limit: Int = 100, $nextToken: String, $recipientAddress: String!) { getStreamingPaymentsByColony( @@ -16534,6 +16532,8 @@ export type GetStreamingPaymentQueryHookResult = ReturnType; export type GetStreamingPaymentQueryResult = Apollo.QueryResult; >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) +======= +>>>>>>> aca88e004 (Create claim streaming payment saga) export const GetTokenByAddressDocument = gql` query GetTokenByAddress($address: ID!) { getTokenByAddress(id: $address) { diff --git a/src/hooks/useStreamingPayments.ts b/src/hooks/useStreamingPayments.ts new file mode 100644 index 00000000000..deaa2c74aad --- /dev/null +++ b/src/hooks/useStreamingPayments.ts @@ -0,0 +1,25 @@ +import { Extension } from '@colony/colony-js'; + +import useExtensionData from '~hooks/useExtensionData.ts'; +import { isInstalledExtensionData } from '~utils/extensions.ts'; + +const useStreamingPayments = () => { + const { extensionData, loading: extensionLoading } = useExtensionData( + Extension.StreamingPayments, + ); + + const getStreamingPaymentsAddress = () => { + if (!extensionData || !isInstalledExtensionData(extensionData)) { + return undefined; + } + + return extensionData.address; + }; + + return { + isLoading: extensionLoading, + streamingPaymentsAddress: getStreamingPaymentsAddress(), + }; +}; + +export default useStreamingPayments; diff --git a/src/redux/actionTypes.ts b/src/redux/actionTypes.ts index ef2adbbf775..e1f7e937f6d 100644 --- a/src/redux/actionTypes.ts +++ b/src/redux/actionTypes.ts @@ -349,4 +349,7 @@ export enum ActionTypes { STREAMING_PAYMENT_CANCEL = 'STREAMING_PAYMENT_CANCEL', STREAMING_PAYMENT_CANCEL_SUCCESS = 'STREAMING_PAYMENT_CANCEL_SUCCESS', STREAMING_PAYMENT_CANCEL_ERROR = 'STREAMING_PAYMENT_CANCEL_ERROR', + STREAMING_PAYMENT_CLAIM = 'STREAMING_PAYMENT_CLAIM', + STREAMING_PAYMENT_CLAIM_SUCCESS = 'STREAMING_PAYMENT_CLAIM_SUCCESS', + STREAMING_PAYMENT_CLAIM_ERROR = 'STREAMING_PAYMENT_CLAIM_ERROR', } From b6f86804b1da946349bd74ee1968d24344e5d5f5 Mon Sep 17 00:00:00 2001 From: Dave Creaser Date: Tue, 7 May 2024 11:37:45 +0100 Subject: [PATCH 039/126] Add streaming payment claims --- .../api/colonycdapp/schema/schema.graphql | 5 +++ src/graphql/generated.ts | 35 ++++++++++++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index 6944907dc88..dd126195bf5 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4253,6 +4253,11 @@ type StreamingPaymentClaim { timestamp: String! } +type StreamingPaymentClaim { + tokenAddress: ID! + amount: String! +} + """ Defines an annotation for actions, motions and decisions """ diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 209a04c46c0..140d12f56b8 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -2023,6 +2023,7 @@ export type CreateSafeTransactionInput = { export type CreateStreamingPaymentInput = { <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; @@ -2031,6 +2032,9 @@ export type CreateStreamingPaymentInput = { ======= claims?: InputMaybe>; >>>>>>> e64580ff0 (Add streaming payment claims) +======= + claims?: InputMaybe>; +>>>>>>> 6604c3e35 (Add streaming payment claims) createdAt?: InputMaybe; <<<<<<< HEAD creatorAddress: Scalars['ID']; @@ -8824,6 +8828,7 @@ export type StreamingPayment = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; @@ -8837,6 +8842,9 @@ export type StreamingPayment = { ======= claims?: Maybe>; >>>>>>> e64580ff0 (Add streaming payment claims) +======= + claims?: Maybe>; +>>>>>>> 6604c3e35 (Add streaming payment claims) createdAt: Scalars['AWSDateTime']; <<<<<<< HEAD /** Address of the stream creator, can be a user or an extension */ @@ -8888,6 +8896,7 @@ export type StreamingPaymentActionsArgs = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) @@ -8993,6 +9002,12 @@ export type StreamingPaymentClaim = { ======= timestamp: Scalars['String']; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= +export type StreamingPaymentClaim = { + __typename?: 'StreamingPaymentClaim'; + amount: Scalars['String']; + tokenAddress: Scalars['ID']; +>>>>>>> 6604c3e35 (Add streaming payment claims) }; export type StreamingPaymentClaimInput = { @@ -9000,6 +9015,7 @@ export type StreamingPaymentClaimInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) timestamp: Scalars['String']; @@ -9018,6 +9034,11 @@ export type StreamingPaymentClaimInput = { }; >>>>>>> e64580ff0 (Add streaming payment claims) +======= + tokenAddress: Scalars['ID']; +}; + +>>>>>>> 6604c3e35 (Add streaming payment claims) export enum StreamingPaymentEndCondition { FixedTime = 'FIXED_TIME', LimitReached = 'LIMIT_REACHED', @@ -10604,6 +10625,7 @@ export type UpdateSafeTransactionInput = { export type UpdateStreamingPaymentInput = { <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) amount?: InputMaybe; @@ -10612,6 +10634,9 @@ export type UpdateStreamingPaymentInput = { ======= claims?: InputMaybe>; >>>>>>> e64580ff0 (Add streaming payment claims) +======= + claims?: InputMaybe>; +>>>>>>> 6604c3e35 (Add streaming payment claims) createdAt?: InputMaybe; <<<<<<< HEAD creatorAddress?: InputMaybe; @@ -11080,7 +11105,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11627,6 +11652,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ }>; +<<<<<<< HEAD <<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; @@ -11639,6 +11665,9 @@ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayme ======= export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null } | null }; >>>>>>> aca88e004 (Create claim streaming payment saga) +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string }> | null } | null }; +>>>>>>> 6604c3e35 (Add streaming payment claims) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -13144,6 +13173,10 @@ export const StreamingPaymentChangesFragmentDoc = gql` endCondition limitAmount } + claims { + amount + tokenAddress + } } ${ExpenditurePayoutFragmentDoc}`; >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) From 71242bf2917dc66801effe4adf00a7562051576b Mon Sep 17 00:00:00 2001 From: Dave Creaser Date: Wed, 8 May 2024 09:59:55 +0100 Subject: [PATCH 040/126] Add timestamp to streaming payment claims and code cleanup --- .../api/colonycdapp/schema/schema.graphql | 1 + .../fragments/streamingPayment.graphql | 1 + src/graphql/generated.ts | 18 +++++++++++-- src/hooks/useStreamingPayments.ts | 25 ------------------- 4 files changed, 18 insertions(+), 27 deletions(-) delete mode 100644 src/hooks/useStreamingPayments.ts diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index dd126195bf5..44d0c9e4813 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4256,6 +4256,7 @@ type StreamingPaymentClaim { type StreamingPaymentClaim { tokenAddress: ID! amount: String! + timestamp: AWSTimestamp! } """ diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index ea7ce0c271e..99d5364908d 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -30,6 +30,7 @@ fragment StreamingPayment on StreamingPayment { amount timestamp tokenAddress + timestamp } } diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 140d12f56b8..5d23914f5d8 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -666,11 +666,11 @@ export enum ColonyActionType { CancelExpenditure = 'CANCEL_EXPENDITURE', /** An action related to a motion to cancel an expenditure */ CancelExpenditureMotion = 'CANCEL_EXPENDITURE_MOTION', -<<<<<<< HEAD /** An action related to a multiSig to cancel a staked expenditure */ CancelStakedExpenditureMultisig = 'CANCEL_STAKED_EXPENDITURE_MULTISIG', <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD /** An action related to cancelling a streaming payment */ CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', @@ -694,6 +694,10 @@ export enum ColonyActionType { >>>>>>> 30262a729 (feat: fix permission proof for StreamingPayment cancel) ======= >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) +======= + /** An action related to cancelling a streaming payment */ + CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', +>>>>>>> 3cb2283e8 (Add timestamp to streaming payment claims and code cleanup) /** An action related to editing a Colony's details */ ColonyEdit = 'COLONY_EDIT', /** An action related to editing a Colony's details via a motion */ @@ -9006,6 +9010,7 @@ export type StreamingPaymentClaim = { export type StreamingPaymentClaim = { __typename?: 'StreamingPaymentClaim'; amount: Scalars['String']; + timestamp: Scalars['AWSTimestamp']; tokenAddress: Scalars['ID']; >>>>>>> 6604c3e35 (Add streaming payment claims) }; @@ -9016,6 +9021,7 @@ export type StreamingPaymentClaimInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) timestamp: Scalars['String']; @@ -9035,6 +9041,9 @@ export type StreamingPaymentClaimInput = { >>>>>>> e64580ff0 (Add streaming payment claims) ======= +======= + timestamp: Scalars['AWSTimestamp']; +>>>>>>> 3cb2283e8 (Add timestamp to streaming payment claims and code cleanup) tokenAddress: Scalars['ID']; }; @@ -11105,7 +11114,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11652,6 +11661,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ }>; +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; @@ -11668,6 +11678,9 @@ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayme ======= export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string }> | null } | null }; >>>>>>> 6604c3e35 (Add streaming payment claims) +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null } | null }; +>>>>>>> 3cb2283e8 (Add timestamp to streaming payment claims and code cleanup) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -13176,6 +13189,7 @@ export const StreamingPaymentChangesFragmentDoc = gql` claims { amount tokenAddress + timestamp } } ${ExpenditurePayoutFragmentDoc}`; diff --git a/src/hooks/useStreamingPayments.ts b/src/hooks/useStreamingPayments.ts deleted file mode 100644 index deaa2c74aad..00000000000 --- a/src/hooks/useStreamingPayments.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Extension } from '@colony/colony-js'; - -import useExtensionData from '~hooks/useExtensionData.ts'; -import { isInstalledExtensionData } from '~utils/extensions.ts'; - -const useStreamingPayments = () => { - const { extensionData, loading: extensionLoading } = useExtensionData( - Extension.StreamingPayments, - ); - - const getStreamingPaymentsAddress = () => { - if (!extensionData || !isInstalledExtensionData(extensionData)) { - return undefined; - } - - return extensionData.address; - }; - - return { - isLoading: extensionLoading, - streamingPaymentsAddress: getStreamingPaymentsAddress(), - }; -}; - -export default useStreamingPayments; From 1d1de6dae065d0c16704265a88e849a53a155b46 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Fri, 7 Jun 2024 00:15:01 +0100 Subject: [PATCH 041/126] Schema update: adjust streaming payment model for a single token --- .../api/colonycdapp/schema/schema.graphql | 5 ++ src/graphql/generated.ts | 48 ++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index 44d0c9e4813..a9800018ed4 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4148,10 +4148,15 @@ type StreamingPayment @model @searchable { startTime: String! endTime: String! interval: String! +<<<<<<< HEAD tokenAddress: ID! token: Token @hasOne(fields: ["tokenAddress"]) amount: String! payouts: [ExpenditurePayout!] +======= + tokenAddress: String! + amount: String! +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) claims: [StreamingPaymentClaim!] metadata: StreamingPaymentMetadata @hasOne(fields: ["id"]) """ diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 5d23914f5d8..d5f8fe11f26 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -2028,8 +2028,11 @@ export type CreateStreamingPaymentInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) +======= +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; claims?: InputMaybe>; colonyId: Scalars['ID']; @@ -2062,6 +2065,7 @@ export type CreateStreamingPaymentInput = { <<<<<<< HEAD ======= startTime: Scalars['AWSTimestamp']; +<<<<<<< HEAD ======= startTime: Scalars['String']; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) @@ -2069,6 +2073,9 @@ export type CreateStreamingPaymentInput = { >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= >>>>>>> 009bebeca (Feat: Remove limit amount from streamingPaymentMetadata) +======= + tokenAddress: Scalars['String']; +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) }; export type CreateStreamingPaymentMetadataInput = { @@ -4343,6 +4350,7 @@ export type ModelStreamingPaymentConditionInput = { <<<<<<< HEAD ======= startTime?: InputMaybe; +<<<<<<< HEAD ======= startTime?: InputMaybe; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) @@ -4350,6 +4358,9 @@ export type ModelStreamingPaymentConditionInput = { >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= >>>>>>> 009bebeca (Feat: Remove limit amount from streamingPaymentMetadata) +======= + tokenAddress?: InputMaybe; +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) }; export type ModelStreamingPaymentConnection = { @@ -4392,6 +4403,7 @@ export type ModelStreamingPaymentFilterInput = { <<<<<<< HEAD ======= startTime?: InputMaybe; +<<<<<<< HEAD ======= startTime?: InputMaybe; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) @@ -4399,6 +4411,9 @@ export type ModelStreamingPaymentFilterInput = { >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= >>>>>>> 009bebeca (Feat: Remove limit amount from streamingPaymentMetadata) +======= + tokenAddress?: InputMaybe; +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) }; export type ModelStreamingPaymentMetadataConditionInput = { @@ -4971,6 +4986,7 @@ export type ModelSubscriptionStreamingPaymentFilterInput = { <<<<<<< HEAD ======= startTime?: InputMaybe; +<<<<<<< HEAD ======= startTime?: InputMaybe; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) @@ -4978,6 +4994,9 @@ export type ModelSubscriptionStreamingPaymentFilterInput = { >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= >>>>>>> 009bebeca (Feat: Remove limit amount from streamingPaymentMetadata) +======= + tokenAddress?: InputMaybe; +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) }; export type ModelSubscriptionStreamingPaymentMetadataFilterInput = { @@ -8833,8 +8852,11 @@ export type StreamingPayment = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) +======= +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; claims?: Maybe>; /** The Colony to which the expenditure belongs */ @@ -8879,6 +8901,7 @@ export type StreamingPayment = { <<<<<<< HEAD ======= startTime: Scalars['AWSTimestamp']; +<<<<<<< HEAD ======= startTime: Scalars['String']; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) @@ -8886,6 +8909,9 @@ export type StreamingPayment = { >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= >>>>>>> 009bebeca (Feat: Remove limit amount from streamingPaymentMetadata) +======= + tokenAddress: Scalars['String']; +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) updatedAt: Scalars['AWSDateTime']; }; @@ -10635,8 +10661,11 @@ export type UpdateStreamingPaymentInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) +======= +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) amount?: InputMaybe; claims?: InputMaybe>; colonyId?: InputMaybe; @@ -10669,6 +10698,7 @@ export type UpdateStreamingPaymentInput = { <<<<<<< HEAD ======= startTime?: InputMaybe; +<<<<<<< HEAD ======= startTime?: InputMaybe; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) @@ -10676,6 +10706,9 @@ export type UpdateStreamingPaymentInput = { >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= >>>>>>> 009bebeca (Feat: Remove limit amount from streamingPaymentMetadata) +======= + tokenAddress?: InputMaybe; +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) }; export type UpdateStreamingPaymentMetadataInput = { @@ -11114,7 +11147,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11664,6 +11697,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; export type GetStreamingPaymentQueryVariables = Exact<{ @@ -11681,6 +11715,9 @@ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayme ======= export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, payouts?: Array<{ __typename?: 'ExpenditurePayout', tokenAddress: string, amount: string, isClaimed: boolean, networkFee?: string | null }> | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null } | null }; >>>>>>> 3cb2283e8 (Add timestamp to streaming payment claims and code cleanup) +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null } | null }; +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -13098,6 +13135,7 @@ export const StreamingPaymentFragmentDoc = gql` interval <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD tokenAddress token { @@ -13182,6 +13220,10 @@ export const StreamingPaymentChangesFragmentDoc = gql` payouts { ...ExpenditurePayout } +======= + tokenAddress + amount +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) metadata { endCondition limitAmount @@ -13192,8 +13234,12 @@ export const StreamingPaymentChangesFragmentDoc = gql` timestamp } } +<<<<<<< HEAD ${ExpenditurePayoutFragmentDoc}`; >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) +======= + `; +>>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) export const UserTokenBalanceDataFragmentDoc = gql` fragment UserTokenBalanceData on GetUserTokenBalanceReturn { balance From d24df6bd60030e529aa64f7f48d18a5befcec400 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Fri, 7 Jun 2024 00:26:51 +0100 Subject: [PATCH 042/126] Schema update: remove token address from StreamingPaymentClaim --- .../backend/api/colonycdapp/schema/schema.graphql | 1 - src/graphql/fragments/streamingPayment.graphql | 1 - src/graphql/generated.ts | 13 +++++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index a9800018ed4..edae726f5dd 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4259,7 +4259,6 @@ type StreamingPaymentClaim { } type StreamingPaymentClaim { - tokenAddress: ID! amount: String! timestamp: AWSTimestamp! } diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index 99d5364908d..ea7ce0c271e 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -30,7 +30,6 @@ fragment StreamingPayment on StreamingPayment { amount timestamp tokenAddress - timestamp } } diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index d5f8fe11f26..9469e10e1f1 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -9037,8 +9037,11 @@ export type StreamingPaymentClaim = { __typename?: 'StreamingPaymentClaim'; amount: Scalars['String']; timestamp: Scalars['AWSTimestamp']; +<<<<<<< HEAD tokenAddress: Scalars['ID']; >>>>>>> 6604c3e35 (Add streaming payment claims) +======= +>>>>>>> d686e700c (Schema update: remove token address from StreamingPaymentClaim) }; export type StreamingPaymentClaimInput = { @@ -9059,6 +9062,7 @@ export type StreamingPaymentClaimInput = { ======= timestamp: Scalars['AWSTimestamp']; <<<<<<< HEAD +<<<<<<< HEAD >>>>>>> 881864577 (Add timestamp to streaming payment claims and code cleanup) tokenAddress: Scalars['ID']; ======= @@ -9071,6 +9075,8 @@ export type StreamingPaymentClaimInput = { timestamp: Scalars['AWSTimestamp']; >>>>>>> 3cb2283e8 (Add timestamp to streaming payment claims and code cleanup) tokenAddress: Scalars['ID']; +======= +>>>>>>> d686e700c (Schema update: remove token address from StreamingPaymentClaim) }; >>>>>>> 6604c3e35 (Add streaming payment claims) @@ -11147,7 +11153,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: number }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11698,6 +11704,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; export type GetStreamingPaymentQueryVariables = Exact<{ @@ -11718,6 +11725,9 @@ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayme ======= export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, tokenAddress: string, timestamp: number }> | null } | null }; >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: number }> | null } | null }; +>>>>>>> d686e700c (Schema update: remove token address from StreamingPaymentClaim) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -13230,7 +13240,6 @@ export const StreamingPaymentChangesFragmentDoc = gql` } claims { amount - tokenAddress timestamp } } From 25a44157991cfd1cd332482938522ecfbced0621 Mon Sep 17 00:00:00 2001 From: Romeo Ledesma Date: Tue, 11 Jun 2024 12:42:15 +0100 Subject: [PATCH 043/126] feat: add a ColonyActionType enum entry for cancel and waive --- src/graphql/generated.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 9469e10e1f1..77d0cec063a 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -649,6 +649,7 @@ export enum ColonyActionType { AddVerifiedMembersMotion = 'ADD_VERIFIED_MEMBERS_MOTION', AddVerifiedMembersMultisig = 'ADD_VERIFIED_MEMBERS_MULTISIG', <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD /** An action related to cancelling and waiving a streaming payment */ CancelAndWaiveStreamingPayment = 'CANCEL_AND_WAIVE_STREAMING_PAYMENT', @@ -662,6 +663,12 @@ export enum ColonyActionType { /** An action related to cancelling and waiving a streaming payment */ CancelAndWaiveStreamingPayment = 'CANCEL_AND_WAIVE_STREAMING_PAYMENT', >>>>>>> 30262a729 (feat: fix permission proof for StreamingPayment cancel) +======= + /** An action related to arbitrary transaction */ + ArbitraryTx = 'ARBITRARY_TX', + /** An action related to cancelling and waiving a streaming payment */ + CancelAndWaiveStreamingPayment = 'CANCEL_AND_WAIVE_STREAMING_PAYMENT', +>>>>>>> f82adefc8 (feat: add a ColonyActionType enum entry for cancel and waive) /** An action related to canceling an expenditure */ CancelExpenditure = 'CANCEL_EXPENDITURE', /** An action related to a motion to cancel an expenditure */ From 6a568d34936eff3cde28c20bbd347d272b276b2a Mon Sep 17 00:00:00 2001 From: Dave Creaser Date: Fri, 14 Jun 2024 15:17:41 +0100 Subject: [PATCH 044/126] Set correct end time for streaming payments based on end condition --- .../api/colonycdapp/schema/schema.graphql | 2 +- src/graphql/generated.ts | 55 ++++++++++++++++++- .../expenditures/createStreamingPayment.ts | 37 +++++++++++++ 3 files changed, 92 insertions(+), 2 deletions(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index edae726f5dd..df77aec74b5 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4260,7 +4260,7 @@ type StreamingPaymentClaim { type StreamingPaymentClaim { amount: String! - timestamp: AWSTimestamp! + timestamp: String! } """ diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 77d0cec063a..4e1915b85ed 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -2050,10 +2050,13 @@ export type CreateStreamingPaymentInput = { claims?: InputMaybe>; >>>>>>> 6604c3e35 (Add streaming payment claims) createdAt?: InputMaybe; +<<<<<<< HEAD <<<<<<< HEAD creatorAddress: Scalars['ID']; ======= >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) endTime: Scalars['String']; id?: InputMaybe; interval: Scalars['String']; @@ -2066,6 +2069,7 @@ export type CreateStreamingPaymentInput = { nativeId: Scalars['Int']; recipientAddress: Scalars['String']; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD startTime: Scalars['String']; tokenAddress: Scalars['ID']; @@ -2076,6 +2080,9 @@ export type CreateStreamingPaymentInput = { ======= startTime: Scalars['String']; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= + startTime: Scalars['String']; +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) tokenAddress: Scalars['String']; >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= @@ -4334,10 +4341,13 @@ export type ModelStreamingPaymentConditionInput = { and?: InputMaybe>>; colonyId?: InputMaybe; createdAt?: InputMaybe; +<<<<<<< HEAD <<<<<<< HEAD creatorAddress?: InputMaybe; ======= >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) endTime?: InputMaybe; interval?: InputMaybe; isCancelled?: InputMaybe; @@ -4351,6 +4361,7 @@ export type ModelStreamingPaymentConditionInput = { or?: InputMaybe>>; recipientAddress?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD startTime?: InputMaybe; tokenAddress?: InputMaybe; @@ -4361,6 +4372,9 @@ export type ModelStreamingPaymentConditionInput = { ======= startTime?: InputMaybe; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= + startTime?: InputMaybe; +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) tokenAddress?: InputMaybe; >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= @@ -4386,10 +4400,13 @@ export type ModelStreamingPaymentFilterInput = { and?: InputMaybe>>; colonyId?: InputMaybe; createdAt?: InputMaybe; +<<<<<<< HEAD <<<<<<< HEAD creatorAddress?: InputMaybe; ======= >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) endTime?: InputMaybe; id?: InputMaybe; interval?: InputMaybe; @@ -4404,6 +4421,7 @@ export type ModelStreamingPaymentFilterInput = { or?: InputMaybe>>; recipientAddress?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD startTime?: InputMaybe; tokenAddress?: InputMaybe; @@ -4414,6 +4432,9 @@ export type ModelStreamingPaymentFilterInput = { ======= startTime?: InputMaybe; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= + startTime?: InputMaybe; +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) tokenAddress?: InputMaybe; >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= @@ -4970,10 +4991,13 @@ export type ModelSubscriptionStreamingPaymentFilterInput = { and?: InputMaybe>>; colonyId?: InputMaybe; createdAt?: InputMaybe; +<<<<<<< HEAD <<<<<<< HEAD creatorAddress?: InputMaybe; ======= >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) endTime?: InputMaybe; id?: InputMaybe; interval?: InputMaybe; @@ -4987,6 +5011,7 @@ export type ModelSubscriptionStreamingPaymentFilterInput = { or?: InputMaybe>>; recipientAddress?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD startTime?: InputMaybe; tokenAddress?: InputMaybe; @@ -4997,6 +5022,9 @@ export type ModelSubscriptionStreamingPaymentFilterInput = { ======= startTime?: InputMaybe; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= + startTime?: InputMaybe; +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) tokenAddress?: InputMaybe; >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= @@ -8879,11 +8907,14 @@ export type StreamingPayment = { claims?: Maybe>; >>>>>>> 6604c3e35 (Add streaming payment claims) createdAt: Scalars['AWSDateTime']; +<<<<<<< HEAD <<<<<<< HEAD /** Address of the stream creator, can be a user or an extension */ creatorAddress: Scalars['ID']; ======= >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) endTime: Scalars['String']; id: Scalars['ID']; interval: Scalars['String']; @@ -8901,6 +8932,7 @@ export type StreamingPayment = { nativeId: Scalars['Int']; recipientAddress: Scalars['String']; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD startTime: Scalars['String']; token?: Maybe; @@ -8912,6 +8944,9 @@ export type StreamingPayment = { ======= startTime: Scalars['String']; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= + startTime: Scalars['String']; +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) tokenAddress: Scalars['String']; >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= @@ -9043,12 +9078,16 @@ export type StreamingPaymentClaim = { export type StreamingPaymentClaim = { __typename?: 'StreamingPaymentClaim'; amount: Scalars['String']; +<<<<<<< HEAD timestamp: Scalars['AWSTimestamp']; <<<<<<< HEAD tokenAddress: Scalars['ID']; >>>>>>> 6604c3e35 (Add streaming payment claims) ======= >>>>>>> d686e700c (Schema update: remove token address from StreamingPaymentClaim) +======= + timestamp: Scalars['String']; +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) }; export type StreamingPaymentClaimInput = { @@ -9058,8 +9097,11 @@ export type StreamingPaymentClaimInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) timestamp: Scalars['String']; }; @@ -10689,10 +10731,13 @@ export type UpdateStreamingPaymentInput = { claims?: InputMaybe>; >>>>>>> 6604c3e35 (Add streaming payment claims) createdAt?: InputMaybe; +<<<<<<< HEAD <<<<<<< HEAD creatorAddress?: InputMaybe; ======= >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) endTime?: InputMaybe; id: Scalars['ID']; interval?: InputMaybe; @@ -10705,6 +10750,7 @@ export type UpdateStreamingPaymentInput = { nativeId?: InputMaybe; recipientAddress?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD startTime?: InputMaybe; tokenAddress?: InputMaybe; @@ -10715,6 +10761,9 @@ export type UpdateStreamingPaymentInput = { ======= startTime?: InputMaybe; >>>>>>> fded8646f (Set correct end time for streaming payments based on end condition) +======= + startTime?: InputMaybe; +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) tokenAddress?: InputMaybe; >>>>>>> f5e3c4817 (Schema update: adjust streaming payment model for a single token) ======= @@ -11160,7 +11209,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: number }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11712,6 +11761,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; export type GetStreamingPaymentQueryVariables = Exact<{ @@ -11735,6 +11785,9 @@ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayme ======= export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: number, endTime: number, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: number }> | null } | null }; >>>>>>> d686e700c (Schema update: remove token address from StreamingPaymentClaim) +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; +>>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; diff --git a/src/redux/sagas/expenditures/createStreamingPayment.ts b/src/redux/sagas/expenditures/createStreamingPayment.ts index da7c473736c..497676c8b41 100644 --- a/src/redux/sagas/expenditures/createStreamingPayment.ts +++ b/src/redux/sagas/expenditures/createStreamingPayment.ts @@ -161,6 +161,43 @@ function* createStreamingPaymentAction({ break; } + let realEndTimestamp: BigNumber; + + switch (endCondition) { + case StreamingPaymentEndCondition.FixedTime: + if (endTimestamp === undefined) { + throw new Error( + 'endTimestamp is required for FixedTime endCondition', + ); + } + + realEndTimestamp = endTimestamp; + break; + + case StreamingPaymentEndCondition.LimitReached: + if (limitAmount === undefined) { + throw new Error( + 'limitAmount is required for LimitReached endCondition', + ); + } + + realEndTimestamp = BigNumber.from(limitAmount ?? 0).eq(0) + ? startTimestamp + : BigNumber.from(limitAmount ?? 0) + .mul(interval) + .div(amount) + .add(startTimestamp); + break; + + case StreamingPaymentEndCondition.WhenCancelled: + realEndTimestamp = TIMESTAMP_IN_FUTURE; + break; + + default: + realEndTimestamp = TIMESTAMP_IN_FUTURE; + break; + } + yield fork(createTransaction, createStreamingPayment.id, { context: ClientType.StreamingPaymentsClient, methodName: 'create', From 99a01dcb0978379edda9a16af882d56744985b93 Mon Sep 17 00:00:00 2001 From: Romeo Ledesma Date: Wed, 12 Jun 2024 17:13:25 +0100 Subject: [PATCH 045/126] feat: fix permission proof for StreamingPayment cancel --- src/graphql/generated.ts | 3 +++ src/redux/actionTypes.ts | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 4e1915b85ed..0b4f9307ac4 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -684,6 +684,7 @@ export enum ColonyActionType { /** An action related to cancelling a streaming payment via a motion */ CancelStreamingPaymentMotion = 'CANCEL_STREAMING_PAYMENT_MOTION', <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) @@ -705,6 +706,8 @@ export enum ColonyActionType { /** An action related to cancelling a streaming payment */ CancelStreamingPayment = 'CANCEL_STREAMING_PAYMENT', >>>>>>> 3cb2283e8 (Add timestamp to streaming payment claims and code cleanup) +======= +>>>>>>> e921efe55 (feat: fix permission proof for StreamingPayment cancel) /** An action related to editing a Colony's details */ ColonyEdit = 'COLONY_EDIT', /** An action related to editing a Colony's details via a motion */ diff --git a/src/redux/actionTypes.ts b/src/redux/actionTypes.ts index e1f7e937f6d..f335ccbc475 100644 --- a/src/redux/actionTypes.ts +++ b/src/redux/actionTypes.ts @@ -346,10 +346,4 @@ export enum ActionTypes { CREATE_ARBITRARY_TRANSACTION = 'CREATE_ARBITRARY_TRANSACTION', CREATE_ARBITRARY_TRANSACTION_SUCCESS = 'CREATE_ARBITRARY_TRANSACTION_SUCCESS', CREATE_ARBITRARY_TRANSACTION_ERROR = 'CREATE_ARBITRARY_TRANSACTION_ERROR', - STREAMING_PAYMENT_CANCEL = 'STREAMING_PAYMENT_CANCEL', - STREAMING_PAYMENT_CANCEL_SUCCESS = 'STREAMING_PAYMENT_CANCEL_SUCCESS', - STREAMING_PAYMENT_CANCEL_ERROR = 'STREAMING_PAYMENT_CANCEL_ERROR', - STREAMING_PAYMENT_CLAIM = 'STREAMING_PAYMENT_CLAIM', - STREAMING_PAYMENT_CLAIM_SUCCESS = 'STREAMING_PAYMENT_CLAIM_SUCCESS', - STREAMING_PAYMENT_CLAIM_ERROR = 'STREAMING_PAYMENT_CLAIM_ERROR', } From 871a1e59d915d01e643f288255fbfb6380ace4aa Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Wed, 8 May 2024 11:25:36 +0100 Subject: [PATCH 046/126] Feat: Edit streams using permissions --- src/components/v5/tmpDebug/TmpStreamingPayments.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx index df855af75d9..dbd9c58a267 100644 --- a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx +++ b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx @@ -106,6 +106,8 @@ const TmpStreamingPayments = () => { const { extensionData } = useExtensionData(Extension.StreamingPayments); + const { extensionData } = useExtensionData(Extension.StreamingPayments); + const { data, refetch } = useGetStreamingPaymentQuery({ variables: { streamingPaymentId: getStreamingPaymentDatabaseId( From 735890ab0a22c7aa72945aa7cd74763c83835952 Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Wed, 10 Jul 2024 16:58:39 +0100 Subject: [PATCH 047/126] Feat: Remove limit amount from streamingPaymentMetadata --- .../api/colonycdapp/schema/schema.graphql | 8 +++++ src/graphql/generated.ts | 32 +++++++++++++++++-- .../expenditures/createStreamingPayment.ts | 5 +-- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index df77aec74b5..4e8effc0347 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4148,6 +4148,7 @@ type StreamingPayment @model @searchable { startTime: String! endTime: String! interval: String! +<<<<<<< HEAD <<<<<<< HEAD tokenAddress: ID! token: Token @hasOne(fields: ["tokenAddress"]) @@ -4155,6 +4156,10 @@ type StreamingPayment @model @searchable { payouts: [ExpenditurePayout!] ======= tokenAddress: String! +======= + tokenAddress: ID! + token: Token @hasOne(fields: ["tokenAddress"]) +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) amount: String! >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) claims: [StreamingPaymentClaim!] @@ -4221,6 +4226,7 @@ type StreamingPaymentChanges { type StreamingPaymentMetadata @model { id: ID! # Self-managed, formatted as colonyId_nativeId endCondition: StreamingPaymentEndCondition! +<<<<<<< HEAD """ List of Streaming Payment metadata changelog entries """ @@ -4256,6 +4262,8 @@ type StreamingPaymentClaim { type StreamingPaymentClaim { amount: String! timestamp: String! +======= +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) } type StreamingPaymentClaim { diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 0b4f9307ac4..aa6a809df66 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -2077,6 +2077,7 @@ export type CreateStreamingPaymentInput = { startTime: Scalars['String']; tokenAddress: Scalars['ID']; <<<<<<< HEAD +<<<<<<< HEAD ======= startTime: Scalars['AWSTimestamp']; <<<<<<< HEAD @@ -2093,6 +2094,8 @@ export type CreateStreamingPaymentInput = { ======= tokenAddress: Scalars['String']; >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) +======= +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) }; export type CreateStreamingPaymentMetadataInput = { @@ -4369,6 +4372,7 @@ export type ModelStreamingPaymentConditionInput = { startTime?: InputMaybe; tokenAddress?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD ======= startTime?: InputMaybe; <<<<<<< HEAD @@ -4385,6 +4389,8 @@ export type ModelStreamingPaymentConditionInput = { ======= tokenAddress?: InputMaybe; >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) +======= +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) }; export type ModelStreamingPaymentConnection = { @@ -4429,6 +4435,7 @@ export type ModelStreamingPaymentFilterInput = { startTime?: InputMaybe; tokenAddress?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD ======= startTime?: InputMaybe; <<<<<<< HEAD @@ -4445,6 +4452,8 @@ export type ModelStreamingPaymentFilterInput = { ======= tokenAddress?: InputMaybe; >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) +======= +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) }; export type ModelStreamingPaymentMetadataConditionInput = { @@ -5019,6 +5028,7 @@ export type ModelSubscriptionStreamingPaymentFilterInput = { startTime?: InputMaybe; tokenAddress?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD ======= startTime?: InputMaybe; <<<<<<< HEAD @@ -5035,6 +5045,8 @@ export type ModelSubscriptionStreamingPaymentFilterInput = { ======= tokenAddress?: InputMaybe; >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) +======= +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) }; export type ModelSubscriptionStreamingPaymentMetadataFilterInput = { @@ -8941,6 +8953,7 @@ export type StreamingPayment = { token?: Maybe; tokenAddress: Scalars['ID']; <<<<<<< HEAD +<<<<<<< HEAD ======= startTime: Scalars['AWSTimestamp']; <<<<<<< HEAD @@ -8957,6 +8970,8 @@ export type StreamingPayment = { ======= tokenAddress: Scalars['String']; >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) +======= +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) updatedAt: Scalars['AWSDateTime']; }; @@ -10758,6 +10773,7 @@ export type UpdateStreamingPaymentInput = { startTime?: InputMaybe; tokenAddress?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD ======= startTime?: InputMaybe; <<<<<<< HEAD @@ -10774,6 +10790,8 @@ export type UpdateStreamingPaymentInput = { ======= tokenAddress?: InputMaybe; >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) +======= +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) }; export type UpdateStreamingPaymentMetadataInput = { @@ -11212,7 +11230,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11765,6 +11783,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; export type GetStreamingPaymentQueryVariables = Exact<{ @@ -11791,6 +11810,9 @@ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayme ======= export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, limitAmount?: string | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; >>>>>>> 7d06511f7 (Set correct end time for streaming payments based on end condition) +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -13295,23 +13317,29 @@ export const StreamingPaymentChangesFragmentDoc = gql` } ======= tokenAddress + token { + ...Token + } amount >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) metadata { endCondition - limitAmount } claims { amount timestamp } } +<<<<<<< HEAD <<<<<<< HEAD ${ExpenditurePayoutFragmentDoc}`; >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) ======= `; >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) +======= + ${TokenFragmentDoc}`; +>>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) export const UserTokenBalanceDataFragmentDoc = gql` fragment UserTokenBalanceData on GetUserTokenBalanceReturn { balance diff --git a/src/redux/sagas/expenditures/createStreamingPayment.ts b/src/redux/sagas/expenditures/createStreamingPayment.ts index 497676c8b41..991e9e46c42 100644 --- a/src/redux/sagas/expenditures/createStreamingPayment.ts +++ b/src/redux/sagas/expenditures/createStreamingPayment.ts @@ -38,6 +38,7 @@ import { takeFrom, uploadAnnotation, } from '../utils/index.ts'; +import meta from '~v5/common/PageLoader/PageLoader.stories.tsx'; export type CreateStreamingPaymentPayload = Action['payload']; @@ -286,8 +287,8 @@ function* createStreamingPaymentAction({ endCondition, }, }, - }), - ); + }, + }); yield put({ type: ActionTypes.STREAMING_PAYMENT_CREATE_SUCCESS, From d73d01ef48f2e000a7e35c3210fe823a30c7d3a5 Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:58:52 +0100 Subject: [PATCH 048/126] Fix: Adjust getEndTimeByEndCondition and getStreamingPaymentLimit to use wei --- src/components/v5/tmpDebug/TmpStreamingPayments.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx index dbd9c58a267..df855af75d9 100644 --- a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx +++ b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx @@ -106,8 +106,6 @@ const TmpStreamingPayments = () => { const { extensionData } = useExtensionData(Extension.StreamingPayments); - const { extensionData } = useExtensionData(Extension.StreamingPayments); - const { data, refetch } = useGetStreamingPaymentQuery({ variables: { streamingPaymentId: getStreamingPaymentDatabaseId( From ef41c913878ded4aff2a2eee9a22692604c21da7 Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:56:21 +0100 Subject: [PATCH 049/126] Feat: Edit streams using motions --- .../api/colonycdapp/schema/schema.graphql | 18 ++ src/graphql/generated.ts | 247 ++++++++++++++++++ src/graphql/mutations/expenditures.graphql | 8 + 3 files changed, 273 insertions(+) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index 4e8effc0347..b76351282a6 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -3604,14 +3604,18 @@ type ColonyAction @model @searchable { streamingPayment: StreamingPayment @hasOne(fields: ["streamingPaymentId"]) <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) """ Changes to the streaming payment associated with the action, if any Applicable to `EDIT_STREAMING_PAYMENT` action only """ <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) streamingPaymentChanges: StreamingPaymentChangeSet @@ -3627,20 +3631,26 @@ type StreamingPaymentChangeSet { """ <<<<<<< HEAD ======= +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) streamingPaymentChanges: FullStreamingPaymentChanges } type FullStreamingPaymentChanges { oldValues: StreamingPaymentChanges! +<<<<<<< HEAD >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) newValues: StreamingPaymentChanges! } type StreamingPaymentChanges { <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) startTime: String! @@ -3649,15 +3659,20 @@ type StreamingPaymentChanges { amount: String! <<<<<<< HEAD ======= +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) startTime: String endTime: String interval: String amount: String +<<<<<<< HEAD >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) ======= >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) } """ @@ -4184,6 +4199,7 @@ type StreamingPayment @model @searchable { @hasMany(indexName: "byStreamingPaymentId", fields: ["id"]) <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD """ Address of the stream creator, can be a user or an extension @@ -4221,6 +4237,8 @@ type StreamingPaymentChanges { >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) } type StreamingPaymentMetadata @model { diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index aa6a809df66..59a82a79806 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -554,13 +554,17 @@ export type ColonyAction = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) /** * Changes to the streaming payment associated with the action, if any * Applicable to `EDIT_STREAMING_PAYMENT` action only */ <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: Maybe; ======= @@ -573,6 +577,9 @@ export type ColonyAction = { >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) +======= + streamingPaymentChanges?: Maybe; +>>>>>>> adad6bd8a (Feat: Edit streams using motions) /** ID of the associated streaming payment, if any */ streamingPaymentId?: Maybe; /** The target Domain of the action, if applicable */ @@ -1221,6 +1228,7 @@ export type ColonyMotion = { /** Id of the associated objection annotation, if any */ objectionAnnotationId?: Maybe; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD /** Streaming Payment changes by the action */ pendingStreamingPaymentChanges?: Maybe; @@ -1236,6 +1244,10 @@ export type ColonyMotion = { /** Streaming payment metadata that is stored temporarily and committed to the database once the corresponding motion passes */ pendingStreamingPaymentMetadata?: Maybe; >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= + /** Streaming payment metadata that is stored temporarily and committed to the database once the corresponding motion passes */ + pendingStreamingPaymentMetadata?: Maybe; +>>>>>>> adad6bd8a (Feat: Edit streams using motions) /** Identifier of streaming payment metadata that is stored temporarily and committed to the database once the corresponding motion passes */ pendingStreamingPaymentMetadataId?: Maybe; /** @@ -1254,16 +1266,20 @@ export type ColonyMotion = { /** List of staker rewards users will be receiving for a motion */ stakerRewards: Array; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD /** Streaming payment associated with the action, if any */ streamingPayment?: Maybe; /** ID of the associated streaming payment, if any */ streamingPaymentId?: Maybe; ======= +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) /** Streaming payment associated with the motion, if any */ streamingPaymentId?: Maybe; /** Streaming Payment changes by the action */ streamingPaymentPendingChanges?: Maybe; +<<<<<<< HEAD >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) ======= /** Streaming payment associated with the action, if any */ @@ -1271,6 +1287,8 @@ export type ColonyMotion = { /** ID of the associated streaming payment, if any */ streamingPaymentId?: Maybe; >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) /** The transaction hash of the createMotion action */ transactionHash: Scalars['ID']; updatedAt: Scalars['AWSDateTime']; @@ -1611,6 +1629,7 @@ export type CreateColonyActionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: InputMaybe; ======= @@ -1625,6 +1644,9 @@ export type CreateColonyActionInput = { >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) +======= + streamingPaymentChanges?: InputMaybe; +>>>>>>> adad6bd8a (Feat: Edit streams using motions) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -1778,6 +1800,7 @@ export type CreateColonyMotionInput = { nativeMotionId: Scalars['String']; objectionAnnotationId?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD pendingStreamingPaymentChanges?: InputMaybe; ======= @@ -1785,6 +1808,8 @@ export type CreateColonyMotionInput = { ======= pendingStreamingPaymentChanges?: InputMaybe; >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) pendingStreamingPaymentMetadataId?: InputMaybe; remainingStakes: Array; repSubmitted: Scalars['String']; @@ -1795,11 +1820,15 @@ export type CreateColonyMotionInput = { streamingPaymentId?: InputMaybe; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= streamingPaymentPendingChanges?: InputMaybe; >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) ======= >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= + streamingPaymentPendingChanges?: InputMaybe; +>>>>>>> adad6bd8a (Feat: Edit streams using motions) transactionHash: Scalars['ID']; userMinStake: Scalars['String']; usersStakes: Array; @@ -1975,6 +2004,7 @@ export type CreateMultiSigUserSignatureInput = { vote: MultiSigVote; }; +<<<<<<< HEAD export type CreateNotificationsDataInput = { adminNotificationsDisabled: Scalars['Boolean']; magicbellUserId: Scalars['ID']; @@ -1983,6 +2013,11 @@ export type CreateNotificationsDataInput = { notificationsDisabled: Scalars['Boolean']; paymentNotificationsDisabled: Scalars['Boolean']; userAddress: Scalars['ID']; +======= +export type CreatePendingStreamingPaymentMetadataInput = { + endCondition: StreamingPaymentEndCondition; + id?: InputMaybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; export type CreatePrivateBetaInviteCodeInput = { @@ -2345,8 +2380,13 @@ export type DeleteMultiSigUserSignatureInput = { id: Scalars['ID']; }; +<<<<<<< HEAD export type DeleteNotificationsDataInput = { userAddress: Scalars['ID']; +======= +export type DeletePendingStreamingPaymentMetadataInput = { + id: Scalars['ID']; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; export type DeletePrivateBetaInviteCodeInput = { @@ -2849,6 +2889,17 @@ export enum FilteringMethod { Union = 'UNION' } +export type FullStreamingPaymentChanges = { + __typename?: 'FullStreamingPaymentChanges'; + newValues: StreamingPaymentChanges; + oldValues: StreamingPaymentChanges; +}; + +export type FullStreamingPaymentChangesInput = { + newValues: StreamingPaymentChangesInput; + oldValues: StreamingPaymentChangesInput; +}; + export type FunctionParam = { __typename?: 'FunctionParam'; name: Scalars['String']; @@ -4147,6 +4198,7 @@ export type ModelMultiSigVoteInput = { ne?: InputMaybe; }; +<<<<<<< HEAD export type ModelNotificationsDataConditionInput = { adminNotificationsDisabled?: InputMaybe; and?: InputMaybe>>; @@ -4176,6 +4228,27 @@ export type ModelNotificationsDataFilterInput = { or?: InputMaybe>>; paymentNotificationsDisabled?: InputMaybe; userAddress?: InputMaybe; +======= +export type ModelPendingStreamingPaymentMetadataConditionInput = { + and?: InputMaybe>>; + endCondition?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; +}; + +export type ModelPendingStreamingPaymentMetadataConnection = { + __typename?: 'ModelPendingStreamingPaymentMetadataConnection'; + items: Array>; + nextToken?: Maybe; +}; + +export type ModelPendingStreamingPaymentMetadataFilterInput = { + and?: InputMaybe>>; + endCondition?: InputMaybe; + id?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>>; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; export type ModelPrivateBetaInviteCodeConditionInput = { @@ -4934,6 +5007,7 @@ export type ModelSubscriptionMultiSigUserSignatureFilterInput = { vote?: InputMaybe; }; +<<<<<<< HEAD export type ModelSubscriptionNotificationsDataFilterInput = { adminNotificationsDisabled?: InputMaybe; and?: InputMaybe>>; @@ -4944,6 +5018,13 @@ export type ModelSubscriptionNotificationsDataFilterInput = { or?: InputMaybe>>; paymentNotificationsDisabled?: InputMaybe; userAddress?: InputMaybe; +======= +export type ModelSubscriptionPendingStreamingPaymentMetadataFilterInput = { + and?: InputMaybe>>; + endCondition?: InputMaybe; + id?: InputMaybe; + or?: InputMaybe>>; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; export type ModelSubscriptionPrivateBetaInviteCodeFilterInput = { @@ -5635,7 +5716,11 @@ export type Mutation = { createLiquidationAddress?: Maybe; createMotionMessage?: Maybe; createMultiSigUserSignature?: Maybe; +<<<<<<< HEAD createNotificationsData?: Maybe; +======= + createPendingStreamingPaymentMetadata?: Maybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) createPrivateBetaInviteCode?: Maybe; createProfile?: Maybe; createReputationMiningCycleMetadata?: Maybe; @@ -5683,7 +5768,11 @@ export type Mutation = { deleteLiquidationAddress?: Maybe; deleteMotionMessage?: Maybe; deleteMultiSigUserSignature?: Maybe; +<<<<<<< HEAD deleteNotificationsData?: Maybe; +======= + deletePendingStreamingPaymentMetadata?: Maybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) deletePrivateBetaInviteCode?: Maybe; deleteProfile?: Maybe; deleteReputationMiningCycleMetadata?: Maybe; @@ -5731,7 +5820,11 @@ export type Mutation = { updateLiquidationAddress?: Maybe; updateMotionMessage?: Maybe; updateMultiSigUserSignature?: Maybe; +<<<<<<< HEAD updateNotificationsData?: Maybe; +======= + updatePendingStreamingPaymentMetadata?: Maybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) updatePrivateBetaInviteCode?: Maybe; updateProfile?: Maybe; updateReputationMiningCycleMetadata?: Maybe; @@ -5979,9 +6072,15 @@ export type MutationCreateMultiSigUserSignatureArgs = { /** Root mutation type */ +<<<<<<< HEAD export type MutationCreateNotificationsDataArgs = { condition?: InputMaybe; input: CreateNotificationsDataInput; +======= +export type MutationCreatePendingStreamingPaymentMetadataArgs = { + condition?: InputMaybe; + input: CreatePendingStreamingPaymentMetadataInput; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; @@ -6299,9 +6398,15 @@ export type MutationDeleteMultiSigUserSignatureArgs = { /** Root mutation type */ +<<<<<<< HEAD export type MutationDeleteNotificationsDataArgs = { condition?: InputMaybe; input: DeleteNotificationsDataInput; +======= +export type MutationDeletePendingStreamingPaymentMetadataArgs = { + condition?: InputMaybe; + input: DeletePendingStreamingPaymentMetadataInput; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; @@ -6619,9 +6724,15 @@ export type MutationUpdateMultiSigUserSignatureArgs = { /** Root mutation type */ +<<<<<<< HEAD export type MutationUpdateNotificationsDataArgs = { condition?: InputMaybe; input: UpdateNotificationsDataInput; +======= +export type MutationUpdatePendingStreamingPaymentMetadataArgs = { + condition?: InputMaybe; + input: UpdatePendingStreamingPaymentMetadataInput; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; @@ -6882,6 +6993,14 @@ export type PaymentInput = { tokenAddress: Scalars['String']; }; +export type PendingStreamingPaymentMetadata = { + __typename?: 'PendingStreamingPaymentMetadata'; + createdAt: Scalars['AWSDateTime']; + endCondition: StreamingPaymentEndCondition; + id: Scalars['ID']; + updatedAt: Scalars['AWSDateTime']; +}; + export type PrivateBetaInviteCode = { __typename?: 'PrivateBetaInviteCode'; createdAt: Scalars['AWSDateTime']; @@ -7059,7 +7178,11 @@ export type Query = { getMultiSigByTransactionHash?: Maybe; getMultiSigUserSignature?: Maybe; getMultiSigUserSignatureByMultiSigId?: Maybe; +<<<<<<< HEAD getNotificationsData?: Maybe; +======= + getPendingStreamingPaymentMetadata?: Maybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) getPrivateBetaInviteCode?: Maybe; getProfile?: Maybe; getProfileByEmail?: Maybe; @@ -7130,7 +7253,11 @@ export type Query = { listLiquidationAddresses?: Maybe; listMotionMessages?: Maybe; listMultiSigUserSignatures?: Maybe; +<<<<<<< HEAD listNotificationsData?: Maybe; +======= + listPendingStreamingPaymentMetadata?: Maybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) listPrivateBetaInviteCodes?: Maybe; listProfiles?: Maybe; listReputationMiningCycleMetadata?: Maybe; @@ -7695,8 +7822,13 @@ export type QueryGetMultiSigUserSignatureByMultiSigIdArgs = { /** Root query type */ +<<<<<<< HEAD export type QueryGetNotificationsDataArgs = { userAddress: Scalars['ID']; +======= +export type QueryGetPendingStreamingPaymentMetadataArgs = { + id: Scalars['ID']; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; @@ -8216,12 +8348,19 @@ export type QueryListMultiSigUserSignaturesArgs = { /** Root query type */ +<<<<<<< HEAD export type QueryListNotificationsDataArgs = { filter?: InputMaybe; limit?: InputMaybe; nextToken?: InputMaybe; sortDirection?: InputMaybe; userAddress?: InputMaybe; +======= +export type QueryListPendingStreamingPaymentMetadataArgs = { + filter?: InputMaybe; + limit?: InputMaybe; + nextToken?: InputMaybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; @@ -8987,8 +9126,11 @@ export type StreamingPaymentActionsArgs = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) export type StreamingPaymentMotionsArgs = { filter?: InputMaybe; @@ -9000,6 +9142,7 @@ export type StreamingPaymentMotionsArgs = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type StreamingPaymentChangeSet = { __typename?: 'StreamingPaymentChangeSet'; ======= @@ -9061,10 +9204,22 @@ export type StreamingPaymentChanges = { export type StreamingPaymentChangesInput = { <<<<<<< HEAD +======= +export type StreamingPaymentChanges = { + __typename?: 'StreamingPaymentChanges'; + amount?: Maybe; + endTime?: Maybe; + interval?: Maybe; + startTime?: Maybe; +}; + +export type StreamingPaymentChangesInput = { +>>>>>>> adad6bd8a (Feat: Edit streams using motions) amount?: InputMaybe; endTime?: InputMaybe; interval?: InputMaybe; startTime?: InputMaybe; +<<<<<<< HEAD >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) ======= amount: Scalars['String']; @@ -9072,6 +9227,8 @@ export type StreamingPaymentChangesInput = { interval: Scalars['String']; startTime: Scalars['String']; >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) }; export type StreamingPaymentClaim = { @@ -9163,6 +9320,7 @@ export type StreamingPaymentMetadata = { updatedAt: Scalars['AWSDateTime']; }; +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD ======= @@ -9184,6 +9342,8 @@ export type StreamingPaymentMetadataChangelogInput = { oldEndCondition: StreamingPaymentEndCondition; transactionHash: Scalars['String']; ======= +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) export type StreamingPaymentPendingChanges = { __typename?: 'StreamingPaymentPendingChanges'; amount?: Maybe; @@ -9197,6 +9357,7 @@ export type StreamingPaymentPendingChangesInput = { endTime?: InputMaybe; interval?: InputMaybe; startTime?: InputMaybe; +<<<<<<< HEAD >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) ======= }; @@ -9206,6 +9367,8 @@ export type StreamingPaymentMetadataChangelogInput = { oldEndCondition: StreamingPaymentEndCondition; transactionHash: Scalars['String']; >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) }; export type Subscription = { @@ -9239,7 +9402,11 @@ export type Subscription = { onCreateLiquidationAddress?: Maybe; onCreateMotionMessage?: Maybe; onCreateMultiSigUserSignature?: Maybe; +<<<<<<< HEAD onCreateNotificationsData?: Maybe; +======= + onCreatePendingStreamingPaymentMetadata?: Maybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) onCreatePrivateBetaInviteCode?: Maybe; onCreateProfile?: Maybe; onCreateReputationMiningCycleMetadata?: Maybe; @@ -9283,7 +9450,11 @@ export type Subscription = { onDeleteLiquidationAddress?: Maybe; onDeleteMotionMessage?: Maybe; onDeleteMultiSigUserSignature?: Maybe; +<<<<<<< HEAD onDeleteNotificationsData?: Maybe; +======= + onDeletePendingStreamingPaymentMetadata?: Maybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) onDeletePrivateBetaInviteCode?: Maybe; onDeleteProfile?: Maybe; onDeleteReputationMiningCycleMetadata?: Maybe; @@ -9327,7 +9498,11 @@ export type Subscription = { onUpdateLiquidationAddress?: Maybe; onUpdateMotionMessage?: Maybe; onUpdateMultiSigUserSignature?: Maybe; +<<<<<<< HEAD onUpdateNotificationsData?: Maybe; +======= + onUpdatePendingStreamingPaymentMetadata?: Maybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) onUpdatePrivateBetaInviteCode?: Maybe; onUpdateProfile?: Maybe; onUpdateReputationMiningCycleMetadata?: Maybe; @@ -9490,8 +9665,13 @@ export type SubscriptionOnCreateMultiSigUserSignatureArgs = { }; +<<<<<<< HEAD export type SubscriptionOnCreateNotificationsDataArgs = { filter?: InputMaybe; +======= +export type SubscriptionOnCreatePendingStreamingPaymentMetadataArgs = { + filter?: InputMaybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; @@ -9710,8 +9890,13 @@ export type SubscriptionOnDeleteMultiSigUserSignatureArgs = { }; +<<<<<<< HEAD export type SubscriptionOnDeleteNotificationsDataArgs = { filter?: InputMaybe; +======= +export type SubscriptionOnDeletePendingStreamingPaymentMetadataArgs = { + filter?: InputMaybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; @@ -9930,8 +10115,13 @@ export type SubscriptionOnUpdateMultiSigUserSignatureArgs = { }; +<<<<<<< HEAD export type SubscriptionOnUpdateNotificationsDataArgs = { filter?: InputMaybe; +======= +export type SubscriptionOnUpdatePendingStreamingPaymentMetadataArgs = { + filter?: InputMaybe; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; @@ -10301,6 +10491,7 @@ export type UpdateColonyActionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: InputMaybe; ======= @@ -10315,6 +10506,9 @@ export type UpdateColonyActionInput = { >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) +======= + streamingPaymentChanges?: InputMaybe; +>>>>>>> adad6bd8a (Feat: Edit streams using motions) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -10446,6 +10640,7 @@ export type UpdateColonyMotionInput = { nativeMotionId?: InputMaybe; objectionAnnotationId?: InputMaybe; <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD pendingStreamingPaymentChanges?: InputMaybe; ======= @@ -10453,6 +10648,8 @@ export type UpdateColonyMotionInput = { ======= pendingStreamingPaymentChanges?: InputMaybe; >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +>>>>>>> adad6bd8a (Feat: Edit streams using motions) pendingStreamingPaymentMetadataId?: InputMaybe; remainingStakes?: InputMaybe>; repSubmitted?: InputMaybe; @@ -10463,11 +10660,15 @@ export type UpdateColonyMotionInput = { streamingPaymentId?: InputMaybe; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= streamingPaymentPendingChanges?: InputMaybe; >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) ======= >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= + streamingPaymentPendingChanges?: InputMaybe; +>>>>>>> adad6bd8a (Feat: Edit streams using motions) transactionHash?: InputMaybe; userMinStake?: InputMaybe; usersStakes?: InputMaybe>; @@ -10671,6 +10872,7 @@ export type UpdateMultiSigUserSignatureInput = { vote?: InputMaybe; }; +<<<<<<< HEAD export type UpdateNotificationsDataInput = { adminNotificationsDisabled?: InputMaybe; magicbellUserId?: InputMaybe; @@ -10679,6 +10881,11 @@ export type UpdateNotificationsDataInput = { notificationsDisabled?: InputMaybe; paymentNotificationsDisabled?: InputMaybe; userAddress: Scalars['ID']; +======= +export type UpdatePendingStreamingPaymentMetadataInput = { + endCondition?: InputMaybe; + id: Scalars['ID']; +>>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; export type UpdatePrivateBetaInviteCodeInput = { @@ -11387,6 +11594,13 @@ export type UpdateStreamingPaymentMetadataMutationVariables = Exact<{ export type UpdateStreamingPaymentMetadataMutation = { __typename?: 'Mutation', updateStreamingPaymentMetadata?: { __typename?: 'StreamingPaymentMetadata', id: string } | null }; +export type CreatePendingStreamingPaymentMetadataMutationVariables = Exact<{ + input: CreatePendingStreamingPaymentMetadataInput; +}>; + + +export type CreatePendingStreamingPaymentMetadataMutation = { __typename?: 'Mutation', createPendingStreamingPaymentMetadata?: { __typename?: 'PendingStreamingPaymentMetadata', id: string } | null }; + export type CreateSafeTransactionMutationVariables = Exact<{ input: CreateSafeTransactionInput; }>; @@ -14044,6 +14258,39 @@ export function useUpdateStreamingPaymentMetadataMutation(baseOptions?: Apollo.M export type UpdateStreamingPaymentMetadataMutationHookResult = ReturnType; export type UpdateStreamingPaymentMetadataMutationResult = Apollo.MutationResult; export type UpdateStreamingPaymentMetadataMutationOptions = Apollo.BaseMutationOptions; +export const CreatePendingStreamingPaymentMetadataDocument = gql` + mutation CreatePendingStreamingPaymentMetadata($input: CreatePendingStreamingPaymentMetadataInput!) { + createPendingStreamingPaymentMetadata(input: $input) { + id + } +} + `; +export type CreatePendingStreamingPaymentMetadataMutationFn = Apollo.MutationFunction; + +/** + * __useCreatePendingStreamingPaymentMetadataMutation__ + * + * To run a mutation, you first call `useCreatePendingStreamingPaymentMetadataMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreatePendingStreamingPaymentMetadataMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createPendingStreamingPaymentMetadataMutation, { data, loading, error }] = useCreatePendingStreamingPaymentMetadataMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreatePendingStreamingPaymentMetadataMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreatePendingStreamingPaymentMetadataDocument, options); + } +export type CreatePendingStreamingPaymentMetadataMutationHookResult = ReturnType; +export type CreatePendingStreamingPaymentMetadataMutationResult = Apollo.MutationResult; +export type CreatePendingStreamingPaymentMetadataMutationOptions = Apollo.BaseMutationOptions; export const CreateSafeTransactionDocument = gql` mutation CreateSafeTransaction($input: CreateSafeTransactionInput!) { createSafeTransaction(input: $input) { diff --git a/src/graphql/mutations/expenditures.graphql b/src/graphql/mutations/expenditures.graphql index 8c8c05ac07d..bc19c26f67b 100644 --- a/src/graphql/mutations/expenditures.graphql +++ b/src/graphql/mutations/expenditures.graphql @@ -19,3 +19,11 @@ mutation UpdateStreamingPaymentMetadata( id } } + +mutation CreatePendingStreamingPaymentMetadata( + $input: CreatePendingStreamingPaymentMetadataInput! +) { + createPendingStreamingPaymentMetadata(input: $input) { + id + } +} From eb8885902ed2fd509f3021f6508c8f46c2f09180 Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:15:56 +0100 Subject: [PATCH 050/126] Feat: Add changelog to streaming payment and streaming payment metadata --- .../api/colonycdapp/schema/schema.graphql | 15 ++ .../fragments/streamingPayment.graphql | 16 ++ src/graphql/generated.ts | 234 +++++++++++++----- src/graphql/mutations/expenditures.graphql | 8 - 4 files changed, 201 insertions(+), 72 deletions(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index b76351282a6..a7373ad6f87 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -3605,6 +3605,7 @@ type ColonyAction @model @searchable { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= @@ -3673,6 +3674,8 @@ type StreamingPaymentChanges { >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) } """ @@ -4200,6 +4203,7 @@ type StreamingPayment @model @searchable { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD """ Address of the stream creator, can be a user or an extension @@ -4208,6 +4212,8 @@ type StreamingPayment @model @searchable { ======= >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) ======= +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) """ List of Streaming Payment changelog entries """ @@ -4234,17 +4240,23 @@ type StreamingPaymentChanges { endTime: String! interval: String! amount: String! +<<<<<<< HEAD >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) } type StreamingPaymentMetadata @model { id: ID! # Self-managed, formatted as colonyId_nativeId endCondition: StreamingPaymentEndCondition! <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) """ List of Streaming Payment metadata changelog entries """ @@ -4268,6 +4280,7 @@ type StreamingPaymentMetadataChangelog { """ newEndCondition: StreamingPaymentEndCondition! <<<<<<< HEAD +<<<<<<< HEAD } type StreamingPaymentClaim { @@ -4282,6 +4295,8 @@ type StreamingPaymentClaim { timestamp: String! ======= >>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) } type StreamingPaymentClaim { diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index ea7ce0c271e..68555086280 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -31,6 +31,22 @@ fragment StreamingPayment on StreamingPayment { timestamp tokenAddress } + changelog { + transactionHash + oldValues { + ...StreamingPaymentChanges + } + newValues { + ...StreamingPaymentChanges + } + } +} + +fragment StreamingPaymentChanges on StreamingPaymentChanges { + startTime + endTime + interval + amount } fragment StreamingPaymentChanges on StreamingPaymentChanges { diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 59a82a79806..527c4d14b0e 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -555,6 +555,7 @@ export type ColonyAction = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= @@ -580,6 +581,8 @@ export type ColonyAction = { ======= streamingPaymentChanges?: Maybe; >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) /** ID of the associated streaming payment, if any */ streamingPaymentId?: Maybe; /** The target Domain of the action, if applicable */ @@ -1229,6 +1232,7 @@ export type ColonyMotion = { objectionAnnotationId?: Maybe; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD /** Streaming Payment changes by the action */ pendingStreamingPaymentChanges?: Maybe; @@ -1248,6 +1252,12 @@ export type ColonyMotion = { /** Streaming payment metadata that is stored temporarily and committed to the database once the corresponding motion passes */ pendingStreamingPaymentMetadata?: Maybe; >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= + /** Streaming Payment changes by the action */ + pendingStreamingPaymentChanges?: Maybe; + /** Streaming payment metadata that is stored temporarily and committed to the database once the corresponding motion passes */ + pendingStreamingPaymentMetadata?: Maybe; +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) /** Identifier of streaming payment metadata that is stored temporarily and committed to the database once the corresponding motion passes */ pendingStreamingPaymentMetadataId?: Maybe; /** @@ -1267,6 +1277,7 @@ export type ColonyMotion = { stakerRewards: Array; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD /** Streaming payment associated with the action, if any */ streamingPayment?: Maybe; @@ -1289,6 +1300,12 @@ export type ColonyMotion = { >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= + /** Streaming payment associated with the action, if any */ + streamingPayment?: Maybe; + /** ID of the associated streaming payment, if any */ + streamingPaymentId?: Maybe; +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) /** The transaction hash of the createMotion action */ transactionHash: Scalars['ID']; updatedAt: Scalars['AWSDateTime']; @@ -1630,6 +1647,7 @@ export type CreateColonyActionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: InputMaybe; ======= @@ -1647,6 +1665,8 @@ export type CreateColonyActionInput = { ======= streamingPaymentChanges?: InputMaybe; >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -1801,6 +1821,7 @@ export type CreateColonyMotionInput = { objectionAnnotationId?: InputMaybe; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD pendingStreamingPaymentChanges?: InputMaybe; ======= @@ -1810,6 +1831,9 @@ export type CreateColonyMotionInput = { >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= + pendingStreamingPaymentChanges?: InputMaybe; +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) pendingStreamingPaymentMetadataId?: InputMaybe; remainingStakes: Array; repSubmitted: Scalars['String']; @@ -1821,6 +1845,7 @@ export type CreateColonyMotionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= streamingPaymentPendingChanges?: InputMaybe; >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) @@ -1829,6 +1854,8 @@ export type CreateColonyMotionInput = { ======= streamingPaymentPendingChanges?: InputMaybe; >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) transactionHash: Scalars['ID']; userMinStake: Scalars['String']; usersStakes: Array; @@ -2004,6 +2031,7 @@ export type CreateMultiSigUserSignatureInput = { vote: MultiSigVote; }; +<<<<<<< HEAD <<<<<<< HEAD export type CreateNotificationsDataInput = { adminNotificationsDisabled: Scalars['Boolean']; @@ -2020,6 +2048,8 @@ export type CreatePendingStreamingPaymentMetadataInput = { >>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type CreatePrivateBetaInviteCodeInput = { id?: InputMaybe; shareableInvites?: InputMaybe; @@ -2079,6 +2109,7 @@ export type CreateStreamingPaymentInput = { ======= >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; + changelog?: InputMaybe>; claims?: InputMaybe>; colonyId: Scalars['ID']; ======= @@ -2380,6 +2411,7 @@ export type DeleteMultiSigUserSignatureInput = { id: Scalars['ID']; }; +<<<<<<< HEAD <<<<<<< HEAD export type DeleteNotificationsDataInput = { userAddress: Scalars['ID']; @@ -2389,6 +2421,8 @@ export type DeletePendingStreamingPaymentMetadataInput = { >>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type DeletePrivateBetaInviteCodeInput = { id: Scalars['ID']; }; @@ -2889,17 +2923,6 @@ export enum FilteringMethod { Union = 'UNION' } -export type FullStreamingPaymentChanges = { - __typename?: 'FullStreamingPaymentChanges'; - newValues: StreamingPaymentChanges; - oldValues: StreamingPaymentChanges; -}; - -export type FullStreamingPaymentChangesInput = { - newValues: StreamingPaymentChangesInput; - oldValues: StreamingPaymentChangesInput; -}; - export type FunctionParam = { __typename?: 'FunctionParam'; name: Scalars['String']; @@ -4198,6 +4221,7 @@ export type ModelMultiSigVoteInput = { ne?: InputMaybe; }; +<<<<<<< HEAD <<<<<<< HEAD export type ModelNotificationsDataConditionInput = { adminNotificationsDisabled?: InputMaybe; @@ -4251,6 +4275,8 @@ export type ModelPendingStreamingPaymentMetadataFilterInput = { >>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type ModelPrivateBetaInviteCodeConditionInput = { and?: InputMaybe>>; not?: InputMaybe; @@ -5007,6 +5033,7 @@ export type ModelSubscriptionMultiSigUserSignatureFilterInput = { vote?: InputMaybe; }; +<<<<<<< HEAD <<<<<<< HEAD export type ModelSubscriptionNotificationsDataFilterInput = { adminNotificationsDisabled?: InputMaybe; @@ -5027,6 +5054,8 @@ export type ModelSubscriptionPendingStreamingPaymentMetadataFilterInput = { >>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type ModelSubscriptionPrivateBetaInviteCodeFilterInput = { and?: InputMaybe>>; id?: InputMaybe; @@ -5716,11 +5745,14 @@ export type Mutation = { createLiquidationAddress?: Maybe; createMotionMessage?: Maybe; createMultiSigUserSignature?: Maybe; +<<<<<<< HEAD <<<<<<< HEAD createNotificationsData?: Maybe; ======= createPendingStreamingPaymentMetadata?: Maybe; >>>>>>> 0f3b0771a (Feat: Edit streams using motions) +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) createPrivateBetaInviteCode?: Maybe; createProfile?: Maybe; createReputationMiningCycleMetadata?: Maybe; @@ -5768,11 +5800,14 @@ export type Mutation = { deleteLiquidationAddress?: Maybe; deleteMotionMessage?: Maybe; deleteMultiSigUserSignature?: Maybe; +<<<<<<< HEAD <<<<<<< HEAD deleteNotificationsData?: Maybe; ======= deletePendingStreamingPaymentMetadata?: Maybe; >>>>>>> 0f3b0771a (Feat: Edit streams using motions) +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) deletePrivateBetaInviteCode?: Maybe; deleteProfile?: Maybe; deleteReputationMiningCycleMetadata?: Maybe; @@ -5820,11 +5855,14 @@ export type Mutation = { updateLiquidationAddress?: Maybe; updateMotionMessage?: Maybe; updateMultiSigUserSignature?: Maybe; +<<<<<<< HEAD <<<<<<< HEAD updateNotificationsData?: Maybe; ======= updatePendingStreamingPaymentMetadata?: Maybe; >>>>>>> 0f3b0771a (Feat: Edit streams using motions) +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) updatePrivateBetaInviteCode?: Maybe; updateProfile?: Maybe; updateReputationMiningCycleMetadata?: Maybe; @@ -6073,6 +6111,7 @@ export type MutationCreateMultiSigUserSignatureArgs = { /** Root mutation type */ <<<<<<< HEAD +<<<<<<< HEAD export type MutationCreateNotificationsDataArgs = { condition?: InputMaybe; input: CreateNotificationsDataInput; @@ -6085,6 +6124,8 @@ export type MutationCreatePendingStreamingPaymentMetadataArgs = { /** Root mutation type */ +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type MutationCreatePrivateBetaInviteCodeArgs = { condition?: InputMaybe; input: CreatePrivateBetaInviteCodeInput; @@ -6399,6 +6440,7 @@ export type MutationDeleteMultiSigUserSignatureArgs = { /** Root mutation type */ <<<<<<< HEAD +<<<<<<< HEAD export type MutationDeleteNotificationsDataArgs = { condition?: InputMaybe; input: DeleteNotificationsDataInput; @@ -6411,6 +6453,8 @@ export type MutationDeletePendingStreamingPaymentMetadataArgs = { /** Root mutation type */ +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type MutationDeletePrivateBetaInviteCodeArgs = { condition?: InputMaybe; input: DeletePrivateBetaInviteCodeInput; @@ -6725,6 +6769,7 @@ export type MutationUpdateMultiSigUserSignatureArgs = { /** Root mutation type */ <<<<<<< HEAD +<<<<<<< HEAD export type MutationUpdateNotificationsDataArgs = { condition?: InputMaybe; input: UpdateNotificationsDataInput; @@ -6737,6 +6782,8 @@ export type MutationUpdatePendingStreamingPaymentMetadataArgs = { /** Root mutation type */ +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type MutationUpdatePrivateBetaInviteCodeArgs = { condition?: InputMaybe; input: UpdatePrivateBetaInviteCodeInput; @@ -6993,14 +7040,6 @@ export type PaymentInput = { tokenAddress: Scalars['String']; }; -export type PendingStreamingPaymentMetadata = { - __typename?: 'PendingStreamingPaymentMetadata'; - createdAt: Scalars['AWSDateTime']; - endCondition: StreamingPaymentEndCondition; - id: Scalars['ID']; - updatedAt: Scalars['AWSDateTime']; -}; - export type PrivateBetaInviteCode = { __typename?: 'PrivateBetaInviteCode'; createdAt: Scalars['AWSDateTime']; @@ -7178,11 +7217,14 @@ export type Query = { getMultiSigByTransactionHash?: Maybe; getMultiSigUserSignature?: Maybe; getMultiSigUserSignatureByMultiSigId?: Maybe; +<<<<<<< HEAD <<<<<<< HEAD getNotificationsData?: Maybe; ======= getPendingStreamingPaymentMetadata?: Maybe; >>>>>>> 0f3b0771a (Feat: Edit streams using motions) +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) getPrivateBetaInviteCode?: Maybe; getProfile?: Maybe; getProfileByEmail?: Maybe; @@ -7253,11 +7295,14 @@ export type Query = { listLiquidationAddresses?: Maybe; listMotionMessages?: Maybe; listMultiSigUserSignatures?: Maybe; +<<<<<<< HEAD <<<<<<< HEAD listNotificationsData?: Maybe; ======= listPendingStreamingPaymentMetadata?: Maybe; >>>>>>> 0f3b0771a (Feat: Edit streams using motions) +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) listPrivateBetaInviteCodes?: Maybe; listProfiles?: Maybe; listReputationMiningCycleMetadata?: Maybe; @@ -7823,6 +7868,7 @@ export type QueryGetMultiSigUserSignatureByMultiSigIdArgs = { /** Root query type */ <<<<<<< HEAD +<<<<<<< HEAD export type QueryGetNotificationsDataArgs = { userAddress: Scalars['ID']; ======= @@ -7833,6 +7879,8 @@ export type QueryGetPendingStreamingPaymentMetadataArgs = { /** Root query type */ +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type QueryGetPrivateBetaInviteCodeArgs = { id: Scalars['ID']; }; @@ -8349,6 +8397,7 @@ export type QueryListMultiSigUserSignaturesArgs = { /** Root query type */ <<<<<<< HEAD +<<<<<<< HEAD export type QueryListNotificationsDataArgs = { filter?: InputMaybe; limit?: InputMaybe; @@ -8365,6 +8414,8 @@ export type QueryListPendingStreamingPaymentMetadataArgs = { /** Root query type */ +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type QueryListPrivateBetaInviteCodesArgs = { filter?: InputMaybe; limit?: InputMaybe; @@ -9047,6 +9098,8 @@ export type StreamingPayment = { ======= >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; + /** List of Streaming Payment changelog entries */ + changelog?: Maybe>; claims?: Maybe>; /** The Colony to which the expenditure belongs */ colony: Colony; @@ -9143,6 +9196,7 @@ export type StreamingPaymentMotionsArgs = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type StreamingPaymentChangeSet = { __typename?: 'StreamingPaymentChangeSet'; ======= @@ -9153,12 +9207,17 @@ export type StreamingPaymentChangelog = { export type StreamingPaymentChangeSet = { __typename?: 'StreamingPaymentChangeSet'; >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +export type StreamingPaymentChangelog = { + __typename?: 'StreamingPaymentChangelog'; +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) /** The values before the change */ newValues: StreamingPaymentChanges; /** The values before the change */ oldValues: StreamingPaymentChanges; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) }; @@ -9183,6 +9242,8 @@ export type StreamingPaymentChangesInput = { startTime: Scalars['String']; ======= ======= +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) /** Transaction hash associated with the changelog entry */ transactionHash: Scalars['String']; }; @@ -9193,6 +9254,7 @@ export type StreamingPaymentChangelogInput = { transactionHash: Scalars['String']; }; +<<<<<<< HEAD >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) export type StreamingPaymentChanges = { __typename?: 'StreamingPaymentChanges'; @@ -9205,15 +9267,18 @@ export type StreamingPaymentChanges = { export type StreamingPaymentChangesInput = { <<<<<<< HEAD ======= +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) export type StreamingPaymentChanges = { __typename?: 'StreamingPaymentChanges'; - amount?: Maybe; - endTime?: Maybe; - interval?: Maybe; - startTime?: Maybe; + amount: Scalars['String']; + endTime: Scalars['String']; + interval: Scalars['String']; + startTime: Scalars['String']; }; export type StreamingPaymentChangesInput = { +<<<<<<< HEAD >>>>>>> adad6bd8a (Feat: Edit streams using motions) amount?: InputMaybe; endTime?: InputMaybe; @@ -9222,13 +9287,18 @@ export type StreamingPaymentChangesInput = { <<<<<<< HEAD >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) ======= +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) amount: Scalars['String']; endTime: Scalars['String']; interval: Scalars['String']; startTime: Scalars['String']; +<<<<<<< HEAD >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) }; export type StreamingPaymentClaim = { @@ -9323,8 +9393,11 @@ export type StreamingPaymentMetadata = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) /** Represents a changelog entry for Streaming Payment metadata */ export type StreamingPaymentMetadataChangelog = { __typename?: 'StreamingPaymentMetadataChangelog'; @@ -9335,6 +9408,7 @@ export type StreamingPaymentMetadataChangelog = { /** Transaction hash associated with the changelog entry */ transactionHash: Scalars['String']; <<<<<<< HEAD +<<<<<<< HEAD }; export type StreamingPaymentMetadataChangelogInput = { @@ -9362,13 +9436,20 @@ export type StreamingPaymentPendingChangesInput = { ======= }; +======= +}; + +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) export type StreamingPaymentMetadataChangelogInput = { newEndCondition: StreamingPaymentEndCondition; oldEndCondition: StreamingPaymentEndCondition; transactionHash: Scalars['String']; +<<<<<<< HEAD >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) }; export type Subscription = { @@ -9402,11 +9483,14 @@ export type Subscription = { onCreateLiquidationAddress?: Maybe; onCreateMotionMessage?: Maybe; onCreateMultiSigUserSignature?: Maybe; +<<<<<<< HEAD <<<<<<< HEAD onCreateNotificationsData?: Maybe; ======= onCreatePendingStreamingPaymentMetadata?: Maybe; >>>>>>> 0f3b0771a (Feat: Edit streams using motions) +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) onCreatePrivateBetaInviteCode?: Maybe; onCreateProfile?: Maybe; onCreateReputationMiningCycleMetadata?: Maybe; @@ -9450,11 +9534,14 @@ export type Subscription = { onDeleteLiquidationAddress?: Maybe; onDeleteMotionMessage?: Maybe; onDeleteMultiSigUserSignature?: Maybe; +<<<<<<< HEAD <<<<<<< HEAD onDeleteNotificationsData?: Maybe; ======= onDeletePendingStreamingPaymentMetadata?: Maybe; >>>>>>> 0f3b0771a (Feat: Edit streams using motions) +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) onDeletePrivateBetaInviteCode?: Maybe; onDeleteProfile?: Maybe; onDeleteReputationMiningCycleMetadata?: Maybe; @@ -9498,11 +9585,14 @@ export type Subscription = { onUpdateLiquidationAddress?: Maybe; onUpdateMotionMessage?: Maybe; onUpdateMultiSigUserSignature?: Maybe; +<<<<<<< HEAD <<<<<<< HEAD onUpdateNotificationsData?: Maybe; ======= onUpdatePendingStreamingPaymentMetadata?: Maybe; >>>>>>> 0f3b0771a (Feat: Edit streams using motions) +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) onUpdatePrivateBetaInviteCode?: Maybe; onUpdateProfile?: Maybe; onUpdateReputationMiningCycleMetadata?: Maybe; @@ -9665,6 +9755,7 @@ export type SubscriptionOnCreateMultiSigUserSignatureArgs = { }; +<<<<<<< HEAD <<<<<<< HEAD export type SubscriptionOnCreateNotificationsDataArgs = { filter?: InputMaybe; @@ -9675,6 +9766,8 @@ export type SubscriptionOnCreatePendingStreamingPaymentMetadataArgs = { }; +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type SubscriptionOnCreatePrivateBetaInviteCodeArgs = { filter?: InputMaybe; }; @@ -9890,6 +9983,7 @@ export type SubscriptionOnDeleteMultiSigUserSignatureArgs = { }; +<<<<<<< HEAD <<<<<<< HEAD export type SubscriptionOnDeleteNotificationsDataArgs = { filter?: InputMaybe; @@ -9900,6 +9994,8 @@ export type SubscriptionOnDeletePendingStreamingPaymentMetadataArgs = { }; +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type SubscriptionOnDeletePrivateBetaInviteCodeArgs = { filter?: InputMaybe; }; @@ -10115,6 +10211,7 @@ export type SubscriptionOnUpdateMultiSigUserSignatureArgs = { }; +<<<<<<< HEAD <<<<<<< HEAD export type SubscriptionOnUpdateNotificationsDataArgs = { filter?: InputMaybe; @@ -10125,6 +10222,8 @@ export type SubscriptionOnUpdatePendingStreamingPaymentMetadataArgs = { }; +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type SubscriptionOnUpdatePrivateBetaInviteCodeArgs = { filter?: InputMaybe; }; @@ -10492,6 +10591,7 @@ export type UpdateColonyActionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: InputMaybe; ======= @@ -10509,6 +10609,8 @@ export type UpdateColonyActionInput = { ======= streamingPaymentChanges?: InputMaybe; >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -10641,6 +10743,7 @@ export type UpdateColonyMotionInput = { objectionAnnotationId?: InputMaybe; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD pendingStreamingPaymentChanges?: InputMaybe; ======= @@ -10650,6 +10753,9 @@ export type UpdateColonyMotionInput = { >>>>>>> 9a2bfec21 (Feat: Add changelog to streaming payment and streaming payment metadata) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= + pendingStreamingPaymentChanges?: InputMaybe; +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) pendingStreamingPaymentMetadataId?: InputMaybe; remainingStakes?: InputMaybe>; repSubmitted?: InputMaybe; @@ -10661,6 +10767,7 @@ export type UpdateColonyMotionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= streamingPaymentPendingChanges?: InputMaybe; >>>>>>> e5ef3fbe5 (Feat: Edit streams using motions) @@ -10669,6 +10776,8 @@ export type UpdateColonyMotionInput = { ======= streamingPaymentPendingChanges?: InputMaybe; >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) transactionHash?: InputMaybe; userMinStake?: InputMaybe; usersStakes?: InputMaybe>; @@ -10872,6 +10981,7 @@ export type UpdateMultiSigUserSignatureInput = { vote?: InputMaybe; }; +<<<<<<< HEAD <<<<<<< HEAD export type UpdateNotificationsDataInput = { adminNotificationsDisabled?: InputMaybe; @@ -10888,6 +10998,8 @@ export type UpdatePendingStreamingPaymentMetadataInput = { >>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; +======= +>>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type UpdatePrivateBetaInviteCodeInput = { id: Scalars['ID']; shareableInvites?: InputMaybe; @@ -10947,6 +11059,7 @@ export type UpdateStreamingPaymentInput = { ======= >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) amount?: InputMaybe; + changelog?: InputMaybe>; claims?: InputMaybe>; colonyId?: InputMaybe; ======= @@ -11437,7 +11550,9 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null, changelog?: Array<{ __typename?: 'StreamingPaymentChangelog', transactionHash: string, oldValues: { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }, newValues: { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string } }> | null }; + +export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; export type TokenFragment = { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }; @@ -11594,13 +11709,6 @@ export type UpdateStreamingPaymentMetadataMutationVariables = Exact<{ export type UpdateStreamingPaymentMetadataMutation = { __typename?: 'Mutation', updateStreamingPaymentMetadata?: { __typename?: 'StreamingPaymentMetadata', id: string } | null }; -export type CreatePendingStreamingPaymentMetadataMutationVariables = Exact<{ - input: CreatePendingStreamingPaymentMetadataInput; -}>; - - -export type CreatePendingStreamingPaymentMetadataMutation = { __typename?: 'Mutation', createPendingStreamingPaymentMetadata?: { __typename?: 'PendingStreamingPaymentMetadata', id: string } | null }; - export type CreateSafeTransactionMutationVariables = Exact<{ input: CreateSafeTransactionInput; }>; @@ -11998,6 +12106,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; export type GetStreamingPaymentQueryVariables = Exact<{ @@ -12027,6 +12136,9 @@ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayme ======= export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; >>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null, changelog?: Array<{ __typename?: 'StreamingPaymentChangelog', transactionHash: string, oldValues: { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }, newValues: { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string } }> | null } | null }; +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -13433,6 +13545,14 @@ export const UserStakeFragmentDoc = gql` type } ${ColonyActionFragmentDoc}`; +export const StreamingPaymentChangesFragmentDoc = gql` + fragment StreamingPaymentChanges on StreamingPaymentChanges { + startTime + endTime + interval + amount +} + `; export const StreamingPaymentFragmentDoc = gql` fragment StreamingPayment on StreamingPayment { id @@ -13538,13 +13658,28 @@ export const StreamingPaymentChangesFragmentDoc = gql` >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) metadata { endCondition + changelog { + transactionHash + oldEndCondition + newEndCondition + } } claims { amount timestamp } + changelog { + transactionHash + oldValues { + ...StreamingPaymentChanges + } + newValues { + ...StreamingPaymentChanges + } + } } <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD ${ExpenditurePayoutFragmentDoc}`; >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) @@ -13554,6 +13689,10 @@ export const StreamingPaymentChangesFragmentDoc = gql` ======= ${TokenFragmentDoc}`; >>>>>>> 38c525943 (Feat: Remove limit amount from streamingPaymentMetadata) +======= + ${TokenFragmentDoc} +${StreamingPaymentChangesFragmentDoc}`; +>>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) export const UserTokenBalanceDataFragmentDoc = gql` fragment UserTokenBalanceData on GetUserTokenBalanceReturn { balance @@ -14258,39 +14397,6 @@ export function useUpdateStreamingPaymentMetadataMutation(baseOptions?: Apollo.M export type UpdateStreamingPaymentMetadataMutationHookResult = ReturnType; export type UpdateStreamingPaymentMetadataMutationResult = Apollo.MutationResult; export type UpdateStreamingPaymentMetadataMutationOptions = Apollo.BaseMutationOptions; -export const CreatePendingStreamingPaymentMetadataDocument = gql` - mutation CreatePendingStreamingPaymentMetadata($input: CreatePendingStreamingPaymentMetadataInput!) { - createPendingStreamingPaymentMetadata(input: $input) { - id - } -} - `; -export type CreatePendingStreamingPaymentMetadataMutationFn = Apollo.MutationFunction; - -/** - * __useCreatePendingStreamingPaymentMetadataMutation__ - * - * To run a mutation, you first call `useCreatePendingStreamingPaymentMetadataMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreatePendingStreamingPaymentMetadataMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createPendingStreamingPaymentMetadataMutation, { data, loading, error }] = useCreatePendingStreamingPaymentMetadataMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreatePendingStreamingPaymentMetadataMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreatePendingStreamingPaymentMetadataDocument, options); - } -export type CreatePendingStreamingPaymentMetadataMutationHookResult = ReturnType; -export type CreatePendingStreamingPaymentMetadataMutationResult = Apollo.MutationResult; -export type CreatePendingStreamingPaymentMetadataMutationOptions = Apollo.BaseMutationOptions; export const CreateSafeTransactionDocument = gql` mutation CreateSafeTransaction($input: CreateSafeTransactionInput!) { createSafeTransaction(input: $input) { diff --git a/src/graphql/mutations/expenditures.graphql b/src/graphql/mutations/expenditures.graphql index bc19c26f67b..8c8c05ac07d 100644 --- a/src/graphql/mutations/expenditures.graphql +++ b/src/graphql/mutations/expenditures.graphql @@ -19,11 +19,3 @@ mutation UpdateStreamingPaymentMetadata( id } } - -mutation CreatePendingStreamingPaymentMetadata( - $input: CreatePendingStreamingPaymentMetadataInput! -) { - createPendingStreamingPaymentMetadata(input: $input) { - id - } -} From 93efdd22b49b6f73a071e5daae4bee3df481ee54 Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:59:58 +0100 Subject: [PATCH 051/126] Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga --- .../api/colonycdapp/schema/schema.graphql | 18 ++++++ .../fragments/streamingPayment.graphql | 9 --- src/graphql/generated.ts | 62 ++++++++++++------- 3 files changed, 58 insertions(+), 31 deletions(-) diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index a7373ad6f87..0d1665d7b62 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -3606,10 +3606,13 @@ type ColonyAction @model @searchable { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) """ Changes to the streaming payment associated with the action, if any Applicable to `EDIT_STREAMING_PAYMENT` action only @@ -3617,8 +3620,11 @@ type ColonyAction @model @searchable { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) streamingPaymentChanges: StreamingPaymentChangeSet } @@ -3631,6 +3637,7 @@ type StreamingPaymentChangeSet { The values before the change """ <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) @@ -3645,6 +3652,8 @@ type FullStreamingPaymentChanges { >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) newValues: StreamingPaymentChanges! } @@ -3652,13 +3661,17 @@ type StreamingPaymentChanges { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) startTime: String! endTime: String! interval: String! amount: String! <<<<<<< HEAD +<<<<<<< HEAD ======= ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) @@ -3676,6 +3689,8 @@ type StreamingPaymentChanges { >>>>>>> adad6bd8a (Feat: Edit streams using motions) ======= >>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) } """ @@ -4204,6 +4219,7 @@ type StreamingPayment @model @searchable { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD """ Address of the stream creator, can be a user or an extension @@ -4248,6 +4264,8 @@ type StreamingPaymentChanges { >>>>>>> adad6bd8a (Feat: Edit streams using motions) ======= >>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) } type StreamingPaymentMetadata @model { diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index 68555086280..e20e7dbdffc 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -31,15 +31,6 @@ fragment StreamingPayment on StreamingPayment { timestamp tokenAddress } - changelog { - transactionHash - oldValues { - ...StreamingPaymentChanges - } - newValues { - ...StreamingPaymentChanges - } - } } fragment StreamingPaymentChanges on StreamingPaymentChanges { diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 527c4d14b0e..af4428ef1c2 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -556,16 +556,20 @@ export type ColonyAction = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) ======= >>>>>>> adad6bd8a (Feat: Edit streams using motions) +======= +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) /** * Changes to the streaming payment associated with the action, if any * Applicable to `EDIT_STREAMING_PAYMENT` action only */ <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: Maybe; ======= @@ -583,6 +587,9 @@ export type ColonyAction = { >>>>>>> adad6bd8a (Feat: Edit streams using motions) ======= >>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= + streamingPaymentChanges?: Maybe; +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) /** ID of the associated streaming payment, if any */ streamingPaymentId?: Maybe; /** The target Domain of the action, if applicable */ @@ -1648,6 +1655,7 @@ export type CreateColonyActionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: InputMaybe; ======= @@ -1667,6 +1675,9 @@ export type CreateColonyActionInput = { >>>>>>> adad6bd8a (Feat: Edit streams using motions) ======= >>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= + streamingPaymentChanges?: InputMaybe; +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -2109,7 +2120,6 @@ export type CreateStreamingPaymentInput = { ======= >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; - changelog?: InputMaybe>; claims?: InputMaybe>; colonyId: Scalars['ID']; ======= @@ -9098,8 +9108,6 @@ export type StreamingPayment = { ======= >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) amount: Scalars['String']; - /** List of Streaming Payment changelog entries */ - changelog?: Maybe>; claims?: Maybe>; /** The Colony to which the expenditure belongs */ colony: Colony; @@ -9197,6 +9205,7 @@ export type StreamingPaymentMotionsArgs = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type StreamingPaymentChangeSet = { __typename?: 'StreamingPaymentChangeSet'; ======= @@ -9211,6 +9220,10 @@ export type StreamingPaymentChangeSet = { export type StreamingPaymentChangelog = { __typename?: 'StreamingPaymentChangelog'; >>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +export type StreamingPaymentChangeSet = { + __typename?: 'StreamingPaymentChangeSet'; +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) /** The values before the change */ newValues: StreamingPaymentChanges; /** The values before the change */ @@ -9218,8 +9231,11 @@ export type StreamingPaymentChangelog = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD ======= >>>>>>> 28c6dff03 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) }; export type StreamingPaymentChangeSetInput = { @@ -10592,6 +10608,7 @@ export type UpdateColonyActionInput = { <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD streamingPaymentChanges?: InputMaybe; ======= @@ -10611,6 +10628,9 @@ export type UpdateColonyActionInput = { >>>>>>> adad6bd8a (Feat: Edit streams using motions) ======= >>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= + streamingPaymentChanges?: InputMaybe; +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) streamingPaymentId?: InputMaybe; toDomainId?: InputMaybe; toPotId?: InputMaybe; @@ -11059,7 +11079,6 @@ export type UpdateStreamingPaymentInput = { ======= >>>>>>> 819abc5af (Schema update: adjust streaming payment model for a single token) amount?: InputMaybe; - changelog?: InputMaybe>; claims?: InputMaybe>; colonyId?: InputMaybe; ======= @@ -11550,7 +11569,7 @@ export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: st export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null, changelog?: Array<{ __typename?: 'StreamingPaymentChangelog', transactionHash: string, oldValues: { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }, newValues: { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string } }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; @@ -12107,6 +12126,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; export type GetStreamingPaymentQueryVariables = Exact<{ @@ -12139,6 +12159,9 @@ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayme ======= export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null, changelog?: Array<{ __typename?: 'StreamingPaymentChangelog', transactionHash: string, oldValues: { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }, newValues: { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string } }> | null } | null }; >>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -13545,14 +13568,6 @@ export const UserStakeFragmentDoc = gql` type } ${ColonyActionFragmentDoc}`; -export const StreamingPaymentChangesFragmentDoc = gql` - fragment StreamingPaymentChanges on StreamingPaymentChanges { - startTime - endTime - interval - amount -} - `; export const StreamingPaymentFragmentDoc = gql` fragment StreamingPayment on StreamingPayment { id @@ -13668,18 +13683,10 @@ export const StreamingPaymentChangesFragmentDoc = gql` amount timestamp } - changelog { - transactionHash - oldValues { - ...StreamingPaymentChanges - } - newValues { - ...StreamingPaymentChanges - } - } } <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD <<<<<<< HEAD ${ExpenditurePayoutFragmentDoc}`; >>>>>>> 94034ad97 (Feat: Cancel streams using permissions) @@ -13693,6 +13700,17 @@ export const StreamingPaymentChangesFragmentDoc = gql` ${TokenFragmentDoc} ${StreamingPaymentChangesFragmentDoc}`; >>>>>>> 53ad3f4f6 (Feat: Add changelog to streaming payment and streaming payment metadata) +======= + ${TokenFragmentDoc}`; +export const StreamingPaymentChangesFragmentDoc = gql` + fragment StreamingPaymentChanges on StreamingPaymentChanges { + startTime + endTime + interval + amount +} + `; +>>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) export const UserTokenBalanceDataFragmentDoc = gql` fragment UserTokenBalanceData on GetUserTokenBalanceReturn { balance From 313b94f1fde7109c59a44f63480e6723f3b83c28 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Wed, 6 Nov 2024 13:45:39 +0000 Subject: [PATCH 052/126] Chore: update generated and block-ingestor hash post-rebase --- src/graphql/generated.ts | 187 --------------------------------------- 1 file changed, 187 deletions(-) diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index af4428ef1c2..4fdba174f7d 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -2042,8 +2042,6 @@ export type CreateMultiSigUserSignatureInput = { vote: MultiSigVote; }; -<<<<<<< HEAD -<<<<<<< HEAD export type CreateNotificationsDataInput = { adminNotificationsDisabled: Scalars['Boolean']; magicbellUserId: Scalars['ID']; @@ -2052,15 +2050,8 @@ export type CreateNotificationsDataInput = { notificationsDisabled: Scalars['Boolean']; paymentNotificationsDisabled: Scalars['Boolean']; userAddress: Scalars['ID']; -======= -export type CreatePendingStreamingPaymentMetadataInput = { - endCondition: StreamingPaymentEndCondition; - id?: InputMaybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type CreatePrivateBetaInviteCodeInput = { id?: InputMaybe; shareableInvites?: InputMaybe; @@ -2421,18 +2412,10 @@ export type DeleteMultiSigUserSignatureInput = { id: Scalars['ID']; }; -<<<<<<< HEAD -<<<<<<< HEAD export type DeleteNotificationsDataInput = { userAddress: Scalars['ID']; -======= -export type DeletePendingStreamingPaymentMetadataInput = { - id: Scalars['ID']; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type DeletePrivateBetaInviteCodeInput = { id: Scalars['ID']; }; @@ -4231,8 +4214,6 @@ export type ModelMultiSigVoteInput = { ne?: InputMaybe; }; -<<<<<<< HEAD -<<<<<<< HEAD export type ModelNotificationsDataConditionInput = { adminNotificationsDisabled?: InputMaybe; and?: InputMaybe>>; @@ -4262,31 +4243,8 @@ export type ModelNotificationsDataFilterInput = { or?: InputMaybe>>; paymentNotificationsDisabled?: InputMaybe; userAddress?: InputMaybe; -======= -export type ModelPendingStreamingPaymentMetadataConditionInput = { - and?: InputMaybe>>; - endCondition?: InputMaybe; - not?: InputMaybe; - or?: InputMaybe>>; }; -export type ModelPendingStreamingPaymentMetadataConnection = { - __typename?: 'ModelPendingStreamingPaymentMetadataConnection'; - items: Array>; - nextToken?: Maybe; -}; - -export type ModelPendingStreamingPaymentMetadataFilterInput = { - and?: InputMaybe>>; - endCondition?: InputMaybe; - id?: InputMaybe; - not?: InputMaybe; - or?: InputMaybe>>; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) -}; - -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type ModelPrivateBetaInviteCodeConditionInput = { and?: InputMaybe>>; not?: InputMaybe; @@ -5043,8 +5001,6 @@ export type ModelSubscriptionMultiSigUserSignatureFilterInput = { vote?: InputMaybe; }; -<<<<<<< HEAD -<<<<<<< HEAD export type ModelSubscriptionNotificationsDataFilterInput = { adminNotificationsDisabled?: InputMaybe; and?: InputMaybe>>; @@ -5055,17 +5011,8 @@ export type ModelSubscriptionNotificationsDataFilterInput = { or?: InputMaybe>>; paymentNotificationsDisabled?: InputMaybe; userAddress?: InputMaybe; -======= -export type ModelSubscriptionPendingStreamingPaymentMetadataFilterInput = { - and?: InputMaybe>>; - endCondition?: InputMaybe; - id?: InputMaybe; - or?: InputMaybe>>; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type ModelSubscriptionPrivateBetaInviteCodeFilterInput = { and?: InputMaybe>>; id?: InputMaybe; @@ -5755,14 +5702,7 @@ export type Mutation = { createLiquidationAddress?: Maybe; createMotionMessage?: Maybe; createMultiSigUserSignature?: Maybe; -<<<<<<< HEAD -<<<<<<< HEAD createNotificationsData?: Maybe; -======= - createPendingStreamingPaymentMetadata?: Maybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) createPrivateBetaInviteCode?: Maybe; createProfile?: Maybe; createReputationMiningCycleMetadata?: Maybe; @@ -5810,14 +5750,7 @@ export type Mutation = { deleteLiquidationAddress?: Maybe; deleteMotionMessage?: Maybe; deleteMultiSigUserSignature?: Maybe; -<<<<<<< HEAD -<<<<<<< HEAD deleteNotificationsData?: Maybe; -======= - deletePendingStreamingPaymentMetadata?: Maybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) deletePrivateBetaInviteCode?: Maybe; deleteProfile?: Maybe; deleteReputationMiningCycleMetadata?: Maybe; @@ -5865,14 +5798,7 @@ export type Mutation = { updateLiquidationAddress?: Maybe; updateMotionMessage?: Maybe; updateMultiSigUserSignature?: Maybe; -<<<<<<< HEAD -<<<<<<< HEAD updateNotificationsData?: Maybe; -======= - updatePendingStreamingPaymentMetadata?: Maybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) updatePrivateBetaInviteCode?: Maybe; updateProfile?: Maybe; updateReputationMiningCycleMetadata?: Maybe; @@ -6120,22 +6046,13 @@ export type MutationCreateMultiSigUserSignatureArgs = { /** Root mutation type */ -<<<<<<< HEAD -<<<<<<< HEAD export type MutationCreateNotificationsDataArgs = { condition?: InputMaybe; input: CreateNotificationsDataInput; -======= -export type MutationCreatePendingStreamingPaymentMetadataArgs = { - condition?: InputMaybe; - input: CreatePendingStreamingPaymentMetadataInput; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; /** Root mutation type */ -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type MutationCreatePrivateBetaInviteCodeArgs = { condition?: InputMaybe; input: CreatePrivateBetaInviteCodeInput; @@ -6449,22 +6366,13 @@ export type MutationDeleteMultiSigUserSignatureArgs = { /** Root mutation type */ -<<<<<<< HEAD -<<<<<<< HEAD export type MutationDeleteNotificationsDataArgs = { condition?: InputMaybe; input: DeleteNotificationsDataInput; -======= -export type MutationDeletePendingStreamingPaymentMetadataArgs = { - condition?: InputMaybe; - input: DeletePendingStreamingPaymentMetadataInput; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; /** Root mutation type */ -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type MutationDeletePrivateBetaInviteCodeArgs = { condition?: InputMaybe; input: DeletePrivateBetaInviteCodeInput; @@ -6778,22 +6686,13 @@ export type MutationUpdateMultiSigUserSignatureArgs = { /** Root mutation type */ -<<<<<<< HEAD -<<<<<<< HEAD export type MutationUpdateNotificationsDataArgs = { condition?: InputMaybe; input: UpdateNotificationsDataInput; -======= -export type MutationUpdatePendingStreamingPaymentMetadataArgs = { - condition?: InputMaybe; - input: UpdatePendingStreamingPaymentMetadataInput; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; /** Root mutation type */ -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type MutationUpdatePrivateBetaInviteCodeArgs = { condition?: InputMaybe; input: UpdatePrivateBetaInviteCodeInput; @@ -7227,14 +7126,7 @@ export type Query = { getMultiSigByTransactionHash?: Maybe; getMultiSigUserSignature?: Maybe; getMultiSigUserSignatureByMultiSigId?: Maybe; -<<<<<<< HEAD -<<<<<<< HEAD getNotificationsData?: Maybe; -======= - getPendingStreamingPaymentMetadata?: Maybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) getPrivateBetaInviteCode?: Maybe; getProfile?: Maybe; getProfileByEmail?: Maybe; @@ -7305,14 +7197,7 @@ export type Query = { listLiquidationAddresses?: Maybe; listMotionMessages?: Maybe; listMultiSigUserSignatures?: Maybe; -<<<<<<< HEAD -<<<<<<< HEAD listNotificationsData?: Maybe; -======= - listPendingStreamingPaymentMetadata?: Maybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) listPrivateBetaInviteCodes?: Maybe; listProfiles?: Maybe; listReputationMiningCycleMetadata?: Maybe; @@ -7877,20 +7762,12 @@ export type QueryGetMultiSigUserSignatureByMultiSigIdArgs = { /** Root query type */ -<<<<<<< HEAD -<<<<<<< HEAD export type QueryGetNotificationsDataArgs = { userAddress: Scalars['ID']; -======= -export type QueryGetPendingStreamingPaymentMetadataArgs = { - id: Scalars['ID']; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; /** Root query type */ -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type QueryGetPrivateBetaInviteCodeArgs = { id: Scalars['ID']; }; @@ -8406,26 +8283,16 @@ export type QueryListMultiSigUserSignaturesArgs = { /** Root query type */ -<<<<<<< HEAD -<<<<<<< HEAD export type QueryListNotificationsDataArgs = { filter?: InputMaybe; limit?: InputMaybe; nextToken?: InputMaybe; sortDirection?: InputMaybe; userAddress?: InputMaybe; -======= -export type QueryListPendingStreamingPaymentMetadataArgs = { - filter?: InputMaybe; - limit?: InputMaybe; - nextToken?: InputMaybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; /** Root query type */ -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type QueryListPrivateBetaInviteCodesArgs = { filter?: InputMaybe; limit?: InputMaybe; @@ -9499,14 +9366,7 @@ export type Subscription = { onCreateLiquidationAddress?: Maybe; onCreateMotionMessage?: Maybe; onCreateMultiSigUserSignature?: Maybe; -<<<<<<< HEAD -<<<<<<< HEAD onCreateNotificationsData?: Maybe; -======= - onCreatePendingStreamingPaymentMetadata?: Maybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) onCreatePrivateBetaInviteCode?: Maybe; onCreateProfile?: Maybe; onCreateReputationMiningCycleMetadata?: Maybe; @@ -9550,14 +9410,7 @@ export type Subscription = { onDeleteLiquidationAddress?: Maybe; onDeleteMotionMessage?: Maybe; onDeleteMultiSigUserSignature?: Maybe; -<<<<<<< HEAD -<<<<<<< HEAD onDeleteNotificationsData?: Maybe; -======= - onDeletePendingStreamingPaymentMetadata?: Maybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) onDeletePrivateBetaInviteCode?: Maybe; onDeleteProfile?: Maybe; onDeleteReputationMiningCycleMetadata?: Maybe; @@ -9601,14 +9454,7 @@ export type Subscription = { onUpdateLiquidationAddress?: Maybe; onUpdateMotionMessage?: Maybe; onUpdateMultiSigUserSignature?: Maybe; -<<<<<<< HEAD -<<<<<<< HEAD onUpdateNotificationsData?: Maybe; -======= - onUpdatePendingStreamingPaymentMetadata?: Maybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) onUpdatePrivateBetaInviteCode?: Maybe; onUpdateProfile?: Maybe; onUpdateReputationMiningCycleMetadata?: Maybe; @@ -9771,19 +9617,11 @@ export type SubscriptionOnCreateMultiSigUserSignatureArgs = { }; -<<<<<<< HEAD -<<<<<<< HEAD export type SubscriptionOnCreateNotificationsDataArgs = { filter?: InputMaybe; -======= -export type SubscriptionOnCreatePendingStreamingPaymentMetadataArgs = { - filter?: InputMaybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type SubscriptionOnCreatePrivateBetaInviteCodeArgs = { filter?: InputMaybe; }; @@ -9999,19 +9837,11 @@ export type SubscriptionOnDeleteMultiSigUserSignatureArgs = { }; -<<<<<<< HEAD -<<<<<<< HEAD export type SubscriptionOnDeleteNotificationsDataArgs = { filter?: InputMaybe; -======= -export type SubscriptionOnDeletePendingStreamingPaymentMetadataArgs = { - filter?: InputMaybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type SubscriptionOnDeletePrivateBetaInviteCodeArgs = { filter?: InputMaybe; }; @@ -10227,19 +10057,11 @@ export type SubscriptionOnUpdateMultiSigUserSignatureArgs = { }; -<<<<<<< HEAD -<<<<<<< HEAD export type SubscriptionOnUpdateNotificationsDataArgs = { filter?: InputMaybe; -======= -export type SubscriptionOnUpdatePendingStreamingPaymentMetadataArgs = { - filter?: InputMaybe; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type SubscriptionOnUpdatePrivateBetaInviteCodeArgs = { filter?: InputMaybe; }; @@ -11001,8 +10823,6 @@ export type UpdateMultiSigUserSignatureInput = { vote?: InputMaybe; }; -<<<<<<< HEAD -<<<<<<< HEAD export type UpdateNotificationsDataInput = { adminNotificationsDisabled?: InputMaybe; magicbellUserId?: InputMaybe; @@ -11011,15 +10831,8 @@ export type UpdateNotificationsDataInput = { notificationsDisabled?: InputMaybe; paymentNotificationsDisabled?: InputMaybe; userAddress: Scalars['ID']; -======= -export type UpdatePendingStreamingPaymentMetadataInput = { - endCondition?: InputMaybe; - id: Scalars['ID']; ->>>>>>> 0f3b0771a (Feat: Edit streams using motions) }; -======= ->>>>>>> 62000cf72 (Feat: Add changelog to streaming payment and streaming payment metadata) export type UpdatePrivateBetaInviteCodeInput = { id: Scalars['ID']; shareableInvites?: InputMaybe; From 6181739fa2231d128ac10853c19a42794b8f38b1 Mon Sep 17 00:00:00 2001 From: Joanna Date: Wed, 17 Jul 2024 11:07:16 +0200 Subject: [PATCH 053/126] feat: streaming payments extension page --- .../ExtensionDetailsSidePanel/UninstallButton.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx index 57c4d3bd9e4..3a6f4a5810a 100644 --- a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx +++ b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx @@ -146,6 +146,16 @@ const UninstallButton = ({ const hasActiveStream = false; const hasUnclaimedFunds = false; + const shouldShowWarning = + isStreamingPaymentsExtension && (hasActiveStream || hasUnclaimedFunds); + + const isStreamingPaymentsExtension = + extensionId === Extension.StreamingPayments; + + // @todo: add proper logic here to determine if there are active streams or unclaimed funds + const hasActiveStream = false; + const hasUnclaimedFunds = false; + const shouldShowWarning = isStreamingPaymentsExtension && (hasActiveStream || hasUnclaimedFunds); From ee22b690e0e64bd2a2fbb9ba7864a201852cc764 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Tue, 17 Sep 2024 12:32:32 +0100 Subject: [PATCH 054/126] Fix: C2F address adjustment in createStreamingPayment saga --- src/redux/sagas/expenditures/createStreamingPayment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redux/sagas/expenditures/createStreamingPayment.ts b/src/redux/sagas/expenditures/createStreamingPayment.ts index 991e9e46c42..c8cc7d40d89 100644 --- a/src/redux/sagas/expenditures/createStreamingPayment.ts +++ b/src/redux/sagas/expenditures/createStreamingPayment.ts @@ -217,7 +217,7 @@ function* createStreamingPaymentAction({ startTimestamp, realEndTimestamp, interval, - paymentAddress, + adjustedRecipientAddress, tokenAddress, amountInWei, ], From e7e61d622bc419b0d73f353fc902b87568364939 Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 7 Nov 2024 22:36:58 +0100 Subject: [PATCH 055/126] fix: use new id --- .../partials/StreamingPayment/StreamingPayment.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 4e748b1892c..67cdd320b64 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -177,6 +177,8 @@ const StreamingPayment: FC = ({ const isStartImmediately = Math.abs(startTimeDate.getTime() - new Date(createdAt).getTime()) < 60000; + // console.log({isStartImmediately, startTimeDate, createdAt}); + const meatballOptions: MeatBallMenuItem[] = [ { key: '1', From 1772ef13e107d3cf80db69fd004d3940fe8d748a Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 14 Nov 2024 10:32:20 +0100 Subject: [PATCH 056/126] fix: remove clg --- .../partials/StreamingPayment/StreamingPayment.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 67cdd320b64..4e748b1892c 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -177,8 +177,6 @@ const StreamingPayment: FC = ({ const isStartImmediately = Math.abs(startTimeDate.getTime() - new Date(createdAt).getTime()) < 60000; - // console.log({isStartImmediately, startTimeDate, createdAt}); - const meatballOptions: MeatBallMenuItem[] = [ { key: '1', From 077cd0ed12093ca3609962a7c79e1a447d962bbd Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Fri, 13 Dec 2024 15:17:33 +0100 Subject: [PATCH 057/126] fix: refresh available funds --- .../StreamingPaymentWidget/StreamingPaymentWidget.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx index f90e4c6993d..a585e9f990f 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx @@ -97,6 +97,14 @@ const StreamingPaymentWidget: FC = ({ const [hasEnoughFunds, setHasEnoughFunds] = useState(checkIfHasEnoughFunds()); + useEffect(() => { + setHasEnoughFunds(checkIfHasEnoughFunds()); + }, [ + checkIfHasEnoughFunds, + amounts.amountAvailableToClaim, + streamingPaymentData, + ]); + const claim = useAsyncFunction({ submit: ActionTypes.STREAMING_PAYMENT_CLAIM, error: ActionTypes.STREAMING_PAYMENT_CLAIM_ERROR, From 9d593c1a9594902df4122514adfe912dca22d569 Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Tue, 17 Dec 2024 11:21:19 +0100 Subject: [PATCH 058/126] fix: dep array --- .../StreamingPaymentWidget/StreamingPaymentWidget.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx index a585e9f990f..d02ce0b8a52 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx @@ -99,11 +99,7 @@ const StreamingPaymentWidget: FC = ({ useEffect(() => { setHasEnoughFunds(checkIfHasEnoughFunds()); - }, [ - checkIfHasEnoughFunds, - amounts.amountAvailableToClaim, - streamingPaymentData, - ]); + }, [checkIfHasEnoughFunds]); const claim = useAsyncFunction({ submit: ActionTypes.STREAMING_PAYMENT_CLAIM, From 518580a76391d761c880db6add87762ae36d2a3c Mon Sep 17 00:00:00 2001 From: strzelec Date: Fri, 11 Oct 2024 14:15:45 +0200 Subject: [PATCH 059/126] feat: add widgets for streaming payments page --- src/apollo/cache/index.ts | 23 +++ .../StreamsInfoRow/StreamsInfoRow.tsx | 2 +- .../partials/StreamsInfoRow/hooks.ts | 142 +++++++++++++----- .../partials/StreamsInfoRow/utils.ts | 58 +++++++ .../StreamingPaymentsPage.tsx | 26 +++- .../partials/StatsCards/StatsCards.tsx | 93 ++++++++++++ src/graphql/generated.ts | 8 +- src/graphql/queries/streamingPayments.graphql | 8 +- src/i18n/en.json | 4 + 9 files changed, 317 insertions(+), 47 deletions(-) create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx diff --git a/src/apollo/cache/index.ts b/src/apollo/cache/index.ts index 21725709115..76c01e8dc0a 100644 --- a/src/apollo/cache/index.ts +++ b/src/apollo/cache/index.ts @@ -151,6 +151,29 @@ const cache = new InMemoryCache({ }; }, }, + getStreamingPaymentsByColony: { + keyArgs: ['$domainId', '$recipientAddress'], + merge(existing = {}, incoming, { args }) { + // remove duplicates from incoming data + const uniqueIncomingItems = Array.from( + new Map( + // eslint-disable-next-line no-underscore-dangle + incoming.items.map((item) => [item.__ref, item]), + ).values(), + ); + + if (!args?.nextToken) { + return { + ...incoming, + items: uniqueIncomingItems, + }; + } + return { + ...incoming, + items: [...existing.items, ...uniqueIncomingItems], + }; + }, + }, }, }, ...cacheUpdates, diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx index 9681ae8468e..e6c167866a8 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx @@ -55,7 +55,7 @@ const StreamsInfoRow: FC = () => { currency, getTotalFunds, streamingPayments, - } = useStreamingPaymentsTotalFunds(); + } = useStreamingPaymentsTotalFunds({}); return ( { +interface useStreamingPaymentsTotalFundsProps { + getDataByRecipentAddress?: boolean; + nativeDomainId?: number; +} + +export const useStreamingPaymentsTotalFunds = ({ + getDataByRecipentAddress = true, + nativeDomainId = undefined, +}: useStreamingPaymentsTotalFundsProps) => { const { user } = useAppContext(); const { walletAddress } = user ?? {}; const { currentBlockTime: blockTime } = useCurrentBlockTime(); const { colony } = useColonyContext(); - const { data, loading, fetchMore } = useGetStreamingPaymentsByColonyQuery({ - variables: { - recipientAddress: walletAddress ?? '', - colonyId: colony.colonyAddress, - }, - onCompleted: (receivedData) => { - if (receivedData?.getStreamingPaymentsByColony?.nextToken) { - fetchMore({ - variables: { - nextToken: receivedData.getStreamingPaymentsByColony.nextToken, - }, - updateQuery: (prev, { fetchMoreResult }) => { - if (!fetchMoreResult) return prev; - - return { - ...prev, - getStreamingPaymentsByColony: { - ...prev.getStreamingPaymentsByColony, - items: [ - ...(prev?.getStreamingPaymentsByColony?.items || []), - ...(fetchMoreResult?.getStreamingPaymentsByColony?.items || - []), - ], - nextToken: - fetchMoreResult?.getStreamingPaymentsByColony?.nextToken, - }, - }; - }, - }); - } - }, - }); + const [getStreamingPaymentsByColony, { data, loading, fetchMore }] = + useGetStreamingPaymentsByColonyLazyQuery({ + variables: { + ...(getDataByRecipentAddress && + walletAddress && { + recipientAddress: walletAddress, + }), + ...(nativeDomainId && { + domainId: nativeDomainId, + }), + colonyId: colony.colonyAddress, + }, + onCompleted: (receivedData) => { + if (receivedData?.getStreamingPaymentsByColony?.nextToken) { + fetchMore({ + variables: { + nextToken: receivedData.getStreamingPaymentsByColony.nextToken, + }, + updateQuery: (prev, { fetchMoreResult }) => { + if (!fetchMoreResult) return prev; + + return { + ...prev, + getStreamingPaymentsByColony: { + ...prev.getStreamingPaymentsByColony, + items: [ + ...(prev?.getStreamingPaymentsByColony?.items || []), + ...(fetchMoreResult?.getStreamingPaymentsByColony?.items || + []), + ], + nextToken: + fetchMoreResult?.getStreamingPaymentsByColony?.nextToken, + }, + }; + }, + }); + } + }, + }); const streamingPayments = useMemo( () => data?.getStreamingPaymentsByColony?.items?.filter(notNull) || [], @@ -65,6 +88,8 @@ export const useStreamingPaymentsTotalFunds = () => { }); const [isAnyPaymentActive, setIsAnyPaymentActive] = useState(false); const [ratePerSecond, setRatePerSecond] = useState(0); + const [activeStreamingPayments, setActiveStreamingPayments] = useState(0); + const [averagePerMonth, setAveragePerMonth] = useState(0); const getTotalFunds = useCallback( async (items: StreamingPaymentItems) => { @@ -73,6 +98,7 @@ export const useStreamingPaymentsTotalFunds = () => { totalClaimed, isAtLeastOnePaymentActive, ratePerSecond: ratePerSecondValue, + itemsCountedToAverage, } = await calculateTotalsFromStreams({ streamingPayments: items, currentTimestamp: Math.floor(blockTime ?? Date.now() / 1000), @@ -80,13 +106,48 @@ export const useStreamingPaymentsTotalFunds = () => { colony, }); + const averageStreamingPerMonth = calculateAverageStreamingPayment( + new Date(blockTime ?? Date.now() / 1000), + itemsCountedToAverage, + ); + + setAveragePerMonth(averageStreamingPerMonth); + setIsAnyPaymentActive(isAtLeastOnePaymentActive); - setTotalFunds({ totalAvailable, totalClaimed }); + setTotalFunds({ + totalAvailable, + totalClaimed, + }); setRatePerSecond(ratePerSecondValue); }, [blockTime, colony, currency], ); + const getTotalActiveStreamingPayments = useCallback( + (items: StreamingPaymentItems) => { + const activeStreams = items.filter((item) => { + const { amountAvailableToClaim } = getStreamingPaymentAmountsLeft( + item, + Math.floor(blockTime ?? Date.now() / 1000), + ); + return ( + getStreamingPaymentStatus({ + streamingPayment: item, + currentTimestamp: Math.floor(blockTime ?? Date.now() / 1000), + amountAvailableToClaim, + }) === StreamingPaymentStatus.Active + ); + }); + + setActiveStreamingPayments(activeStreams.length); + }, + [blockTime], + ); + + useEffect(() => { + getStreamingPaymentsByColony(); + }, [getDataByRecipentAddress, nativeDomainId, getStreamingPaymentsByColony]); + useEffect(() => { fetchMore({ variables: { @@ -112,10 +173,9 @@ export const useStreamingPaymentsTotalFunds = () => { }, [colony.colonyAddress, fetchMore, walletAddress]); useEffect(() => { - if (streamingPayments.length) { - getTotalFunds(streamingPayments); - } - }, [getTotalFunds, streamingPayments]); + getTotalFunds(streamingPayments); + getTotalActiveStreamingPayments(streamingPayments); + }, [getTotalFunds, streamingPayments, getTotalActiveStreamingPayments]); return { totalFunds, @@ -125,5 +185,7 @@ export const useStreamingPaymentsTotalFunds = () => { currency, getTotalFunds, streamingPayments, + activeStreamingPayments, + averagePerMonth, }; }; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts index 19df548e363..d4db2fb795e 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts @@ -1,3 +1,4 @@ +import { differenceInYears, differenceInMonths, isAfter } from 'date-fns'; import Decimal from 'decimal.js'; import { type ColonyFragment, type SupportedCurrencies } from '~gql'; @@ -44,6 +45,43 @@ export const calculateToCurrency = async ({ return new Decimal(balanceInWeiToEth).mul(currentPrice ?? 0); }; +const isDateEarlierThanOneYear = (currentDate: Date, dateToCheck: Date) => { + const today = currentDate; + + return ( + isAfter(today, dateToCheck) && differenceInYears(today, dateToCheck) === 0 + ); +}; + +export const calculateAverageStreamingPayment = ( + currentDate: Date, + items: { + startDate: Date; + claimedFunds: any; + }[], +) => { + const dateToday = new Date(+currentDate * 1000); + + const oldestItemDate = items.length + ? items.reduce((oldest, item) => { + return item.startDate < oldest.startDate ? item : oldest; + }).startDate + : 0; + + const monthsDifference = + oldestItemDate !== 0 ? differenceInMonths(dateToday, oldestItemDate) : 0; + + const totalClaimedFunds = items.length + ? items.reduce((sum, item) => { + return sum + Number(item.claimedFunds); + }, 0) + : 0; + + return monthsDifference !== 0 + ? totalClaimedFunds / monthsDifference + : totalClaimedFunds; +}; + export const calculateTotalsFromStreams = async ({ colony, currency, @@ -95,11 +133,17 @@ export const calculateTotalsFromStreams = async ({ colony, }); + const isItemsCountedToAverage = isDateEarlierThanOneYear( + new Date(currentTimestamp * 1000), + new Date(+item.startTime * 1000), + ); + const { totalAvailable, totalClaimed, isAtLeastOnePaymentActive, ratePerSecond, + itemsCountedToAverage, } = await result; return { @@ -111,6 +155,17 @@ export const calculateTotalsFromStreams = async ({ isAtLeastOnePaymentActive: paymentStatus === StreamingPaymentStatus.Active || isAtLeastOnePaymentActive, + itemsCountedToAverage: isItemsCountedToAverage + ? [ + ...itemsCountedToAverage, + { + startDate: new Date(+item.startTime * 1000), + claimedFunds: amountClaimedToDateToCurrency + ? amountClaimedToDateToCurrency.toNumber() + : 0, + }, + ] + : itemsCountedToAverage, }; }, Promise.resolve({ @@ -118,6 +173,7 @@ export const calculateTotalsFromStreams = async ({ totalClaimed: new Decimal(0), ratePerSecond: new Decimal(0), isAtLeastOnePaymentActive: false, + itemsCountedToAverage: [], }), ); @@ -126,6 +182,7 @@ export const calculateTotalsFromStreams = async ({ totalAvailable, isAtLeastOnePaymentActive, ratePerSecond, + itemsCountedToAverage, } = await totals; return { @@ -133,5 +190,6 @@ export const calculateTotalsFromStreams = async ({ totalAvailable: totalAvailable.toNumber(), ratePerSecond: ratePerSecond.toNumber(), isAtLeastOnePaymentActive, + itemsCountedToAverage, }; }; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx index 6dc13864489..450d6a353f3 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -1,8 +1,13 @@ import React from 'react'; +import { useStreamingPaymentsTotalFunds } from '~common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/hooks.ts'; +import { currencySymbolMap } from '~constants/currency.ts'; import { useSetPageHeadingTitle } from '~context/PageHeadingContext/PageHeadingContext.ts'; +import useGetSelectedDomainFilter from '~hooks/useGetSelectedDomainFilter.tsx'; import { formatText } from '~utils/intl.ts'; +import StatsCards from './partials/StatsCards/StatsCards.tsx'; + const displayName = 'v5.pages.StreamingPaymentsPage'; const StreamingPaymentsPage = () => { @@ -10,7 +15,26 @@ const StreamingPaymentsPage = () => { formatText({ id: 'navigation.finances.streamingPayments' }), ); - return
; + const nativeDomainId = useGetSelectedDomainFilter()?.nativeId; + + const { totalFunds, activeStreamingPayments, averagePerMonth, currency } = + useStreamingPaymentsTotalFunds({ + getDataByRecipentAddress: false, + nativeDomainId, + }); + + return ( +
+ +
+ ); }; StreamingPaymentsPage.displayName = displayName; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx new file mode 100644 index 00000000000..6753e9cee93 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx @@ -0,0 +1,93 @@ +import React from 'react'; + +import { type NumeralValue } from '~shared/Numeral/Numeral.tsx'; +import Numeral from '~shared/Numeral/Numeral.tsx'; +import { formatText } from '~utils/intl.ts'; +import WidgetBox from '~v5/common/WidgetBox/WidgetBox.tsx'; + +export interface StatsCardsProps { + streamingPerMonth: NumeralValue; + totalActiveStreams: number; + totalStreamed: NumeralValue; + unclaimedFounds: NumeralValue; + prefix: string; + suffix: string; +} + +const displayName = 'v5.pages.StreamingPaymentsPage.partials.StatsCards'; + +const StatsCards = ({ + streamingPerMonth, + totalActiveStreams, + totalStreamed, + unclaimedFounds, + prefix, + suffix, +}: StatsCardsProps) => { + return ( +
+ +
+

{prefix}

+ +
+

{suffix} / month

+
+ } + /> + + +
+

{prefix}

+ +
+

{suffix}

+
+ } + /> + +
+

{prefix}

+ +
+

{suffix}

+ + } + /> + {totalActiveStreams}} + /> + + ); +}; + +StatsCards.displayName = displayName; + +export default StatsCards; diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index 4fdba174f7d..9c5afb892ca 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -12105,7 +12105,8 @@ export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ sortDirection?: InputMaybe; limit?: InputMaybe; nextToken?: InputMaybe; - recipientAddress: Scalars['String']; + recipientAddress?: InputMaybe; + domainId?: InputMaybe; }>; @@ -16829,13 +16830,13 @@ export type GetUserStakesQueryResult = Apollo.QueryResult Date: Thu, 24 Oct 2024 13:53:45 +0200 Subject: [PATCH 060/126] fix: streaming payments code review improvements --- .../StreamsInfoRow/StreamsInfoRow.tsx | 3 +- .../StreamingPaymentsPage.tsx | 4 +- .../StreamingPayments}/hooks.ts | 103 ++++++++++-------- .../StreamingPayments}/types.ts | 0 .../StreamingPayments}/utils.ts | 18 +-- src/i18n/en.json | 2 +- 6 files changed, 65 insertions(+), 65 deletions(-) rename src/components/{common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow => shared/StreamingPayments}/hooks.ts (73%) rename src/components/{common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow => shared/StreamingPayments}/types.ts (100%) rename src/components/{common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow => shared/StreamingPayments}/utils.ts (92%) diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx index e6c167866a8..06ede9f86cd 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx @@ -7,6 +7,7 @@ import UserHubInfoSection from '~common/Extensions/UserHub/partials/UserHubInfoS import LoadingSkeleton from '~common/LoadingSkeleton/LoadingSkeleton.tsx'; import { currencySymbolMap } from '~constants/currency.ts'; import Numeral from '~shared/Numeral/Numeral.tsx'; +import { useStreamingPaymentsTotalFunds } from '~shared/StreamingPayments/hooks.ts'; import { formatText } from '~utils/intl.ts'; // @todo: uncomment and update when claim all streams functionality will be implemented // import Button from '~v5/shared/Button/Button.tsx'; @@ -14,8 +15,6 @@ import { formatText } from '~utils/intl.ts'; import AvailableToClaimCounter from '../AvailableToClaimCounter/AvailableToClaimCounter.tsx'; -import { useStreamingPaymentsTotalFunds } from './hooks.ts'; - const displayName = 'common.Extensions.UserHub.partials.BalanceTab.partials.StreamsInfoRow'; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx index 450d6a353f3..cfb74791d96 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -1,9 +1,9 @@ import React from 'react'; -import { useStreamingPaymentsTotalFunds } from '~common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/hooks.ts'; import { currencySymbolMap } from '~constants/currency.ts'; import { useSetPageHeadingTitle } from '~context/PageHeadingContext/PageHeadingContext.ts'; import useGetSelectedDomainFilter from '~hooks/useGetSelectedDomainFilter.tsx'; +import { useStreamingPaymentsTotalFunds } from '~shared/StreamingPayments/hooks.ts'; import { formatText } from '~utils/intl.ts'; import StatsCards from './partials/StatsCards/StatsCards.tsx'; @@ -19,7 +19,7 @@ const StreamingPaymentsPage = () => { const { totalFunds, activeStreamingPayments, averagePerMonth, currency } = useStreamingPaymentsTotalFunds({ - getDataByRecipentAddress: false, + isFilteredByWalletAddress: false, nativeDomainId, }); diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/hooks.ts b/src/components/shared/StreamingPayments/hooks.ts similarity index 73% rename from src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/hooks.ts rename to src/components/shared/StreamingPayments/hooks.ts index e79076c7324..0047e608207 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/hooks.ts +++ b/src/components/shared/StreamingPayments/hooks.ts @@ -3,7 +3,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; import { useCurrencyContext } from '~context/CurrencyContext/CurrencyContext.ts'; -import { useGetStreamingPaymentsByColonyLazyQuery } from '~gql'; +import { useGetStreamingPaymentsByColonyQuery } from '~gql'; import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; import { notNull } from '~utils/arrays/index.ts'; @@ -19,12 +19,12 @@ import { } from './utils.ts'; interface useStreamingPaymentsTotalFundsProps { - getDataByRecipentAddress?: boolean; + isFilteredByWalletAddress?: boolean; nativeDomainId?: number; } export const useStreamingPaymentsTotalFunds = ({ - getDataByRecipentAddress = true, + isFilteredByWalletAddress = true, nativeDomainId = undefined, }: useStreamingPaymentsTotalFundsProps) => { const { user } = useAppContext(); @@ -32,45 +32,44 @@ export const useStreamingPaymentsTotalFunds = ({ const { currentBlockTime: blockTime } = useCurrentBlockTime(); const { colony } = useColonyContext(); - const [getStreamingPaymentsByColony, { data, loading, fetchMore }] = - useGetStreamingPaymentsByColonyLazyQuery({ - variables: { - ...(getDataByRecipentAddress && - walletAddress && { - recipientAddress: walletAddress, - }), - ...(nativeDomainId && { - domainId: nativeDomainId, + const { data, loading, fetchMore } = useGetStreamingPaymentsByColonyQuery({ + variables: { + ...(isFilteredByWalletAddress && + walletAddress && { + recipientAddress: walletAddress, }), - colonyId: colony.colonyAddress, - }, - onCompleted: (receivedData) => { - if (receivedData?.getStreamingPaymentsByColony?.nextToken) { - fetchMore({ - variables: { - nextToken: receivedData.getStreamingPaymentsByColony.nextToken, - }, - updateQuery: (prev, { fetchMoreResult }) => { - if (!fetchMoreResult) return prev; - - return { - ...prev, - getStreamingPaymentsByColony: { - ...prev.getStreamingPaymentsByColony, - items: [ - ...(prev?.getStreamingPaymentsByColony?.items || []), - ...(fetchMoreResult?.getStreamingPaymentsByColony?.items || - []), - ], - nextToken: - fetchMoreResult?.getStreamingPaymentsByColony?.nextToken, - }, - }; - }, - }); - } - }, - }); + ...(nativeDomainId && { + domainId: nativeDomainId, + }), + colonyId: colony.colonyAddress, + }, + onCompleted: (receivedData) => { + if (receivedData?.getStreamingPaymentsByColony?.nextToken) { + fetchMore({ + variables: { + nextToken: receivedData.getStreamingPaymentsByColony.nextToken, + }, + updateQuery: (prev, { fetchMoreResult }) => { + if (!fetchMoreResult) return prev; + + return { + ...prev, + getStreamingPaymentsByColony: { + ...prev.getStreamingPaymentsByColony, + items: [ + ...(prev?.getStreamingPaymentsByColony?.items || []), + ...(fetchMoreResult?.getStreamingPaymentsByColony?.items || + []), + ], + nextToken: + fetchMoreResult?.getStreamingPaymentsByColony?.nextToken, + }, + }; + }, + }); + } + }, + }); const streamingPayments = useMemo( () => data?.getStreamingPaymentsByColony?.items?.filter(notNull) || [], @@ -107,7 +106,7 @@ export const useStreamingPaymentsTotalFunds = ({ }); const averageStreamingPerMonth = calculateAverageStreamingPayment( - new Date(blockTime ?? Date.now() / 1000), + new Date(blockTime ? blockTime * 1000 : Date.now()), itemsCountedToAverage, ); @@ -144,14 +143,16 @@ export const useStreamingPaymentsTotalFunds = ({ [blockTime], ); - useEffect(() => { - getStreamingPaymentsByColony(); - }, [getDataByRecipentAddress, nativeDomainId, getStreamingPaymentsByColony]); - useEffect(() => { fetchMore({ variables: { - recipientAddress: walletAddress ?? '', + ...(isFilteredByWalletAddress && + walletAddress && { + recipientAddress: walletAddress, + }), + ...(nativeDomainId && { + domainId: nativeDomainId, + }), colonyId: colony.colonyAddress, }, updateQuery: (prev, { fetchMoreResult }) => { @@ -170,7 +171,13 @@ export const useStreamingPaymentsTotalFunds = ({ }; }, }); - }, [colony.colonyAddress, fetchMore, walletAddress]); + }, [ + colony.colonyAddress, + fetchMore, + walletAddress, + isFilteredByWalletAddress, + nativeDomainId, + ]); useEffect(() => { getTotalFunds(streamingPayments); diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/types.ts b/src/components/shared/StreamingPayments/types.ts similarity index 100% rename from src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/types.ts rename to src/components/shared/StreamingPayments/types.ts diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts b/src/components/shared/StreamingPayments/utils.ts similarity index 92% rename from src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts rename to src/components/shared/StreamingPayments/utils.ts index d4db2fb795e..d1f0568ad6d 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts +++ b/src/components/shared/StreamingPayments/utils.ts @@ -45,23 +45,17 @@ export const calculateToCurrency = async ({ return new Decimal(balanceInWeiToEth).mul(currentPrice ?? 0); }; -const isDateEarlierThanOneYear = (currentDate: Date, dateToCheck: Date) => { - const today = currentDate; - - return ( - isAfter(today, dateToCheck) && differenceInYears(today, dateToCheck) === 0 - ); -}; +const isDateWithinPastYear = (currentDate: Date, dateToCheck: Date) => + isAfter(currentDate, dateToCheck) && + differenceInYears(currentDate, dateToCheck) === 0; export const calculateAverageStreamingPayment = ( currentDate: Date, items: { startDate: Date; - claimedFunds: any; + claimedFunds: number; }[], ) => { - const dateToday = new Date(+currentDate * 1000); - const oldestItemDate = items.length ? items.reduce((oldest, item) => { return item.startDate < oldest.startDate ? item : oldest; @@ -69,7 +63,7 @@ export const calculateAverageStreamingPayment = ( : 0; const monthsDifference = - oldestItemDate !== 0 ? differenceInMonths(dateToday, oldestItemDate) : 0; + oldestItemDate !== 0 ? differenceInMonths(currentDate, oldestItemDate) : 0; const totalClaimedFunds = items.length ? items.reduce((sum, item) => { @@ -133,7 +127,7 @@ export const calculateTotalsFromStreams = async ({ colony, }); - const isItemsCountedToAverage = isDateEarlierThanOneYear( + const isItemsCountedToAverage = isDateWithinPastYear( new Date(currentTimestamp * 1000), new Date(+item.startTime * 1000), ); diff --git a/src/i18n/en.json b/src/i18n/en.json index 4f17b9f97a3..3baa4d08a68 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -755,7 +755,7 @@ "meatballMenu.selectAction": "Select action", "streamingPaymentsPage.widget.totalStreaming": "Total streaming", "streamingPaymentsPage.widget.totalStreamed": "Total streamed", - "streamingPaymentsPage.widget.unclaimedFounds": "Unclaimed founds", + "streamingPaymentsPage.widget.unclaimedFounds": "Unclaimed funds", "streamingPaymentsPage.widget.totalActiveStreams": "Total active streams", "loading.membersPage": "Loading members page", "loading.contributorsPage": "Loading contributors page", From 0a3aa6b8d82d91741d1e27f9cc35c3ff577f8ba0 Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 28 Oct 2024 12:29:40 +0100 Subject: [PATCH 061/126] fix: add corrections --- .../StreamingPaymentsPage.tsx | 17 +++--- .../partials/StatsCards/StatsCards.tsx | 23 ++++---- .../shared/StreamingPayments/hooks.ts | 15 ++---- .../shared/StreamingPayments/utils.ts | 53 ++++++++----------- 4 files changed, 48 insertions(+), 60 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx index cfb74791d96..5b1a8cfa9b6 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -17,18 +17,23 @@ const StreamingPaymentsPage = () => { const nativeDomainId = useGetSelectedDomainFilter()?.nativeId; - const { totalFunds, activeStreamingPayments, averagePerMonth, currency } = - useStreamingPaymentsTotalFunds({ - isFilteredByWalletAddress: false, - nativeDomainId, - }); + const { + totalFunds, + activeStreamingPayments, + averagePerMonth, + currency, + totalStreamed, + } = useStreamingPaymentsTotalFunds({ + isFilteredByWalletAddress: false, + nativeDomainId, + }); return (

{prefix}

- +

+ {getFormattedTokenAmount(`${streamingPerMonth}`, 0)} +

{suffix} / month

@@ -52,10 +51,9 @@ const StatsCards = ({

{prefix}

- +

+ {getFormattedTokenAmount(`${totalStreamed}`, 0)} +

{suffix}

@@ -69,10 +67,9 @@ const StatsCards = ({

{prefix}

- +

+ {getFormattedTokenAmount(`${unclaimedFounds}`, 0)} +

{suffix}

diff --git a/src/components/shared/StreamingPayments/hooks.ts b/src/components/shared/StreamingPayments/hooks.ts index 0047e608207..90bf25ac327 100644 --- a/src/components/shared/StreamingPayments/hooks.ts +++ b/src/components/shared/StreamingPayments/hooks.ts @@ -13,10 +13,7 @@ import { } from '~utils/streamingPayments.ts'; import { type StreamingPaymentItems } from './types.ts'; -import { - calculateAverageStreamingPayment, - calculateTotalsFromStreams, -} from './utils.ts'; +import { calculateStreamedFunds, calculateTotalsFromStreams } from './utils.ts'; interface useStreamingPaymentsTotalFundsProps { isFilteredByWalletAddress?: boolean; @@ -97,18 +94,15 @@ export const useStreamingPaymentsTotalFunds = ({ totalClaimed, isAtLeastOnePaymentActive, ratePerSecond: ratePerSecondValue, - itemsCountedToAverage, + itemsWithinLastMonth, } = await calculateTotalsFromStreams({ streamingPayments: items, currentTimestamp: Math.floor(blockTime ?? Date.now() / 1000), currency, colony, }); - - const averageStreamingPerMonth = calculateAverageStreamingPayment( - new Date(blockTime ? blockTime * 1000 : Date.now()), - itemsCountedToAverage, - ); + const averageStreamingPerMonth = + calculateStreamedFunds(itemsWithinLastMonth); setAveragePerMonth(averageStreamingPerMonth); @@ -185,6 +179,7 @@ export const useStreamingPaymentsTotalFunds = ({ }, [getTotalFunds, streamingPayments, getTotalActiveStreamingPayments]); return { + totalStreamed: totalFunds.totalClaimed + totalFunds.totalAvailable, totalFunds, isAnyPaymentActive, ratePerSecond, diff --git a/src/components/shared/StreamingPayments/utils.ts b/src/components/shared/StreamingPayments/utils.ts index d1f0568ad6d..cba789d8f46 100644 --- a/src/components/shared/StreamingPayments/utils.ts +++ b/src/components/shared/StreamingPayments/utils.ts @@ -1,4 +1,4 @@ -import { differenceInYears, differenceInMonths, isAfter } from 'date-fns'; +import { differenceInMonths, isAfter } from 'date-fns'; import Decimal from 'decimal.js'; import { type ColonyFragment, type SupportedCurrencies } from '~gql'; @@ -45,35 +45,23 @@ export const calculateToCurrency = async ({ return new Decimal(balanceInWeiToEth).mul(currentPrice ?? 0); }; -const isDateWithinPastYear = (currentDate: Date, dateToCheck: Date) => +const isDateWithinPastMonth = (currentDate: Date, dateToCheck: Date) => isAfter(currentDate, dateToCheck) && - differenceInYears(currentDate, dateToCheck) === 0; + differenceInMonths(currentDate, dateToCheck) === 0; -export const calculateAverageStreamingPayment = ( - currentDate: Date, +export const calculateStreamedFunds = ( items: { startDate: Date; - claimedFunds: number; + streamedFunds: number; }[], ) => { - const oldestItemDate = items.length - ? items.reduce((oldest, item) => { - return item.startDate < oldest.startDate ? item : oldest; - }).startDate - : 0; - - const monthsDifference = - oldestItemDate !== 0 ? differenceInMonths(currentDate, oldestItemDate) : 0; - - const totalClaimedFunds = items.length + const totalStreamedFunds = items.length ? items.reduce((sum, item) => { - return sum + Number(item.claimedFunds); + return sum + Number(item.streamedFunds); }, 0) : 0; - return monthsDifference !== 0 - ? totalClaimedFunds / monthsDifference - : totalClaimedFunds; + return totalStreamedFunds; }; export const calculateTotalsFromStreams = async ({ @@ -127,7 +115,7 @@ export const calculateTotalsFromStreams = async ({ colony, }); - const isItemsCountedToAverage = isDateWithinPastYear( + const isItemsWithinLastMonth = isDateWithinPastMonth( new Date(currentTimestamp * 1000), new Date(+item.startTime * 1000), ); @@ -137,7 +125,7 @@ export const calculateTotalsFromStreams = async ({ totalClaimed, isAtLeastOnePaymentActive, ratePerSecond, - itemsCountedToAverage, + itemsWithinLastMonth, } = await result; return { @@ -149,17 +137,20 @@ export const calculateTotalsFromStreams = async ({ isAtLeastOnePaymentActive: paymentStatus === StreamingPaymentStatus.Active || isAtLeastOnePaymentActive, - itemsCountedToAverage: isItemsCountedToAverage + itemsWithinLastMonth: isItemsWithinLastMonth ? [ - ...itemsCountedToAverage, + ...itemsWithinLastMonth, { startDate: new Date(+item.startTime * 1000), - claimedFunds: amountClaimedToDateToCurrency - ? amountClaimedToDateToCurrency.toNumber() - : 0, + streamedFunds: + amountClaimedToDateToCurrency && + amountAvailableToClaimToCurrency + ? amountClaimedToDateToCurrency.toNumber() + + amountAvailableToClaimToCurrency.toNumber() + : 0, }, ] - : itemsCountedToAverage, + : itemsWithinLastMonth, }; }, Promise.resolve({ @@ -167,7 +158,7 @@ export const calculateTotalsFromStreams = async ({ totalClaimed: new Decimal(0), ratePerSecond: new Decimal(0), isAtLeastOnePaymentActive: false, - itemsCountedToAverage: [], + itemsWithinLastMonth: [], }), ); @@ -176,7 +167,7 @@ export const calculateTotalsFromStreams = async ({ totalAvailable, isAtLeastOnePaymentActive, ratePerSecond, - itemsCountedToAverage, + itemsWithinLastMonth, } = await totals; return { @@ -184,6 +175,6 @@ export const calculateTotalsFromStreams = async ({ totalAvailable: totalAvailable.toNumber(), ratePerSecond: ratePerSecond.toNumber(), isAtLeastOnePaymentActive, - itemsCountedToAverage, + itemsWithinLastMonth, }; }; From f3ac42fb97865509743ed3c337978602bea6e753 Mon Sep 17 00:00:00 2001 From: strzelec Date: Wed, 6 Nov 2024 14:13:28 +0100 Subject: [PATCH 062/126] fix: calculate streams for last 30 days --- .../StreamingPaymentsPage.tsx | 4 +- .../shared/StreamingPayments/hooks.ts | 12 +-- .../shared/StreamingPayments/utils.ts | 93 +++++++++++-------- 3 files changed, 61 insertions(+), 48 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx index 5b1a8cfa9b6..6f0efa7b465 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -20,9 +20,9 @@ const StreamingPaymentsPage = () => { const { totalFunds, activeStreamingPayments, - averagePerMonth, currency, totalStreamed, + totalLastMonthStreaming, } = useStreamingPaymentsTotalFunds({ isFilteredByWalletAddress: false, nativeDomainId, @@ -31,7 +31,7 @@ const StreamingPaymentsPage = () => { return (
(0); const [activeStreamingPayments, setActiveStreamingPayments] = useState(0); - const [averagePerMonth, setAveragePerMonth] = useState(0); + const [totalLastMonthStreaming, setTotalLastMonthStreaming] = useState(0); const getTotalFunds = useCallback( async (items: StreamingPaymentItems) => { @@ -94,17 +94,15 @@ export const useStreamingPaymentsTotalFunds = ({ totalClaimed, isAtLeastOnePaymentActive, ratePerSecond: ratePerSecondValue, - itemsWithinLastMonth, + lastMonthStreaming, } = await calculateTotalsFromStreams({ streamingPayments: items, currentTimestamp: Math.floor(blockTime ?? Date.now() / 1000), currency, colony, }); - const averageStreamingPerMonth = - calculateStreamedFunds(itemsWithinLastMonth); - setAveragePerMonth(averageStreamingPerMonth); + setTotalLastMonthStreaming(lastMonthStreaming); setIsAnyPaymentActive(isAtLeastOnePaymentActive); setTotalFunds({ @@ -188,6 +186,6 @@ export const useStreamingPaymentsTotalFunds = ({ getTotalFunds, streamingPayments, activeStreamingPayments, - averagePerMonth, + totalLastMonthStreaming, }; }; diff --git a/src/components/shared/StreamingPayments/utils.ts b/src/components/shared/StreamingPayments/utils.ts index cba789d8f46..5e99df2dc53 100644 --- a/src/components/shared/StreamingPayments/utils.ts +++ b/src/components/shared/StreamingPayments/utils.ts @@ -1,4 +1,4 @@ -import { differenceInMonths, isAfter } from 'date-fns'; +import { isAfter, differenceInDays, subDays } from 'date-fns'; import Decimal from 'decimal.js'; import { type ColonyFragment, type SupportedCurrencies } from '~gql'; @@ -45,23 +45,47 @@ export const calculateToCurrency = async ({ return new Decimal(balanceInWeiToEth).mul(currentPrice ?? 0); }; -const isDateWithinPastMonth = (currentDate: Date, dateToCheck: Date) => - isAfter(currentDate, dateToCheck) && - differenceInMonths(currentDate, dateToCheck) === 0; - -export const calculateStreamedFunds = ( - items: { - startDate: Date; - streamedFunds: number; - }[], -) => { - const totalStreamedFunds = items.length - ? items.reduce((sum, item) => { - return sum + Number(item.streamedFunds); - }, 0) - : 0; - - return totalStreamedFunds; +const calculateStreamsForLast30Days = ({ + startTimestamp, + endTimestamp, + currentTimestamp, + interval, + totalClaimedAmount, +}: { + startTimestamp: number; + endTimestamp: number; + currentTimestamp: number; + interval: number; + totalClaimedAmount: number; +}) => { + const intervalInDays = interval / 24 / 3600; + + const startDate = new Date(startTimestamp * 1000); + const endDate = new Date(endTimestamp * 1000); + const currentDate = new Date(currentTimestamp * 1000); + + const date30DaysAgo = subDays(currentDate, 30); + + if (isAfter(startDate, date30DaysAgo)) { + return totalClaimedAmount; + } + if (isAfter(endDate, date30DaysAgo)) { + const daysIncludedInLast30Days = Math.abs( + differenceInDays( + startDate > date30DaysAgo ? startDate : date30DaysAgo, + endDate > currentDate ? currentDate : endDate, + ), + ); + const totalDays = Math.abs(differenceInDays(startDate, endDate)); + const totalStreams = totalDays / intervalInDays; + const streamsPerDay = totalStreams / totalDays; + const amountPerOneStream = totalClaimedAmount / totalStreams; + const streamedFundsInLast30Days = + daysIncludedInLast30Days * streamsPerDay * amountPerOneStream; + + return streamedFundsInLast30Days; + } + return 0; }; export const calculateTotalsFromStreams = async ({ @@ -115,17 +139,20 @@ export const calculateTotalsFromStreams = async ({ colony, }); - const isItemsWithinLastMonth = isDateWithinPastMonth( - new Date(currentTimestamp * 1000), - new Date(+item.startTime * 1000), - ); + const streamedFundsInLast30Days = calculateStreamsForLast30Days({ + currentTimestamp, + endTimestamp: +item.endTime, + startTimestamp: +item.startTime, + interval: +item.interval, + totalClaimedAmount: amountClaimedToDateToCurrency?.toNumber() ?? 0, + }); const { totalAvailable, totalClaimed, isAtLeastOnePaymentActive, ratePerSecond, - itemsWithinLastMonth, + lastMonthStreaming, } = await result; return { @@ -137,20 +164,7 @@ export const calculateTotalsFromStreams = async ({ isAtLeastOnePaymentActive: paymentStatus === StreamingPaymentStatus.Active || isAtLeastOnePaymentActive, - itemsWithinLastMonth: isItemsWithinLastMonth - ? [ - ...itemsWithinLastMonth, - { - startDate: new Date(+item.startTime * 1000), - streamedFunds: - amountClaimedToDateToCurrency && - amountAvailableToClaimToCurrency - ? amountClaimedToDateToCurrency.toNumber() + - amountAvailableToClaimToCurrency.toNumber() - : 0, - }, - ] - : itemsWithinLastMonth, + lastMonthStreaming: lastMonthStreaming.add(streamedFundsInLast30Days), }; }, Promise.resolve({ @@ -159,6 +173,7 @@ export const calculateTotalsFromStreams = async ({ ratePerSecond: new Decimal(0), isAtLeastOnePaymentActive: false, itemsWithinLastMonth: [], + lastMonthStreaming: new Decimal(0), }), ); @@ -167,7 +182,7 @@ export const calculateTotalsFromStreams = async ({ totalAvailable, isAtLeastOnePaymentActive, ratePerSecond, - itemsWithinLastMonth, + lastMonthStreaming, } = await totals; return { @@ -175,6 +190,6 @@ export const calculateTotalsFromStreams = async ({ totalAvailable: totalAvailable.toNumber(), ratePerSecond: ratePerSecond.toNumber(), isAtLeastOnePaymentActive, - itemsWithinLastMonth, + lastMonthStreaming: lastMonthStreaming.toNumber(), }; }; From b59ed5c551a4bd14271849cc39a021b88597626c Mon Sep 17 00:00:00 2001 From: strzelec Date: Thu, 7 Nov 2024 23:51:27 +0100 Subject: [PATCH 063/126] fix: fixes after rebase --- .../partials/StatsCards/StatsCards.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx index ee4165f4cbd..d2b2e3d3cb7 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx @@ -1,8 +1,9 @@ import React from 'react'; -import { type NumeralValue } from '~shared/Numeral/Numeral.tsx'; +import { getFormattedNumeralValue } from '~shared/Numeral/helpers.tsx'; +import { type NumeralValue } from '~shared/Numeral/types.ts'; +import { convertToDecimal } from '~utils/convertToDecimal.ts'; import { formatText } from '~utils/intl.ts'; -import { getFormattedTokenAmount } from '~v5/common/CompletedAction/partials/utils.ts'; import WidgetBox from '~v5/common/WidgetBox/WidgetBox.tsx'; export interface StatsCardsProps { @@ -24,6 +25,10 @@ const StatsCards = ({ prefix, suffix, }: StatsCardsProps) => { + const streamingPerMonthDecimal = convertToDecimal(streamingPerMonth, 0); + const totalStreamedDecimal = convertToDecimal(totalStreamed, 0); + const unclaimedFoundsDecimal = convertToDecimal(unclaimedFounds, 0); + return (

{prefix}

- {getFormattedTokenAmount(`${streamingPerMonth}`, 0)} + {getFormattedNumeralValue(streamingPerMonthDecimal, 0)}

{suffix} / month

@@ -52,7 +57,7 @@ const StatsCards = ({

{prefix}

- {getFormattedTokenAmount(`${totalStreamed}`, 0)} + {getFormattedNumeralValue(totalStreamedDecimal, 0)}

{suffix}

@@ -68,7 +73,7 @@ const StatsCards = ({

{prefix}

- {getFormattedTokenAmount(`${unclaimedFounds}`, 0)} + {getFormattedNumeralValue(unclaimedFoundsDecimal, 0)}

{suffix}

From d96adb5eba7b87aad58528fa04d45e0c17671f8e Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 18 Nov 2024 16:16:26 +0100 Subject: [PATCH 064/126] fix: handle invalid date and parsing numbers --- .../StreamingPaymentsPage.tsx | 18 ++++++++---------- .../shared/StreamingPayments/utils.ts | 11 +++++++---- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx index 6f0efa7b465..4ff49392c6b 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -29,16 +29,14 @@ const StreamingPaymentsPage = () => { }); return ( -
- -
+ ); }; diff --git a/src/components/shared/StreamingPayments/utils.ts b/src/components/shared/StreamingPayments/utils.ts index 5e99df2dc53..b9c5cae4d19 100644 --- a/src/components/shared/StreamingPayments/utils.ts +++ b/src/components/shared/StreamingPayments/utils.ts @@ -61,8 +61,11 @@ const calculateStreamsForLast30Days = ({ const intervalInDays = interval / 24 / 3600; const startDate = new Date(startTimestamp * 1000); - const endDate = new Date(endTimestamp * 1000); const currentDate = new Date(currentTimestamp * 1000); + // eslint-disable-next-line no-restricted-globals + const endDate = isNaN(new Date(endTimestamp * 1000) as any) + ? currentDate + : new Date(endTimestamp * 1000); const date30DaysAgo = subDays(currentDate, 30); @@ -141,9 +144,9 @@ export const calculateTotalsFromStreams = async ({ const streamedFundsInLast30Days = calculateStreamsForLast30Days({ currentTimestamp, - endTimestamp: +item.endTime, - startTimestamp: +item.startTime, - interval: +item.interval, + endTimestamp: Number(item.endTime), + startTimestamp: Number(item.startTime), + interval: Number(item.interval), totalClaimedAmount: amountClaimedToDateToCurrency?.toNumber() ?? 0, }); From ccbb848388ef9d3636685120ff534f8d500dffab Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 26 Nov 2024 11:25:03 +0100 Subject: [PATCH 065/126] fix: display streamings for tablet --- .../partials/StatsCards/StatsCards.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx index d2b2e3d3cb7..6cf935ac89c 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx @@ -36,12 +36,12 @@ const StatsCards = ({ id: 'streamingPaymentsPage.widget.totalStreaming', })} value={ -
+
-

{prefix}

-

+

+ {prefix} {getFormattedNumeralValue(streamingPerMonthDecimal, 0)} -

+

{suffix} / month

@@ -53,12 +53,12 @@ const StatsCards = ({ id: 'streamingPaymentsPage.widget.totalStreamed', })} value={ -
+
-

{prefix}

-

+

+ {prefix} {getFormattedNumeralValue(totalStreamedDecimal, 0)} -

+

{suffix}

@@ -69,12 +69,12 @@ const StatsCards = ({ id: 'streamingPaymentsPage.widget.unclaimedFounds', })} value={ -
+
-

{prefix}

-

+

+ {prefix} {getFormattedNumeralValue(unclaimedFoundsDecimal, 0)} -

+

{suffix}

From 04cd68b8a7049e56aaeb948d18f7e79d7eddcd1e Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 9 Dec 2024 14:23:16 +0100 Subject: [PATCH 066/126] fix: change text for active streaming, handle size for tablet and change font weight for boxes --- .../partials/StatsCards/StatsCards.tsx | 12 ++++++++++++ src/components/v5/common/WidgetBox/WidgetBox.tsx | 4 ++-- src/i18n/en.json | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx index 6cf935ac89c..c19180291bc 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx @@ -1,5 +1,7 @@ +import clsx from 'clsx'; import React from 'react'; +import { useMobile, useTablet } from '~hooks'; import { getFormattedNumeralValue } from '~shared/Numeral/helpers.tsx'; import { type NumeralValue } from '~shared/Numeral/types.ts'; import { convertToDecimal } from '~utils/convertToDecimal.ts'; @@ -25,6 +27,9 @@ const StatsCards = ({ prefix, suffix, }: StatsCardsProps) => { + const isTablet = useTablet(); + const isMobile = useMobile(); + const streamingPerMonthDecimal = convertToDecimal(streamingPerMonth, 0); const totalStreamedDecimal = convertToDecimal(totalStreamed, 0); const unclaimedFoundsDecimal = convertToDecimal(unclaimedFounds, 0); @@ -35,6 +40,7 @@ const StatsCards = ({ title={formatText({ id: 'streamingPaymentsPage.widget.totalStreaming', })} + titleClassName="font-normal text-md" value={
@@ -52,6 +58,7 @@ const StatsCards = ({ title={formatText({ id: 'streamingPaymentsPage.widget.totalStreamed', })} + titleClassName="font-normal text-md" value={
@@ -68,6 +75,7 @@ const StatsCards = ({ title={formatText({ id: 'streamingPaymentsPage.widget.unclaimedFounds', })} + titleClassName="font-normal text-md" value={
@@ -81,9 +89,13 @@ const StatsCards = ({ } /> {totalActiveStreams}} />
diff --git a/src/components/v5/common/WidgetBox/WidgetBox.tsx b/src/components/v5/common/WidgetBox/WidgetBox.tsx index ff5c72487f7..dc6f22cd415 100644 --- a/src/components/v5/common/WidgetBox/WidgetBox.tsx +++ b/src/components/v5/common/WidgetBox/WidgetBox.tsx @@ -16,14 +16,14 @@ const WidgetBox: FC = ({ icon: Icon, iconClassName = 'text-blue-400', contentClassName = 'block w-full', - titleClassName, + titleClassName = 'text-1', }) => { const wrapperClassName = 'rounded-lg py-6 px-6 w-full flex items-center justify-between gap-2 border'; const baseContent = ( <> - {title &&

{title}

} + {title &&

{title}

} {value}
{additionalContent} diff --git a/src/i18n/en.json b/src/i18n/en.json index 3baa4d08a68..023db56e820 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -753,7 +753,7 @@ "members.modal.selectActions": "Select actions", "members.modal.selectMember": "Select member", "meatballMenu.selectAction": "Select action", - "streamingPaymentsPage.widget.totalStreaming": "Total streaming", + "streamingPaymentsPage.widget.totalStreaming": "Active streaming", "streamingPaymentsPage.widget.totalStreamed": "Total streamed", "streamingPaymentsPage.widget.unclaimedFounds": "Unclaimed funds", "streamingPaymentsPage.widget.totalActiveStreams": "Total active streams", From 60f3e85b65bd881d2887abda640b54cbbe3c0e05 Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 9 Dec 2024 16:15:49 +0100 Subject: [PATCH 067/126] fix: calculate active streaming for active streaming payments --- src/components/shared/StreamingPayments/utils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/shared/StreamingPayments/utils.ts b/src/components/shared/StreamingPayments/utils.ts index b9c5cae4d19..acd3584ec0f 100644 --- a/src/components/shared/StreamingPayments/utils.ts +++ b/src/components/shared/StreamingPayments/utils.ts @@ -167,7 +167,11 @@ export const calculateTotalsFromStreams = async ({ isAtLeastOnePaymentActive: paymentStatus === StreamingPaymentStatus.Active || isAtLeastOnePaymentActive, - lastMonthStreaming: lastMonthStreaming.add(streamedFundsInLast30Days), + lastMonthStreaming: lastMonthStreaming.add( + paymentStatus === StreamingPaymentStatus.Active + ? streamedFundsInLast30Days + : 0, + ), }; }, Promise.resolve({ From 87f6810db13f8b8b21dfaf1d66684edd022c8d2c Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 10 Dec 2024 12:52:36 +0100 Subject: [PATCH 068/126] fix: calculate active streaming logic --- .../shared/StreamingPayments/utils.ts | 70 ++++++------------- 1 file changed, 20 insertions(+), 50 deletions(-) diff --git a/src/components/shared/StreamingPayments/utils.ts b/src/components/shared/StreamingPayments/utils.ts index acd3584ec0f..b74f7f56874 100644 --- a/src/components/shared/StreamingPayments/utils.ts +++ b/src/components/shared/StreamingPayments/utils.ts @@ -1,4 +1,3 @@ -import { isAfter, differenceInDays, subDays } from 'date-fns'; import Decimal from 'decimal.js'; import { type ColonyFragment, type SupportedCurrencies } from '~gql'; @@ -45,50 +44,15 @@ export const calculateToCurrency = async ({ return new Decimal(balanceInWeiToEth).mul(currentPrice ?? 0); }; -const calculateStreamsForLast30Days = ({ - startTimestamp, - endTimestamp, - currentTimestamp, - interval, - totalClaimedAmount, -}: { - startTimestamp: number; - endTimestamp: number; - currentTimestamp: number; - interval: number; - totalClaimedAmount: number; -}) => { - const intervalInDays = interval / 24 / 3600; +const calculateStreamsForLast30Days = ( + singleStreamAmount: number, + streamingInterval: number, +) => { + const thirtyDaysInSeconds = 30 * 24 * 3600; - const startDate = new Date(startTimestamp * 1000); - const currentDate = new Date(currentTimestamp * 1000); - // eslint-disable-next-line no-restricted-globals - const endDate = isNaN(new Date(endTimestamp * 1000) as any) - ? currentDate - : new Date(endTimestamp * 1000); - - const date30DaysAgo = subDays(currentDate, 30); - - if (isAfter(startDate, date30DaysAgo)) { - return totalClaimedAmount; - } - if (isAfter(endDate, date30DaysAgo)) { - const daysIncludedInLast30Days = Math.abs( - differenceInDays( - startDate > date30DaysAgo ? startDate : date30DaysAgo, - endDate > currentDate ? currentDate : endDate, - ), - ); - const totalDays = Math.abs(differenceInDays(startDate, endDate)); - const totalStreams = totalDays / intervalInDays; - const streamsPerDay = totalStreams / totalDays; - const amountPerOneStream = totalClaimedAmount / totalStreams; - const streamedFundsInLast30Days = - daysIncludedInLast30Days * streamsPerDay * amountPerOneStream; - - return streamedFundsInLast30Days; - } - return 0; + const activeStreaming = + (singleStreamAmount / streamingInterval) * thirtyDaysInSeconds; + return activeStreaming; }; export const calculateTotalsFromStreams = async ({ @@ -142,14 +106,20 @@ export const calculateTotalsFromStreams = async ({ colony, }); - const streamedFundsInLast30Days = calculateStreamsForLast30Days({ - currentTimestamp, - endTimestamp: Number(item.endTime), - startTimestamp: Number(item.startTime), - interval: Number(item.interval), - totalClaimedAmount: amountClaimedToDateToCurrency?.toNumber() ?? 0, + const singleStreamAmount = await calculateToCurrency({ + amount: item.amount, + tokenAddress: item.tokenAddress, + currency, + colony, }); + const singleStreamAmountToNumber = singleStreamAmount?.toNumber() ?? 0; + + const streamedFundsInLast30Days = calculateStreamsForLast30Days( + singleStreamAmountToNumber, + Number(item.interval), + ); + const { totalAvailable, totalClaimed, From 44560e5ebf9f9efa97fc31760e802955a99c6da9 Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 10 Dec 2024 18:48:22 +0100 Subject: [PATCH 069/126] fix: change name for calculate active streaming function --- src/components/shared/StreamingPayments/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/shared/StreamingPayments/utils.ts b/src/components/shared/StreamingPayments/utils.ts index b74f7f56874..f24f2bfb1cf 100644 --- a/src/components/shared/StreamingPayments/utils.ts +++ b/src/components/shared/StreamingPayments/utils.ts @@ -44,7 +44,7 @@ export const calculateToCurrency = async ({ return new Decimal(balanceInWeiToEth).mul(currentPrice ?? 0); }; -const calculateStreamsForLast30Days = ( +const calculateActiveStreaming = ( singleStreamAmount: number, streamingInterval: number, ) => { @@ -115,7 +115,7 @@ export const calculateTotalsFromStreams = async ({ const singleStreamAmountToNumber = singleStreamAmount?.toNumber() ?? 0; - const streamedFundsInLast30Days = calculateStreamsForLast30Days( + const streamedFundsInLast30Days = calculateActiveStreaming( singleStreamAmountToNumber, Number(item.interval), ); From 96b9c12ca50806b49ce3a0f8191351b97a47abb6 Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 16 Dec 2024 15:25:39 +0100 Subject: [PATCH 070/126] fix: hide total active streams for tablet --- .../partials/StatsCards/StatsCards.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx index c19180291bc..fcdf661ef47 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx @@ -1,7 +1,5 @@ -import clsx from 'clsx'; import React from 'react'; -import { useMobile, useTablet } from '~hooks'; import { getFormattedNumeralValue } from '~shared/Numeral/helpers.tsx'; import { type NumeralValue } from '~shared/Numeral/types.ts'; import { convertToDecimal } from '~utils/convertToDecimal.ts'; @@ -27,9 +25,6 @@ const StatsCards = ({ prefix, suffix, }: StatsCardsProps) => { - const isTablet = useTablet(); - const isMobile = useMobile(); - const streamingPerMonthDecimal = convertToDecimal(streamingPerMonth, 0); const totalStreamedDecimal = convertToDecimal(totalStreamed, 0); const unclaimedFoundsDecimal = convertToDecimal(unclaimedFounds, 0); @@ -89,9 +84,7 @@ const StatsCards = ({ } /> Date: Tue, 31 Dec 2024 15:01:58 +0100 Subject: [PATCH 071/126] fix: display cards for tablet --- .../StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx index fcdf661ef47..869cddcdf0b 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StatsCards/StatsCards.tsx @@ -30,7 +30,7 @@ const StatsCards = ({ const unclaimedFoundsDecimal = convertToDecimal(unclaimedFounds, 0); return ( -
+
Date: Fri, 10 Jan 2025 15:34:43 +0100 Subject: [PATCH 072/126] fix: display extension error for streaming payments --- .../ActionTypeNotification.tsx | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx b/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx index b0f46565ca9..cd3a3675be2 100644 --- a/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx +++ b/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx @@ -29,10 +29,10 @@ const MSG = defineMessages({ defaultMessage: 'This will disable the Colony and prevent any further activity until resolved.', }, - votingReputationExtensionNotEnabledError: { - id: `${displayName}.votingReputationExtensionNotEnabledError`, + noExtensionError: { + id: `${displayName}.noExtensionError`, defaultMessage: - 'Agreements requires the Reputation weighted extension to be enabled.', + '{actionName} requires the {extensionName} extension to be enabled.', }, stagedExpenditureExtensionNotEnabledError: { id: `${displayName}.stagedExpenditureExtensionNotEnabledError`, @@ -54,6 +54,11 @@ const MSG = defineMessages({ }, }); +const extensions = { + [Action.CreateDecision]: Extension.VotingReputation, + [Action.StreamingPayment]: Extension.StreamingPayments, +}; + export const ActionTypeNotification: FC = ({ selectedAction, className, @@ -81,11 +86,10 @@ export const ActionTypeNotification: FC = ({ return formatText(MSG.enterRecoveryModeError); case Action.CreateDecision: return isFieldDisabled - ? formatText(MSG.votingReputationExtensionNotEnabledError) - : undefined; - case Action.StagedPayment: - return isFieldDisabled - ? formatText(MSG.stagedExpenditureExtensionNotEnabledError) + ? formatText(MSG.noExtensionError, { + actionName: 'Agreements', + extensionName: 'Reputation weighted', + }) : undefined; case Action.StreamingPayment: { const extensionName = supportedExtensionsConfig.find( @@ -93,8 +97,9 @@ export const ActionTypeNotification: FC = ({ )?.name; return isFieldDisabled && extensionName - ? formatText(MSG.extensionNotInstalled, { - extensionName: formatText(extensionName), + ? formatText(MSG.noExtensionError, { + actionName: 'Streaming', + extensionName: 'Streaming Payments', }) : undefined; } @@ -122,17 +127,15 @@ export const ActionTypeNotification: FC = ({ {formatText(MSG.learnMore)} ) : ( - selectedAction === Action.CreateDecision && ( - - ) + ) } > From 701bd80f149937c733f0dc46dd6e3b21bfa65e73 Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 13 Jan 2025 11:45:20 +0100 Subject: [PATCH 073/126] fix: refactor extensions link --- .../v5/common/ActionSidebar/partials/hooks.ts | 2 ++ .../v5/common/ActionSidebar/partials/utils.ts | 14 ++++++++++++++ .../ActionTypeNotification.tsx | 12 ++++++------ 3 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 src/components/v5/common/ActionSidebar/partials/utils.ts diff --git a/src/components/v5/common/ActionSidebar/partials/hooks.ts b/src/components/v5/common/ActionSidebar/partials/hooks.ts index 997c8d8bf09..f2aca18154b 100644 --- a/src/components/v5/common/ActionSidebar/partials/hooks.ts +++ b/src/components/v5/common/ActionSidebar/partials/hooks.ts @@ -18,6 +18,8 @@ import { type FinalizeSuccessCallback, } from '../types.ts'; +import { getNeededExtension } from './utils.ts'; + const SUBMIT_BUTTON_TEXT_MAP: Partial> = { [Action.PaymentBuilder]: 'button.createPayment', [Action.SimplePayment]: 'button.createPayment', diff --git a/src/components/v5/common/ActionSidebar/partials/utils.ts b/src/components/v5/common/ActionSidebar/partials/utils.ts new file mode 100644 index 00000000000..401fedd6813 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/utils.ts @@ -0,0 +1,14 @@ +import { Extension } from '@colony/colony-js'; + +import { Action } from '~constants/actions.ts'; + +export const getNeededExtension = (action: Action) => { + switch (action) { + case Action.CreateDecision: + return Extension.VotingReputation; + case Action.StreamingPayment: + return Extension.StreamingPayments; + default: + return ''; + } +}; diff --git a/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx b/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx index cd3a3675be2..04dad6f7f19 100644 --- a/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx +++ b/src/components/v5/shared/ActionTypeNotification/ActionTypeNotification.tsx @@ -8,7 +8,9 @@ import { supportedExtensionsConfig } from '~constants'; import { Action } from '~constants/actions.ts'; import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { COLONY_EXTENSIONS_ROUTE } from '~routes'; import { formatText } from '~utils/intl.ts'; +import { getNeededExtension } from '~v5/common/ActionSidebar/partials/utils.ts'; import NotificationBanner from '~v5/shared/NotificationBanner/index.ts'; import { type ActionTypeNotificationProps } from './types.ts'; @@ -54,11 +56,6 @@ const MSG = defineMessages({ }, }); -const extensions = { - [Action.CreateDecision]: Extension.VotingReputation, - [Action.StreamingPayment]: Extension.StreamingPayments, -}; - export const ActionTypeNotification: FC = ({ selectedAction, className, @@ -110,6 +107,9 @@ export const ActionTypeNotification: FC = ({ const notificationTitle = getNotificationTitle(); + const extensionId = getNeededExtension(selectedAction); + const extensionLink = `${COLONY_EXTENSIONS_ROUTE}/${extensionId}`; + return ( <> {notificationTitle && ( @@ -130,7 +130,7 @@ export const ActionTypeNotification: FC = ({
); }; From b04c7b4e00b1b85f81eba6b6185e17824dadc850 Mon Sep 17 00:00:00 2001 From: strzelec Date: Fri, 10 Jan 2025 16:04:51 +0100 Subject: [PATCH 078/126] fix: remove expenditures category from extensions --- src/constants/extensions.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/constants/extensions.ts b/src/constants/extensions.ts index d14b979249f..0bbce63a4b7 100644 --- a/src/constants/extensions.ts +++ b/src/constants/extensions.ts @@ -30,7 +30,6 @@ import { toFinite } from '~utils/lodash.ts'; export enum ExtensionCategory { Payments = 'Payments', DecisionMethods = 'Decision Methods', - Expenditures = 'Expenditures', } const multiSigName = 'extensions.MultiSig'; @@ -342,7 +341,7 @@ export const supportedExtensionsConfig: ExtensionConfig[] = [ { icon: ExtensionAdvancedPaymentsIcon, imageURLs: [stakedHero, stakedInterface], - category: ExtensionCategory.Expenditures, + category: ExtensionCategory.DecisionMethods, extensionId: Extension.StakedExpenditure, name: MSG.stakedExpenditureName, descriptionShort: MSG.stakedExpenditureDescriptionShort, @@ -389,7 +388,7 @@ export const supportedExtensionsConfig: ExtensionConfig[] = [ { icon: ExtensionStreamingPaymentsIcon, imageURLs: [streamingHero, streamingInterface], - category: ExtensionCategory.Expenditures, + category: ExtensionCategory.Payments, extensionId: Extension.StreamingPayments, name: MSG.streamingPaymentsName, descriptionShort: MSG.streamingPaymentsDescriptionShort, From 8bd241ac4237123456047f2d23b54d13429021ab Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 13 Jan 2025 11:13:30 +0100 Subject: [PATCH 079/126] fix: change copy for streaming payments description item --- src/constants/extensions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/constants/extensions.ts b/src/constants/extensions.ts index 0bbce63a4b7..5c5ff0f0046 100644 --- a/src/constants/extensions.ts +++ b/src/constants/extensions.ts @@ -197,7 +197,8 @@ const streamingPaymentsMessage = { }, streamingPaymentsDescriptionShort: { id: `${streamingPaymentsName}.description`, - defaultMessage: 'Streaming Payments extension.', + defaultMessage: + 'Continuously stream tokens to a recipient, that are claimable at any time. Useful for things like salaries, subscriptions, and more.', }, streamingPaymentsDescriptionLong: { id: `${streamingPaymentsName}.descriptionLong`, From 4bc629f63b0cccf4e0879d7c743b86938070e00c Mon Sep 17 00:00:00 2001 From: strzelec Date: Fri, 10 Jan 2025 10:16:53 +0100 Subject: [PATCH 080/126] fix: display streaming payment metadata for action and activity feed --- .../ActionDescription/ActionDescription.tsx | 2 +- .../StreamingPayment/StreamingPayment.tsx | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx index c982e1a2614..c89e315df66 100644 --- a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx +++ b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx @@ -46,7 +46,7 @@ const ActionDescription: FC = ({ useGetExpenditureData(expenditureId); const { streamingPaymentData, loadingStreamingPayment } = - useGetStreamingPaymentData(expenditureId); + useGetStreamingPaymentData(action?.streamingPaymentId); const isLoading = loading || loadingExpenditure || loadingStreamingPayment || loadingUser; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 4e748b1892c..892c3d85d6c 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -23,7 +23,11 @@ import { ONE_DAY_IN_SECONDS, ONE_HOUR_IN_SECONDS } from '~constants/time.ts'; import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import { ColonyActionType, StreamingPaymentEndCondition } from '~gql'; +import { + ColonyActionType, + StreamingPaymentEndCondition, + useGetUserByAddressQuery, +} from '~gql'; import { useMobile } from '~hooks'; import { COLONY_ACTIVITY_ROUTE, @@ -102,6 +106,14 @@ const StreamingPayment: FC = ({ const { loadingStreamingPayment, streamingPaymentData } = streamingPayment; + const { data: recipentData } = useGetUserByAddressQuery({ + variables: { address: streamingPaymentData?.recipientAddress || '' }, + skip: !streamingPaymentData?.recipientAddress, + }); + + const recipientName = + recipentData?.getUserByAddress?.items[0]?.profile?.displayName ?? ''; + if (loadingStreamingPayment) { return (
@@ -275,7 +287,9 @@ const StreamingPayment: FC = ({ walletAddress={recipientAddress} withVerifiedBadge={false} withUserName - /> + > + {recipientName} + ) : null, initiator: initiatorUser ? ( Date: Tue, 7 Jan 2025 12:11:30 +0100 Subject: [PATCH 081/126] fix: add streaming payments to navigation and to payments actions --- .../StreamingPaymentsPage/StreamingPaymentsPage.tsx | 4 +--- .../ActionSidebar/partials/PaymentGroup/GroupList.ts | 10 ++++++++++ .../Sidebar/sidebars/ColonyPageSidebar/consts.ts | 6 ++++++ src/i18n/en.json | 3 ++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx index 8328e054ad7..7b77432cdb5 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -12,9 +12,7 @@ import StatsCards from './partials/StatsCards/StatsCards.tsx'; const displayName = 'v5.pages.StreamingPaymentsPage'; const StreamingPaymentsPage = () => { - useSetPageHeadingTitle( - formatText({ id: 'navigation.finances.streamingPayments' }), - ); + useSetPageHeadingTitle(formatText({ id: 'streamingPaymentsPage.title' })); const nativeDomainId = useGetSelectedDomainFilter()?.nativeId; diff --git a/src/components/v5/common/ActionSidebar/partials/PaymentGroup/GroupList.ts b/src/components/v5/common/ActionSidebar/partials/PaymentGroup/GroupList.ts index 6548b7f078e..d685ae07ea1 100644 --- a/src/components/v5/common/ActionSidebar/partials/PaymentGroup/GroupList.ts +++ b/src/components/v5/common/ActionSidebar/partials/PaymentGroup/GroupList.ts @@ -7,6 +7,7 @@ import { ArrowsOutLineHorizontal, // @TODO: uncomment when staged payment is ready Steps, + Waves, type Icon, } from '@phosphor-icons/react'; @@ -40,6 +41,15 @@ export const GROUP_LIST: GroupListItem[] = [ action: Action.PaymentBuilder, isNew: true, }, + { + title: formatText({ id: 'actions.streamingPayment' }), + description: formatText({ + id: 'actions.description.streamingPayment', + }), + Icon: Waves, + action: Action.StreamingPayment, + isNew: true, + }, // @TODO: uncomment when streaming payment is ready // { // title: formatText({ id: 'actions.streamingPayment' }), diff --git a/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/consts.ts b/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/consts.ts index e36a01577bb..5f4e1059656 100644 --- a/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/consts.ts +++ b/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/consts.ts @@ -19,6 +19,7 @@ import { COLONY_INCOMING_ROUTE, COLONY_PERMISSIONS_ROUTE, COLONY_TEAMS_ROUTE, + COLONY_STREAMING_PAYMENTS_ROUTE, } from '~routes'; import { type SidebarRouteItemProps } from '~v5/shared/Navigation/Sidebar/partials/SidebarRouteItem/types.ts'; @@ -51,6 +52,11 @@ export const sidebarNavigationScheme: SidebarRouteItemProps[] = [ path: COLONY_INCOMING_ROUTE, isColonyRoute: true, }, + { + translation: { id: 'navigation.finances.streamingPayments' }, + path: COLONY_STREAMING_PAYMENTS_ROUTE, + isColonyRoute: true, + }, // @TODO: Uncomment once these pages are available // { // id: 'streaming', diff --git a/src/i18n/en.json b/src/i18n/en.json index 023db56e820..eda03dd4c9a 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -32,7 +32,7 @@ "navigation.finances.incoming": "Incoming", "navigation.finances.incomingFunds": "Incoming funds", "navigation.finances.transactions": "Transactions", - "navigation.finances.streamingPayments": "Streaming payments", + "navigation.finances.streamingPayments": "Streaming", "navigation.agreements": "Agreements", "navigation.agreements.title": "Agreements", "navigation.agreements.description": "The latest decisions and discussions created within the Colony.", @@ -2007,6 +2007,7 @@ "form.max": "{fieldName} must be a maximum of {length} characters", "multiSig.rejectAction": "Reject action", "multiSig.shareAction": "Share action", + "streamingPaymentsPage.title": "Streaming payments", "streamingPayment.description.placeholder": "Streaming Payment to a single recipient by {initiator}", "streamingPayment.description.days": "{days} {days, plural, =1 {day} other {days}}", "streamingPayment.status.active": "Active", From 2fb4d82154f52d6672ef18c736c2b378d2587d57 Mon Sep 17 00:00:00 2001 From: strzelec Date: Wed, 8 Jan 2025 09:26:14 +0100 Subject: [PATCH 082/126] fix: remove comment and chage route name for streaming payments --- .../ActionSidebar/partials/PaymentGroup/GroupList.ts | 10 ---------- src/routes/routeConstants.ts | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/components/v5/common/ActionSidebar/partials/PaymentGroup/GroupList.ts b/src/components/v5/common/ActionSidebar/partials/PaymentGroup/GroupList.ts index d685ae07ea1..1b73ce1b79a 100644 --- a/src/components/v5/common/ActionSidebar/partials/PaymentGroup/GroupList.ts +++ b/src/components/v5/common/ActionSidebar/partials/PaymentGroup/GroupList.ts @@ -50,16 +50,6 @@ export const GROUP_LIST: GroupListItem[] = [ action: Action.StreamingPayment, isNew: true, }, - // @TODO: uncomment when streaming payment is ready - // { - // title: formatText({ id: 'actions.streamingPayment' }), - // description: formatText({ - // id: 'actions.description.streamingPayment', - // }), - // Icon: Waves, - // action: Action.StreamingPayment, - // isNew: true, - // }, { title: formatText({ id: 'actions.splitPayment' }), description: formatText({ id: 'actions.description.splitPayment' }), diff --git a/src/routes/routeConstants.ts b/src/routes/routeConstants.ts index f71737621ba..9547e04352c 100644 --- a/src/routes/routeConstants.ts +++ b/src/routes/routeConstants.ts @@ -25,7 +25,7 @@ export const COLONY_EXTENSION_DETAILS_ROUTE = `${COLONY_EXTENSIONS_ROUTE}/:exten export const COLONY_INCOMING_ROUTE = `incoming`; export const COLONY_BALANCES_ROUTE = `balances`; export const COLONY_FOLLOWERS_ROUTE = `members/followers`; -export const COLONY_STREAMING_PAYMENTS_ROUTE = `streaming-payments`; +export const COLONY_STREAMING_PAYMENTS_ROUTE = `streaming`; export const COLONY_MEMBERS_ROUTE = `members`; export const COLONY_MEMBERS_WITH_DOMAIN_ROUTE = `members/:domainId`; export const COLONY_VERIFIED_ROUTE = `verified`; From 4a9d244fd016c929b03aa715f817242ee74ec610 Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 14 Jan 2025 12:12:04 +0100 Subject: [PATCH 083/126] fix: display streaming navigation item conditionally --- .../partials/SidebarRoutesSection.tsx | 4 +- .../ColonyPageSidebar/partials/hooks.ts | 52 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/partials/hooks.ts diff --git a/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/partials/SidebarRoutesSection.tsx b/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/partials/SidebarRoutesSection.tsx index 11b077a3a90..d6c28e1cb6a 100644 --- a/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/partials/SidebarRoutesSection.tsx +++ b/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/partials/SidebarRoutesSection.tsx @@ -2,9 +2,11 @@ import React from 'react'; import SidebarRouteItem from '~v5/shared/Navigation/Sidebar/partials/SidebarRouteItem/index.ts'; -import { sidebarNavigationScheme } from '../consts.ts'; +import { useSidebarRoutesScheme } from './hooks.ts'; export const SidebarRoutesSection = () => { + const { sidebarScheme: sidebarNavigationScheme } = useSidebarRoutesScheme(); + return (
{sidebarNavigationScheme.map((scheme) => ( diff --git a/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/partials/hooks.ts b/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/partials/hooks.ts new file mode 100644 index 00000000000..35fbb41d82c --- /dev/null +++ b/src/components/v5/shared/Navigation/Sidebar/sidebars/ColonyPageSidebar/partials/hooks.ts @@ -0,0 +1,52 @@ +import { Extension } from '@colony/colony-js'; + +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { useSearchActionsQuery } from '~gql'; +import useExtensionData from '~hooks/useExtensionData.ts'; +import { COLONY_STREAMING_PAYMENTS_ROUTE } from '~routes'; +import { isInstalledExtensionData } from '~utils/extensions.ts'; + +import { sidebarNavigationScheme } from '../consts.ts'; + +export const useSidebarRoutesScheme = () => { + const { colony } = useColonyContext(); + + const { colonyAddress } = colony; + + const { data } = useSearchActionsQuery({ + variables: { + filter: { + colonyId: { eq: colonyAddress }, + type: { eq: 'CREATE_STREAMING_PAYMENT' }, + }, + limit: 5, + }, + }); + + const excludeSubitemsPaths = (subitemsPathsToExclude: string[]) => + sidebarNavigationScheme.map((item) => { + return { + ...item, + subItems: item.subItems?.filter( + (subItem) => !subitemsPathsToExclude.includes(subItem.path), + ), + }; + }); + + const hasStreamings = !!data?.searchColonyActions?.items.length; + + const { extensionData } = useExtensionData(Extension.StreamingPayments); + const isStreamingPaymentsInstalled = + extensionData && isInstalledExtensionData(extensionData); + + const isStreamingsRouteVisible = + isStreamingPaymentsInstalled || hasStreamings; + + const sidebarScheme = excludeSubitemsPaths( + isStreamingsRouteVisible ? [] : [COLONY_STREAMING_PAYMENTS_ROUTE], + ); + + return { + sidebarScheme, + }; +}; From 850e38a0694fe7bd7f724a37ce960486e34339c0 Mon Sep 17 00:00:00 2001 From: strzelec Date: Fri, 17 Jan 2025 18:49:31 +0100 Subject: [PATCH 084/126] fix: rebase fixes --- .../StreamingPayment/StreamingPayment.tsx | 3 -- .../v5/shared/MeatBallMenu/MeatBallMenu.tsx | 2 +- src/graphql/generated.ts | 30 +++++++++++++++++++ .../expenditures/createStreamingPayment.ts | 5 ++-- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 892c3d85d6c..2438449a38f 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -268,9 +268,6 @@ const StreamingPayment: FC = ({ contentWrapperClassName={clsx('z-[65] sm:min-w-[11.25rem]', { '!left-6 right-6': isMobile, })} - dropdownPlacementProps={{ - top: 12, - }} items={meatballOptions} />
diff --git a/src/components/v5/shared/MeatBallMenu/MeatBallMenu.tsx b/src/components/v5/shared/MeatBallMenu/MeatBallMenu.tsx index bc77c3944e3..dd2c67914db 100644 --- a/src/components/v5/shared/MeatBallMenu/MeatBallMenu.tsx +++ b/src/components/v5/shared/MeatBallMenu/MeatBallMenu.tsx @@ -87,7 +87,7 @@ const MeatBallMenu: FC = ({ | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null }; @@ -11263,6 +11264,9 @@ export type ColonyActionFragment = { __typename?: 'ColonyAction', type: ColonyAc ======= export type ColonyActionFragment = { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null }; >>>>>>> c263efcff (fix: use new id) +======= +export type ColonyActionFragment = { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null }; +>>>>>>> af9aebdf0 (fix: rebase fixes) export type ApprovedTokenChangesFragment = { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array }; @@ -11364,6 +11368,7 @@ export type SafeTransactionDataFragment = { __typename?: 'SafeTransactionData', export type SafeTransactionFragment = { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null }; +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type: UserStakeType, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null }; @@ -11377,6 +11382,9 @@ export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: ======= export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null }; >>>>>>> c263efcff (fix: use new id) +======= +export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null }; +>>>>>>> af9aebdf0 (fix: rebase fixes) export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; @@ -11634,6 +11642,7 @@ export type GetColonyActionsQueryVariables = Exact<{ }>; +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD export type GetColonyActionsQuery = { __typename?: 'Query', getActionsByColony?: { __typename?: 'ModelColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null> } | null }; @@ -11643,12 +11652,16 @@ export type GetColonyActionsQuery = { __typename?: 'Query', getActionsByColony?: ======= export type GetColonyActionsQuery = { __typename?: 'Query', getActionsByColony?: { __typename?: 'ModelColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null> } | null }; >>>>>>> c263efcff (fix: use new id) +======= +export type GetColonyActionsQuery = { __typename?: 'Query', getActionsByColony?: { __typename?: 'ModelColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null> } | null }; +>>>>>>> af9aebdf0 (fix: rebase fixes) export type GetColonyActionQueryVariables = Exact<{ transactionHash: Scalars['ID']; }>; +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD export type GetColonyActionQuery = { __typename?: 'Query', getColonyAction?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null }; @@ -11658,6 +11671,9 @@ export type GetColonyActionQuery = { __typename?: 'Query', getColonyAction?: { _ ======= export type GetColonyActionQuery = { __typename?: 'Query', getColonyAction?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null }; >>>>>>> c263efcff (fix: use new id) +======= +export type GetColonyActionQuery = { __typename?: 'Query', getColonyAction?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null }; +>>>>>>> af9aebdf0 (fix: rebase fixes) export type GetColonyMotionQueryVariables = Exact<{ id: Scalars['ID']; @@ -11702,14 +11718,19 @@ export type SearchActionsQueryVariables = Exact<{ }>; +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD export type SearchActionsQuery = { __typename?: 'Query', searchColonyActions?: { __typename?: 'SearchableColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null> } | null }; +======= +export type SearchActionsQuery = { __typename?: 'Query', searchColonyActions?: { __typename?: 'SearchableColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null> } | null }; +>>>>>>> af9aebdf0 (fix: rebase fixes) export type OnCreateColonyActionMetadataSubscriptionVariables = Exact<{ [key: string]: never; }>; export type OnCreateColonyActionMetadataSubscription = { __typename?: 'Subscription', onCreateColonyActionMetadata?: { __typename?: 'ColonyActionMetadata', updatedAt: string } | null }; +<<<<<<< HEAD export type OnUpdateColonyActionMetadataSubscriptionVariables = Exact<{ [key: string]: never; }>; @@ -11721,6 +11742,8 @@ export type SearchActionsQuery = { __typename?: 'Query', searchColonyActions?: { ======= export type SearchActionsQuery = { __typename?: 'Query', searchColonyActions?: { __typename?: 'SearchableColonyActionConnection', nextToken?: string | null, items: Array<{ __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null> } | null }; >>>>>>> c263efcff (fix: use new id) +======= +>>>>>>> af9aebdf0 (fix: rebase fixes) export type GetDomainBalanceQueryVariables = Exact<{ input: DomainBalanceArguments; @@ -12090,6 +12113,7 @@ export type GetUserStakesQueryVariables = Exact<{ }>; +<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type: UserStakeType, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null } | null> } | null }; @@ -12099,6 +12123,9 @@ export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typ ======= export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null } | null } | null } | null> } | null }; >>>>>>> c263efcff (fix: use new id) +======= +export type GetUserStakesQuery = { __typename?: 'Query', getUserStakes?: { __typename?: 'ModelUserStakeConnection', items: Array<{ __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null } | null> } | null }; +>>>>>>> af9aebdf0 (fix: rebase fixes) export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ colonyId: Scalars['ID']; @@ -14991,6 +15018,7 @@ export function useOnCreateColonyActionMetadataSubscription(baseOptions?: Apollo } export type OnCreateColonyActionMetadataSubscriptionHookResult = ReturnType; export type OnCreateColonyActionMetadataSubscriptionResult = Apollo.SubscriptionResult; +<<<<<<< HEAD export const OnUpdateColonyActionMetadataDocument = gql` subscription OnUpdateColonyActionMetadata { onUpdateColonyActionMetadata { @@ -15020,6 +15048,8 @@ export function useOnUpdateColonyActionMetadataSubscription(baseOptions?: Apollo } export type OnUpdateColonyActionMetadataSubscriptionHookResult = ReturnType; export type OnUpdateColonyActionMetadataSubscriptionResult = Apollo.SubscriptionResult; +======= +>>>>>>> af9aebdf0 (fix: rebase fixes) export const GetDomainBalanceDocument = gql` query GetDomainBalance($input: DomainBalanceArguments!) { getDomainBalance(input: $input) { diff --git a/src/redux/sagas/expenditures/createStreamingPayment.ts b/src/redux/sagas/expenditures/createStreamingPayment.ts index c8cc7d40d89..41b5349f3b8 100644 --- a/src/redux/sagas/expenditures/createStreamingPayment.ts +++ b/src/redux/sagas/expenditures/createStreamingPayment.ts @@ -8,7 +8,6 @@ import { BigNumber } from 'ethers'; import moveDecimal from 'move-decimal-point'; import { call, fork, put, takeEvery } from 'redux-saga/effects'; -import { mutateWithAuthRetry } from '~apollo/utils.ts'; import { ContextModule, getContext } from '~context/index.ts'; import { CreateStreamingPaymentMetadataDocument, @@ -257,7 +256,9 @@ function* createStreamingPaymentAction({ } = yield waitForTxResult(createStreamingPayment.channel); if (customActionTitle) { - yield createActionMetadataInDB(txHash, customActionTitle); + yield createActionMetadataInDB(txHash, { + customTitle: customActionTitle, + }); } if (annotationMessage) { From 3c30754d3a077d4bf94fe21627fb50594ad13a81 Mon Sep 17 00:00:00 2001 From: Joanna Date: Wed, 17 Jul 2024 11:07:16 +0200 Subject: [PATCH 085/126] feat: streaming payments extension page --- .../ExtensionDetailsSidePanel/UninstallButton.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx index 3a6f4a5810a..9740808a9b2 100644 --- a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx +++ b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx @@ -156,6 +156,16 @@ const UninstallButton = ({ const hasActiveStream = false; const hasUnclaimedFunds = false; + const shouldShowWarning = + isStreamingPaymentsExtension && (hasActiveStream || hasUnclaimedFunds); + + const isStreamingPaymentsExtension = + extensionId === Extension.StreamingPayments; + + // @todo: add proper logic here to determine if there are active streams or unclaimed funds + const hasActiveStream = false; + const hasUnclaimedFunds = false; + const shouldShowWarning = isStreamingPaymentsExtension && (hasActiveStream || hasUnclaimedFunds); From adea2257feebcd7f7bf77e8e432993011e6d450d Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 7 Jan 2025 16:15:53 +0100 Subject: [PATCH 086/126] fix: date picker select year and custom time style --- .../v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx | 3 +-- .../TimeRow/partials/TimeRowField/TimeRowField.tsx | 6 ++++++ src/styles/main.css | 8 ++++++++ tailwind.config.js | 8 +++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/components/v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx b/src/components/v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx index 97d44faab0d..b51a6b98f66 100644 --- a/src/components/v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx +++ b/src/components/v5/common/ActionSidebar/partials/TimeRow/TimeRow.tsx @@ -13,8 +13,7 @@ import { StreamingPaymentEndCondition } from '~gql'; import Tooltip from '~shared/Extensions/Tooltip/Tooltip.tsx'; import { formatText } from '~utils/intl.ts'; import ActionFormRow from '~v5/common/ActionFormRow/index.ts'; - -import useHasNoDecisionMethods from '../../hooks/permissions/useHasNoDecisionMethods.ts'; +import useHasNoDecisionMethods from '~v5/common/ActionSidebar/hooks/permissions/useHasNoDecisionMethods.ts'; import { END_OPTIONS, START_OPTIONS } from './consts.ts'; import { CUSTOM_DATE_VALUE } from './partials/TimeRowField/consts.ts'; diff --git a/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/TimeRowField.tsx b/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/TimeRowField.tsx index 7e8c92e3728..9aee4a83293 100644 --- a/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/TimeRowField.tsx +++ b/src/components/v5/common/ActionSidebar/partials/TimeRow/partials/TimeRowField/TimeRowField.tsx @@ -1,4 +1,5 @@ import clsx from 'clsx'; +import { addYears, subYears } from 'date-fns'; import format from 'date-fns/format'; import isDate from 'date-fns/isDate'; import React, { useState, type FC } from 'react'; @@ -36,6 +37,9 @@ const TimeRowField: FC = ({ isDate(field.value) ? customDateValue : field.value, ); + const year15YearsAgo = subYears(new Date(), 15).getFullYear(); + const year15YearsAhead = addYears(new Date(), 15).getFullYear(); + return ( options={options} @@ -97,6 +101,8 @@ const TimeRowField: FC = ({ inline onClose={onClick} minDate={minDate} + minYear={year15YearsAgo} + maxYear={year15YearsAhead} />
)} diff --git a/src/styles/main.css b/src/styles/main.css index a6f8fcdaee2..917dff450d8 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -75,6 +75,14 @@ body.ReactModal__Body--open:not(.show-header-in-modal) .modal-blur-navigation { } /* Styling for onboardJS */ +ul.react-datepicker__time-list { + @apply bg-base-white; +} + +li.react-datepicker__time-list-item { + @apply hover:bg-gray-50 !important; +} + :root { --onboard-connect-sidebar-background: var(--color-gray-200); --onboard-main-scroll-container-background: var(--color-base-white); diff --git a/tailwind.config.js b/tailwind.config.js index bd97bdd66b2..edfe1708d07 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -135,7 +135,7 @@ module.exports = { content: '0px 1px 2px rgba(16, 24, 40, 0.05)', overlay: 'blur(2px)', 'light-blue': '0px 0px 3px 3px rgba(239, 248, 255, 1)', - 'select': '0px 1px 2px 0px rgba(16, 24, 40, 0.05);' + select: '0px 1px 2px 0px rgba(16, 24, 40, 0.05);', }, transitionDuration: { slow: '450ms', @@ -310,6 +310,12 @@ module.exports = { '.divider': { '@apply w-full border border-gray-200': {}, }, + 'ul.react-datepicker__time-list': { + '@apply bg-base-white': {}, + }, + 'li.react-datepicker__time-list-item': { + '@apply hover:bg-gray-50 !important': {}, + }, }); }, ], From 48c95e88430b47b32cfe5550d29b1f86c1d436e6 Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 13 Jan 2025 15:35:24 +0100 Subject: [PATCH 087/126] fix: background for selected calendar day --- src/styles/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/styles/main.css b/src/styles/main.css index 917dff450d8..f359dd4931c 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -75,6 +75,10 @@ body.ReactModal__Body--open:not(.show-header-in-modal) .modal-blur-navigation { } /* Styling for onboardJS */ +div.react-datepicker__day--selected { + @apply bg-base-white !important; +} + ul.react-datepicker__time-list { @apply bg-base-white; } From a58512631da9bffcce8428cf1f7b498b479241c1 Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 21 Jan 2025 09:33:53 +0100 Subject: [PATCH 088/126] fix: rebase --- .../ExtensionDetailsSidePanel/UninstallButton.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx index 9740808a9b2..3a6f4a5810a 100644 --- a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx +++ b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx @@ -156,16 +156,6 @@ const UninstallButton = ({ const hasActiveStream = false; const hasUnclaimedFunds = false; - const shouldShowWarning = - isStreamingPaymentsExtension && (hasActiveStream || hasUnclaimedFunds); - - const isStreamingPaymentsExtension = - extensionId === Extension.StreamingPayments; - - // @todo: add proper logic here to determine if there are active streams or unclaimed funds - const hasActiveStream = false; - const hasUnclaimedFunds = false; - const shouldShowWarning = isStreamingPaymentsExtension && (hasActiveStream || hasUnclaimedFunds); From b1a7378a8f71b6049a7f2a36f15e89352eb1b010 Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 23 Jan 2025 18:51:34 +0100 Subject: [PATCH 089/126] fixes after rebase --- .../ExtensionDetailsSidePanel/UninstallButton.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx index 3a6f4a5810a..57c4d3bd9e4 100644 --- a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx +++ b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsSidePanel/UninstallButton.tsx @@ -146,16 +146,6 @@ const UninstallButton = ({ const hasActiveStream = false; const hasUnclaimedFunds = false; - const shouldShowWarning = - isStreamingPaymentsExtension && (hasActiveStream || hasUnclaimedFunds); - - const isStreamingPaymentsExtension = - extensionId === Extension.StreamingPayments; - - // @todo: add proper logic here to determine if there are active streams or unclaimed funds - const hasActiveStream = false; - const hasUnclaimedFunds = false; - const shouldShowWarning = isStreamingPaymentsExtension && (hasActiveStream || hasUnclaimedFunds); From 1964e40723b16d49488f6b28c8ee4513e8b7a036 Mon Sep 17 00:00:00 2001 From: Joanna Date: Fri, 30 Aug 2024 12:50:57 +0200 Subject: [PATCH 090/126] feat: streaming payment preview base --- .../StreamingPayment/StreamingPayment.tsx | 78 ++++++++++++------- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 2438449a38f..ff45facc99d 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -12,7 +12,7 @@ import { import clsx from 'clsx'; import format from 'date-fns/format'; import { BigNumber } from 'ethers'; -import React, { type FC } from 'react'; +import React, { useState, type FC, useEffect } from 'react'; import { defineMessages } from 'react-intl'; import { generatePath } from 'react-router-dom'; @@ -21,20 +21,19 @@ import { ADDRESS_ZERO, APP_URL } from '~constants'; import { Action } from '~constants/actions.ts'; import { ONE_DAY_IN_SECONDS, ONE_HOUR_IN_SECONDS } from '~constants/time.ts'; import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; +import { useActionStatusContext } from '~context/ActionStatusContext/ActionStatusContext.ts'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import { - ColonyActionType, - StreamingPaymentEndCondition, - useGetUserByAddressQuery, -} from '~gql'; +import { ColonyActionType, StreamingPaymentEndCondition } from '~gql'; import { useMobile } from '~hooks'; +import useToggle from '~hooks/useToggle/index.ts'; import { COLONY_ACTIVITY_ROUTE, COLONY_HOME_ROUTE, TX_SEARCH_PARAM, } from '~routes'; import SpinnerLoader from '~shared/Preloaders/SpinnerLoader.tsx'; +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; import { addressHasRoles } from '~utils/checks/userHasRoles.ts'; import { findDomainByNativeId } from '~utils/domains.ts'; import { formatText } from '~utils/intl.ts'; @@ -54,6 +53,7 @@ import { TITLE_FIELD_NAME, TOKEN_FIELD_NAME, } from '~v5/common/ActionSidebar/consts.ts'; +import { useGetStreamingPaymentData } from '~v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts'; import { END_OPTIONS, START_IMMEDIATELY_VALUE, @@ -78,6 +78,7 @@ import DecisionMethodRow from '../rows/DecisionMethod.tsx'; import DescriptionRow from '../rows/Description.tsx'; import TeamFromRow from '../rows/TeamFrom.tsx'; +import CancelModal from './partials/CancelModal/CancelModal.tsx'; import { type StreamingPaymentProps } from './types.ts'; const displayName = 'v5.common.CompletedAction.partials.StreamingPayment'; @@ -89,10 +90,7 @@ const MSG = defineMessages({ }, }); -const StreamingPayment: FC = ({ - action, - streamingPayment, -}) => { +const StreamingPayment: FC = ({ action }) => { const { colony } = useColonyContext(); const { user } = useAppContext(); const isMobile = useMobile(); @@ -104,15 +102,29 @@ const StreamingPayment: FC = ({ } = useActionSidebarContext(); const decisionMethod = useDecisionMethod(action); - const { loadingStreamingPayment, streamingPaymentData } = streamingPayment; + const { actionStatus, setIsLoading } = useActionStatusContext(); + const [expectedActionStatus, setExpectedActionStatus] = + useState(null); - const { data: recipentData } = useGetUserByAddressQuery({ - variables: { address: streamingPaymentData?.recipientAddress || '' }, - skip: !streamingPaymentData?.recipientAddress, - }); + const [ + isCancelModalOpen, + { toggleOn: toggleCancelModalOn, toggleOff: toggleCancelModalOff }, + ] = useToggle(); + + const { loadingStreamingPayment, streamingPaymentData } = + useGetStreamingPaymentData(action?.streamingPaymentId); - const recipientName = - recipentData?.getUserByAddress?.items[0]?.profile?.displayName ?? ''; + useEffect(() => { + if (expectedActionStatus && expectedActionStatus !== actionStatus) { + setIsLoading(true); + return; + } + + if (expectedActionStatus && expectedActionStatus === actionStatus) { + setIsLoading(false); + setExpectedActionStatus(null); + } + }, [actionStatus, expectedActionStatus, setIsLoading]); if (loadingStreamingPayment) { return ( @@ -124,11 +136,9 @@ const StreamingPayment: FC = ({
); } - if (!streamingPaymentData) { return null; } - const { metadata, initiatorUser, @@ -154,11 +164,10 @@ const StreamingPayment: FC = ({ amount || '1', selectedToken?.decimals, ); - const { endCondition } = streamingPaymentMetadata || {}; + const selectedTeam = findDomainByNativeId(nativeDomainId, colony); const motionDomain = motionData?.motionDomain ?? null; - const selectedTeam = findDomainByNativeId(nativeDomainId, colony); const limitAmount = getStreamingPaymentLimit({ streamingPayment: streamingPaymentData, }); @@ -175,10 +184,13 @@ const StreamingPayment: FC = ({ requiredRolesDomain: streamingPaymentData.nativeDomainId, }); - // @todo: update cancel-related logic in separate PR const showCancelOption = - streamingPaymentData.isCancelled && - (user?.walletAddress === initiatorUser?.walletAddress || hasPermissions); + actionStatus && + [StreamingPaymentStatus.Active, StreamingPaymentStatus.NotStarted].includes( + actionStatus as StreamingPaymentStatus, + ) && + (user?.walletAddress === initiatorUser?.walletAddress || hasPermissions) && + expectedActionStatus !== StreamingPaymentStatus.Cancelled; const isCustomInterval = Number(interval) !== ONE_HOUR_IN_SECONDS && @@ -239,7 +251,7 @@ const StreamingPayment: FC = ({ key: '2', label: formatText({ id: 'expenditure.cancelPayment' }), icon: Prohibit, - onClick: () => {}, + onClick: toggleCancelModalOn, }, ] : []), @@ -268,6 +280,9 @@ const StreamingPayment: FC = ({ contentWrapperClassName={clsx('z-[65] sm:min-w-[11.25rem]', { '!left-6 right-6': isMobile, })} + dropdownPlacementProps={{ + top: 12, + }} items={meatballOptions} />
@@ -284,9 +299,7 @@ const StreamingPayment: FC = ({ walletAddress={recipientAddress} withVerifiedBadge={false} withUserName - > - {recipientName} - + /> ) : null, initiator: initiatorUser ? ( = ({ /> )} - {action.motionData?.motionDomain.metadata && ( = ({ {action.annotation?.message && ( )} + + setExpectedActionStatus(StreamingPaymentStatus.Cancelled) + } + /> ); }; From 179dc599ab5650274f3576a4bc97432e70241986 Mon Sep 17 00:00:00 2001 From: Joanna Date: Tue, 3 Sep 2024 14:13:23 +0200 Subject: [PATCH 091/126] feat: user hub updated with streams --- .../partials/BalanceTab/BalanceTab.styles.ts | 11 - .../partials/BalanceTab/BalanceTab.tsx | 53 ++--- .../UserHub/partials/BalanceTab/index.ts | 3 - .../partials/BalanceTab/partials/Balance.tsx | 199 ------------------ .../BalanceInfoRow/BalanceInfoRow.tsx | 159 ++++++++++++++ .../partials/BalanceInfoRow/types.ts | 10 + .../PendingReputation/PendingReputation.tsx | 104 --------- .../partials/PendingReputation/index.ts | 1 - .../partials/PendingReputation/utils.ts | 31 --- .../BalanceTab/partials/TotalReputation.tsx | 95 --------- .../UserHub/partials/BalanceTab/types.ts | 24 --- src/graphql/generated.ts | 11 + 12 files changed, 207 insertions(+), 494 deletions(-) delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts deleted file mode 100644 index dd4640e5a0f..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { tw } from '~utils/css/index.ts'; - -const balanceTabClasses = { - rowName: tw`min-w-[2.875rem] text-md`, - row: tw`flex justify-between font-medium`, - numeral: tw`ml-1 text-sm font-medium`, - icon: tw`mr-1 w-[0.875rem] text-blue-400`, - reputationValue: tw`mt-px text-blue-400`, -}; - -export default balanceTabClasses; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx index 754cf0f8749..e0e3f5d851a 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx @@ -1,52 +1,53 @@ -import React from 'react'; -import { useIntl } from 'react-intl'; +import React, { type FC } from 'react'; +import { defineMessages } from 'react-intl'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { formatText } from '~utils/intl.ts'; -import Balance from './partials/Balance.tsx'; -import PendingReputation from './partials/PendingReputation/index.ts'; -import TotalReputation from './partials/TotalReputation.tsx'; +import BalanceInfoRow from './partials/BalanceInfoRow/BalanceInfoRow.tsx'; +import StreamsInfoRow from './partials/StreamsInfoRow/StreamsInfoRow.tsx'; import { type BalanceTabProps } from './types.ts'; const displayName = 'common.Extensions.UserHub.partials.BalanceTab'; -const BalanceTab = ({ onTabChange }: BalanceTabProps) => { - const { formatMessage } = useIntl(); - const { - colony: { colonyAddress, nativeToken }, - } = useColonyContext(); +const MSG = defineMessages({ + title: { + id: `${displayName}.title`, + defaultMessage: 'Your overview in {colonyName}', + }, + titleColonyOverview: { + id: `${displayName}.titleColonyOverview`, + defaultMessage: 'Your overview', + }, +}); + +const BalanceTab: FC = ({ onTabChange }) => { + const { colony } = useColonyContext(); + const { metadata, nativeToken } = colony; + const { displayName: colonyDisplayName = '' } = metadata || {}; + const { wallet } = useAppContext(); if (!wallet) { return null; } - // @TODO: handle empty state return (
-

- {formatMessage({ id: 'userHub.reputation' })} -

- + {formatText(MSG.title, { colonyName: colonyDisplayName })} + + - - +
); }; BalanceTab.displayName = displayName; - export default BalanceTab; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts deleted file mode 100644 index 59d643f5aa6..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { default } from './BalanceTab.tsx'; -export { default as TotalReputation } from './partials/TotalReputation.tsx'; -export { default as PendingReputation } from './partials/PendingReputation/index.ts'; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx deleted file mode 100644 index e63120390b9..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx +++ /dev/null @@ -1,199 +0,0 @@ -import { - ArrowCircleDownRight, - ArrowCircleUpRight, - Eye, -} from '@phosphor-icons/react'; -import React, { type FC, useMemo } from 'react'; -import { defineMessages, useIntl } from 'react-intl'; - -import { UserHubTab } from '~common/Extensions/UserHub/types.ts'; -import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import { useTokensModalContext } from '~context/TokensModalContext/TokensModalContext.ts'; -import { useGetUserTokenBalanceQuery } from '~gql'; -import { useMobile } from '~hooks/index.ts'; -import Numeral from '~shared/Numeral/index.ts'; -import { formatText } from '~utils/intl.ts'; -import { multiLineTextEllipsis } from '~utils/strings.ts'; -import { getTokenDecimalsWithFallback } from '~utils/tokens.ts'; -import { TokensModalType } from '~v5/common/TokensModal/consts.ts'; -import Button from '~v5/shared/Button/index.ts'; -import TitleLabel from '~v5/shared/TitleLabel/index.ts'; - -import balanceTabClasses from '../BalanceTab.styles.ts'; -import { type BalanceProps, type ViewStakedButtonProps } from '../types.ts'; - -const displayName = - 'common.Extensions.UserHub.partials.ReputationTab.partials.Balance'; - -const MSG = defineMessages({ - nativeToken: { - id: `${displayName}.nativeToken`, - defaultMessage: 'Native token balance', - }, -}); - -const ViewStakedButton: FC = ({ - isFullSize, - onClick, -}) => ( -
- )} -
- -
- {isMobile && ( -
-
- )} -
- - {/* @TODO: stacked icon viewed? */} -
-
-
- - {formatMessage({ id: 'staked' })} - - {!isMobile && ( - onTabChange(UserHubTab.Stakes)} - /> - )} -
- -
- {isMobile && ( -
- onTabChange(UserHubTab.Stakes)} - isFullSize - /> -
- )} -
-
-
- ); -}; - -Balance.displayName = displayName; - -export default Balance; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx new file mode 100644 index 00000000000..9ff538a93f9 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx @@ -0,0 +1,159 @@ +import { ArrowDownRight, ArrowUpRight } from '@phosphor-icons/react'; +import React, { type FC, useMemo } from 'react'; +import { defineMessages } from 'react-intl'; + +import UserHubInfoSection from '~common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx'; +import { UserHubTab } from '~common/Extensions/UserHub/types.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { useTokensModalContext } from '~context/TokensModalContext/TokensModalContext.ts'; +import { useGetUserTokenBalanceQuery } from '~gql'; +import Numeral from '~shared/Numeral/index.ts'; +import { formatText } from '~utils/intl.ts'; +import { multiLineTextEllipsis } from '~utils/strings.ts'; +import { getTokenDecimalsWithFallback } from '~utils/tokens.ts'; +import { TokensModalType } from '~v5/common/TokensModal/consts.ts'; +import Button from '~v5/shared/Button/index.ts'; + +import { type BalanceInfoRowProps } from './types.ts'; + +const displayName = + 'common.Extensions.UserHub.partials.BalanceTab.partials.BalanceInfoRow'; + +const MSG = defineMessages({ + title: { + id: `${displayName}.title`, + defaultMessage: 'Balance in this colony', + }, + viewStakes: { + id: `${displayName}.viewStakes`, + defaultMessage: 'View stakes', + }, + totalBalance: { + id: `${displayName}.totalBalance`, + defaultMessage: 'Total balance', + }, + activeFunds: { + id: `${displayName}.activeFunds`, + defaultMessage: 'Active funds', + }, + stakedFunds: { + id: `${displayName}.stakedFunds`, + defaultMessage: 'Staked funds', + }, + depositFunds: { + id: `${displayName}.depositFunds`, + defaultMessage: 'Deposit funds', + }, + withdrawalFunds: { + id: `${displayName}.withdrawalFunds`, + defaultMessage: 'Withdrawal funds', + }, +}); + +const BalanceInfoRow: FC = ({ + nativeToken, + wallet, + onTabChange, + className, +}) => { + const { + colony: { colonyAddress }, + } = useColonyContext(); + + const { data: tokenBalanceQueryData } = useGetUserTokenBalanceQuery({ + variables: { + input: { + walletAddress: wallet?.address ?? '', + tokenAddress: nativeToken?.tokenAddress ?? '', + colonyAddress, + }, + }, + skip: !wallet?.address || !nativeToken?.tokenAddress, + }); + const tokenBalanceData = tokenBalanceQueryData?.getUserTokenBalance; + + const tokenDecimals = useMemo( + () => getTokenDecimalsWithFallback(nativeToken?.decimals), + [nativeToken], + ); + + const { toggleOnTokensModal, setTokensModalType } = useTokensModalContext(); + + return ( + onTabChange(UserHubTab.Stakes), + }} + items={[ + { + key: '1', + label: formatText(MSG.totalBalance), + value: ( + + ), + }, + { + key: '2', + label: formatText(MSG.activeFunds), + value: ( + + ), + }, + { + key: '3', + label: formatText(MSG.stakedFunds), + value: ( + + ), + }, + ]} + > +
+
+
+ ); +}; + +BalanceInfoRow.displayName = displayName; + +export default BalanceInfoRow; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts new file mode 100644 index 00000000000..54b9737e5e9 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts @@ -0,0 +1,10 @@ +import { type UserHubTab } from '~common/Extensions/UserHub/types.ts'; +import { type Token } from '~types/graphql.ts'; +import { type ColonyWallet } from '~types/wallet.ts'; + +export interface BalanceInfoRowProps { + nativeToken: Token; + wallet: ColonyWallet; + onTabChange: (newTab: UserHubTab) => void; + className?: string; +} diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx deleted file mode 100644 index 7c9961460a1..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import React, { type FC, useEffect, useState } from 'react'; -import { useIntl } from 'react-intl'; - -import balanceTabClasses from '~common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts'; -import { type PendingReputationProps } from '~common/Extensions/UserHub/partials/BalanceTab/types.ts'; -import { useGetReputationMiningCycleMetadataQuery } from '~gql'; -import useUserReputation from '~hooks/useUserReputation.ts'; -import TimeRelative from '~shared/TimeRelative/index.ts'; -import TitleLabel from '~v5/shared/TitleLabel/index.ts'; - -import { - getNextMiningCycleDate, - getReputationDecayInNextDay, -} from './utils.ts'; - -const displayName = - 'common.Extensions.UserHub.partials.ReputationTab.partials.PendingReputation'; - -const UPDATE_INTERVAL = 15; - -const PendingReputation: FC = ({ - colonyAddress, - wallet, - nativeToken, -}) => { - const { formatMessage } = useIntl(); - - const { userReputation } = useUserReputation({ - colonyAddress, - walletAddress: wallet?.address, - }); - - const { data } = useGetReputationMiningCycleMetadataQuery(); - const { lastCompletedAt } = data?.getReputationMiningCycleMetadata ?? {}; - - const [nextMiningCycleDate, setNextMiningCycleDate] = useState( - lastCompletedAt - ? getNextMiningCycleDate(new Date(lastCompletedAt ?? '')) - : null, - ); - - useEffect(() => { - const intervalTimer = setInterval(() => { - if (!nextMiningCycleDate) { - return; - } - - const halfIntervalAgo = new Date( - Date.now() - (UPDATE_INTERVAL / 2) * 1000, - ); - - if (nextMiningCycleDate < halfIntervalAgo) { - setNextMiningCycleDate(getNextMiningCycleDate(nextMiningCycleDate)); - } - }, UPDATE_INTERVAL * 1000); - - return () => clearInterval(intervalTimer); - }, [nextMiningCycleDate]); - - return ( -
- -
-
-

- {formatMessage({ id: 'userHub.reputationNextUpdate' })} -

- - {nextMiningCycleDate ? ( - - ) : ( - '-' - )} - -
-
-

- {formatMessage({ id: 'userHub.reputationDecayLabel' })} -

- - {formatMessage( - { id: 'userHub.reputationDecayValue' }, - { - points: userReputation - ? getReputationDecayInNextDay( - userReputation, - nativeToken.decimals, - ) - : '0', - }, - )} - -
-
-
- ); -}; - -PendingReputation.displayName = displayName; - -export default PendingReputation; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts deleted file mode 100644 index 10737e3b7f6..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './PendingReputation.tsx'; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts deleted file mode 100644 index 94a2fdbd974..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts +++ /dev/null @@ -1,31 +0,0 @@ -import Decimal from 'decimal.js'; - -/** - * Function calculating and formatting the amount of reputation decay in the next day - */ -export const getReputationDecayInNextDay = ( - currentReputation: string, - nativeTokenDecimals: number, -) => { - const convertedReputation = new Decimal(currentReputation); - const nextDayDecay = convertedReputation.sub( - convertedReputation.mul(new Decimal(0.5).pow(1 / 90)), - ); - return nextDayDecay - .div(new Decimal(10).pow(nativeTokenDecimals)) - .round() - .toString(); -}; - -const REPUTATION_CYCLE_DURATION_IN_HOURS = 1; - -/** - * Function calculating the date of the next reputation mining cycle, based on the date of the last completed cycle - */ -export const getNextMiningCycleDate = (lastCompletedAt: Date) => { - const nextCycleTime = new Date(lastCompletedAt); - nextCycleTime.setHours( - nextCycleTime.getHours() + REPUTATION_CYCLE_DURATION_IN_HOURS, - ); - return nextCycleTime; -}; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx deleted file mode 100644 index e42da76a115..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import { Star } from '@phosphor-icons/react'; -import clsx from 'clsx'; -import Decimal from 'decimal.js'; -import React, { type FC } from 'react'; -import { useIntl } from 'react-intl'; - -import useUserReputation from '~hooks/useUserReputation.ts'; -import Numeral from '~shared/Numeral/index.ts'; -import { calculatePercentageReputation, ZeroValue } from '~utils/reputation.ts'; -import { - getFormattedTokenValue, - getTokenDecimalsWithFallback, -} from '~utils/tokens.ts'; -import TitleLabel from '~v5/shared/TitleLabel/index.ts'; - -import balanceTabClasses from '../BalanceTab.styles.ts'; -import { type TotalReputationProps } from '../types.ts'; - -const displayName = - 'common.Extensions.UserHub.partials.ReputationTab.partials.TotalReputation'; - -const TotalReputation: FC = ({ - colonyAddress, - wallet, - nativeToken, -}) => { - const { formatMessage } = useIntl(); - const { userReputation, totalReputation } = useUserReputation({ - colonyAddress, - walletAddress: wallet?.address, - }); - - const percentageReputation = calculatePercentageReputation( - userReputation || '0', - totalReputation || '0', - ); - - const formattedReputationPoints = getFormattedTokenValue( - new Decimal(userReputation || 0).toString(), - getTokenDecimalsWithFallback(nativeToken.decimals), - ); - - return ( -
-
- - {/* @BETA: add action */} - {/* */} -
-
-
- - {formatMessage({ id: 'total.balance' })} - -
- - {percentageReputation === ZeroValue.NearZero && ( - - {percentageReputation} - - )} - {percentageReputation && - percentageReputation !== ZeroValue.NearZero && ( - - )} -
-
-
- - {formatMessage({ id: 'reputation.points' })} - - -
-
-
- ); -}; - -TotalReputation.displayName = displayName; - -export default TotalReputation; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts index c73f47e9a41..091261a8921 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts @@ -1,29 +1,5 @@ import { type UserHubTab } from '~common/Extensions/UserHub/types.ts'; -import { type Token } from '~types/graphql.ts'; -import { type ColonyWallet } from '~types/wallet.ts'; export interface BalanceTabProps { onTabChange: (newTab: UserHubTab) => void; } - -export interface BalanceProps extends Pick { - nativeToken: Token; - wallet: ColonyWallet; -} - -export interface ViewStakedButtonProps { - isFullSize?: boolean; - onClick: () => void; -} - -export interface TotalReputationProps { - colonyAddress: string; - wallet: ColonyWallet; - nativeToken: Token; -} - -export interface PendingReputationProps { - nativeToken: Token; - colonyAddress: string; - wallet: ColonyWallet; -} diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index b0e9e632201..9d326a7f0ad 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -12137,6 +12137,17 @@ export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ }>; +export type GetStreamingPaymentsByColonyQuery = { __typename?: 'Query', getStreamingPaymentsByColony?: { __typename?: 'ModelStreamingPaymentConnection', nextToken?: string | null, items: Array<{ __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null> } | null }; + +export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ + colonyId: Scalars['ID']; + sortDirection?: InputMaybe; + limit?: InputMaybe; + nextToken?: InputMaybe; + recipientAddress: Scalars['String']; +}>; + + export type GetStreamingPaymentsByColonyQuery = { __typename?: 'Query', getStreamingPaymentsByColony?: { __typename?: 'ModelStreamingPaymentConnection', nextToken?: string | null, items: Array<{ __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null> } | null }; export type GetTokenByAddressQueryVariables = Exact<{ From ddf5abfba7620fe659b526ef1ba7838a6b859a7a Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 7 Nov 2024 11:51:04 +0100 Subject: [PATCH 092/126] feat: streaming payment redo --- .../partials/StreamingPayment/StreamingPayment.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index ff45facc99d..b80275a3753 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -280,9 +280,6 @@ const StreamingPayment: FC = ({ action }) => { contentWrapperClassName={clsx('z-[65] sm:min-w-[11.25rem]', { '!left-6 right-6': isMobile, })} - dropdownPlacementProps={{ - top: 12, - }} items={meatballOptions} />
From 77f1c7b2f8304ca2903270fb6ce9da68dfa2c664 Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 7 Nov 2024 22:36:58 +0100 Subject: [PATCH 093/126] fix: use new id --- .../partials/StreamingPayment/StreamingPayment.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index b80275a3753..1f2e4addeb1 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -164,6 +164,7 @@ const StreamingPayment: FC = ({ action }) => { amount || '1', selectedToken?.decimals, ); + const { endCondition } = streamingPaymentMetadata || {}; const selectedTeam = findDomainByNativeId(nativeDomainId, colony); const motionDomain = motionData?.motionDomain ?? null; @@ -201,6 +202,8 @@ const StreamingPayment: FC = ({ action }) => { const isStartImmediately = Math.abs(startTimeDate.getTime() - new Date(createdAt).getTime()) < 60000; + // console.log({isStartImmediately, startTimeDate, createdAt}); + const meatballOptions: MeatBallMenuItem[] = [ { key: '1', From 946e7c087e3471640e6c48005a8e813b08bd9ba5 Mon Sep 17 00:00:00 2001 From: Joanna Date: Mon, 7 Oct 2024 11:32:47 +0200 Subject: [PATCH 094/126] feat: cancel streaming payment --- .../partials/ActionBadge/ActionBadge.tsx | 33 ++- .../AvailableToClaimCounter.tsx | 13 +- .../partials/AvailableToClaimCounter/types.ts | 3 +- .../StreamsInfoRow/StreamsInfoRow.tsx | 7 +- .../ButtonWithLoader.tsx | 2 + .../shared/StreamingPayments/hooks.ts | 33 +-- .../shared/StreamingPayments/utils.ts | 1 - .../v5/common/ActionSidebar/ActionSidebar.tsx | 224 +++++------------- .../hooks/useGetActionFormData.ts | 8 +- .../hooks/useGetStreamingPaymentData.ts | 65 +---- .../ActionSidebarLayout.tsx | 176 ++++++++++++++ .../partials/ActionSidebarLayout/consts.ts | 10 + .../partials/ActionSidebarLayout/types.ts | 14 ++ .../ActionSidebarNotFoundContent.tsx | 81 +++++++ .../ActionSidebarNotFoundContent/types.ts | 5 + .../ActionSidebarStatusPill.tsx | 84 ++++--- .../partials/ActionSidebarStatusPill/types.ts | 12 - .../ExpenditureActionStatusBadge.tsx | 30 +-- .../ExpenditureActionStatusBadge/consts.ts | 3 +- .../ExpenditureActionStatusBadge/types.ts | 17 +- .../CompletedAction/CompletedAction.tsx | 15 +- .../partials/CancelModal/CancelModal.tsx | 38 ++- .../partials/CancelModal/consts.ts | 6 - .../partials/CancelModal/utils.ts | 11 + .../partials/PaymentBuilderWidget/utils.ts | 4 - .../StreamingPayment/StreamingPayment.tsx | 1 - .../AvailableToClaimCounter.tsx | 28 ++- .../partials/AvailableToClaimCounter/types.ts | 4 +- .../partials/CancelModal/CancelModal.tsx | 142 +++++++++++ .../partials/CancelModal/consts.ts | 20 ++ .../partials/CancelModal/types.ts | 7 + .../partials/CancelModal/utils.ts | 11 + .../StreamingPaymentWidget.tsx | 142 +++++++---- .../partials/StreamingPaymentWidget/types.ts | 5 - .../partials/StreamingPayment/types.ts | 5 - .../ActionStatusContext.ts | 31 +++ .../ActionStatusContextProvider.tsx | 44 ++++ src/hooks/useActivityFeed/helpers.ts | 6 +- .../useExpenditureActionStatus.ts} | 5 +- src/i18n/en.json | 17 +- src/types/expenditures.ts | 12 + src/utils/expenditures.ts | 46 ++++ src/utils/streamingPayments.ts | 17 +- 43 files changed, 983 insertions(+), 455 deletions(-) create mode 100644 src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/ActionSidebarLayout.tsx create mode 100644 src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/consts.ts create mode 100644 src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts create mode 100644 src/components/v5/common/ActionSidebar/partials/ActionSidebarNotFoundContent/ActionSidebarNotFoundContent.tsx create mode 100644 src/components/v5/common/ActionSidebar/partials/ActionSidebarNotFoundContent/types.ts delete mode 100644 src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/types.ts create mode 100644 src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/utils.ts create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/CancelModal.tsx create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/consts.ts create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/types.ts create mode 100644 src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/utils.ts create mode 100644 src/context/ActionStatusContext/ActionStatusContext.ts create mode 100644 src/context/ActionStatusContext/ActionStatusContextProvider.tsx rename src/{components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/hooks.ts => hooks/useExpenditureActionStatus.ts} (90%) diff --git a/src/components/common/ColonyActionsTable/partials/ActionBadge/ActionBadge.tsx b/src/components/common/ColonyActionsTable/partials/ActionBadge/ActionBadge.tsx index dc7811af85b..436a018be0c 100644 --- a/src/components/common/ColonyActionsTable/partials/ActionBadge/ActionBadge.tsx +++ b/src/components/common/ColonyActionsTable/partials/ActionBadge/ActionBadge.tsx @@ -1,7 +1,10 @@ -import React, { type FC } from 'react'; +import React, { useMemo, type FC, useEffect } from 'react'; import LoadingSkeleton from '~common/LoadingSkeleton/LoadingSkeleton.tsx'; +import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; +import { useExpenditureActionStatus } from '~hooks/useExpenditureActionStatus.ts'; import { MotionState } from '~utils/colonyMotions.ts'; +import { getStreamingPaymentStatus } from '~utils/streamingPayments.ts'; import { useGetExpenditureData } from '~v5/common/ActionSidebar/hooks/useGetExpenditureData.ts'; import { useGetStreamingPaymentData } from '~v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts'; import ExpenditureActionStatusBadge from '~v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx'; @@ -19,10 +22,30 @@ const ActionBadge: FC = ({ const { expenditure, loadingExpenditure } = useGetExpenditureData(expenditureId); - const { streamingPaymentData, paymentStatus, loadingStreamingPayment } = + const expenditureStatus = useExpenditureActionStatus(expenditure); + const { streamingPaymentData, loadingStreamingPayment } = useGetStreamingPaymentData(expenditureId); - const isLoading = loading || loadingExpenditure || loadingStreamingPayment; + const { currentBlockTime: blockTime, fetchCurrentBlockTime } = + useCurrentBlockTime(); + + const currentTime = useMemo( + () => Math.floor(blockTime ?? Date.now() / 1000), + [blockTime], + ); + + const streamingPaymentStatus = getStreamingPaymentStatus({ + streamingPayment: streamingPaymentData, + currentTimestamp: currentTime, + isMotion: !!motionState, + }); + + useEffect(() => { + fetchCurrentBlockTime(); + }, [fetchCurrentBlockTime]); + + const isLoading = + loading || !!loadingExpenditure || !!loadingStreamingPayment; return ( = ({ className="h-[1.625rem] w-full rounded" > {streamingPaymentData ? ( - + ) : ( <> {expenditure ? ( ) : ( diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx index 5b20b280b8b..efd73dab057 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx'; import { AnimatePresence, motion } from 'framer-motion'; -import React, { type FC, useEffect } from 'react'; +import React, { type FC, useEffect, useState } from 'react'; import { currencySymbolMap } from '~constants/currency.ts'; import { useCurrencyContext } from '~context/CurrencyContext/CurrencyContext.ts'; @@ -12,18 +12,25 @@ const AvailableToClaimCounter: FC = ({ getTotalFunds, isAtLeastOnePaymentActive, ratePerSecond, + currentTimestamp: currentTimeProp, }) => { const { currency } = useCurrencyContext(); + const [currentTime, setCurrentTime] = useState(-1); useEffect(() => { const timer = setInterval(() => { - getTotalFunds(); + getTotalFunds(currentTime); + setCurrentTime((oldTime) => oldTime + 1); }, 1000); return () => { clearInterval(timer); }; - }, [getTotalFunds]); + }, [currentTime, getTotalFunds]); + + useEffect(() => { + setCurrentTime(currentTimeProp); + }, [currentTimeProp]); const decimalPlaces = ratePerSecond.toString().split('.')[1]?.length || 0; const fixedDecimalPlaces = decimalPlaces < 5 ? decimalPlaces : 5; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/types.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/types.ts index 6ee91ca0154..5780afaf052 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/types.ts +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/AvailableToClaimCounter/types.ts @@ -1,6 +1,7 @@ export interface AvailableToClaimCounterProps { amountAvailableToClaim: number; - getTotalFunds: () => Promise; + getTotalFunds: (currentTimestamp: number) => Promise; isAtLeastOnePaymentActive?: boolean; ratePerSecond: number; + currentTimestamp: number; } diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx index 06ede9f86cd..71df2470b7f 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/StreamsInfoRow.tsx @@ -6,6 +6,7 @@ import { defineMessages } from 'react-intl'; import UserHubInfoSection from '~common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx'; import LoadingSkeleton from '~common/LoadingSkeleton/LoadingSkeleton.tsx'; import { currencySymbolMap } from '~constants/currency.ts'; +import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; import Numeral from '~shared/Numeral/Numeral.tsx'; import { useStreamingPaymentsTotalFunds } from '~shared/StreamingPayments/hooks.ts'; import { formatText } from '~utils/intl.ts'; @@ -55,6 +56,7 @@ const StreamsInfoRow: FC = () => { getTotalFunds, streamingPayments, } = useStreamingPaymentsTotalFunds({}); + const { currentBlockTime: blockTime } = useCurrentBlockTime(); return ( { {streamingPayments.length ? ( getTotalFunds(streamingPayments)} + getTotalFunds={(currentTimestamp) => + getTotalFunds(streamingPayments, currentTimestamp) + } isAtLeastOnePaymentActive={isAnyPaymentActive} ratePerSecond={ratePerSecond} + currentTimestamp={Math.floor(blockTime ?? Date.now() / 1000)} /> ) : ( diff --git a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsHeader/ButtonWithLoader.tsx b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsHeader/ButtonWithLoader.tsx index 28b7a63a66f..35eaf5552c8 100644 --- a/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsHeader/ButtonWithLoader.tsx +++ b/src/components/frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsHeader/ButtonWithLoader.tsx @@ -21,6 +21,7 @@ export const ButtonWithLoader: FC< loaderClassName = '!px-4 !text-md', loaderIconSize = 18, onClick, + className, }) => loading ? ( {children} diff --git a/src/components/shared/StreamingPayments/hooks.ts b/src/components/shared/StreamingPayments/hooks.ts index 958bee4ec99..bc4c3691164 100644 --- a/src/components/shared/StreamingPayments/hooks.ts +++ b/src/components/shared/StreamingPayments/hooks.ts @@ -7,10 +7,7 @@ import { useGetStreamingPaymentsByColonyQuery } from '~gql'; import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; import { notNull } from '~utils/arrays/index.ts'; -import { - getStreamingPaymentAmountsLeft, - getStreamingPaymentStatus, -} from '~utils/streamingPayments.ts'; +import { getStreamingPaymentStatus } from '~utils/streamingPayments.ts'; import { type StreamingPaymentItems } from './types.ts'; import { calculateTotalsFromStreams } from './utils.ts'; @@ -88,7 +85,7 @@ export const useStreamingPaymentsTotalFunds = ({ const [totalLastMonthStreaming, setTotalLastMonthStreaming] = useState(0); const getTotalFunds = useCallback( - async (items: StreamingPaymentItems) => { + async (items: StreamingPaymentItems, currentTimestamp: number) => { const { totalAvailable, totalClaimed, @@ -97,7 +94,7 @@ export const useStreamingPaymentsTotalFunds = ({ lastMonthStreaming, } = await calculateTotalsFromStreams({ streamingPayments: items, - currentTimestamp: Math.floor(blockTime ?? Date.now() / 1000), + currentTimestamp, currency, colony, }); @@ -111,21 +108,16 @@ export const useStreamingPaymentsTotalFunds = ({ }); setRatePerSecond(ratePerSecondValue); }, - [blockTime, colony, currency], + [colony, currency], ); const getTotalActiveStreamingPayments = useCallback( (items: StreamingPaymentItems) => { const activeStreams = items.filter((item) => { - const { amountAvailableToClaim } = getStreamingPaymentAmountsLeft( - item, - Math.floor(blockTime ?? Date.now() / 1000), - ); return ( getStreamingPaymentStatus({ streamingPayment: item, currentTimestamp: Math.floor(blockTime ?? Date.now() / 1000), - amountAvailableToClaim, }) === StreamingPaymentStatus.Active ); }); @@ -170,11 +162,20 @@ export const useStreamingPaymentsTotalFunds = ({ isFilteredByWalletAddress, nativeDomainId, ]); - useEffect(() => { - getTotalFunds(streamingPayments); - getTotalActiveStreamingPayments(streamingPayments); - }, [getTotalFunds, streamingPayments, getTotalActiveStreamingPayments]); + if (streamingPayments.length) { + getTotalFunds( + streamingPayments, + Math.floor(blockTime ?? Date.now() / 1000), + ); + getTotalActiveStreamingPayments(streamingPayments); + } + }, [ + blockTime, + getTotalFunds, + streamingPayments, + getTotalActiveStreamingPayments, + ]); return { totalStreamed: totalFunds.totalClaimed + totalFunds.totalAvailable, diff --git a/src/components/shared/StreamingPayments/utils.ts b/src/components/shared/StreamingPayments/utils.ts index f24f2bfb1cf..ce582cbceaa 100644 --- a/src/components/shared/StreamingPayments/utils.ts +++ b/src/components/shared/StreamingPayments/utils.ts @@ -78,7 +78,6 @@ export const calculateTotalsFromStreams = async ({ const paymentStatus = getStreamingPaymentStatus({ streamingPayment: item, currentTimestamp, - amountAvailableToClaim, }); const amountAvailableToClaimToCurrency = await calculateToCurrency({ diff --git a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx index cf8926683bd..f8be098d74d 100644 --- a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx +++ b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx @@ -1,24 +1,16 @@ -import { - ArrowLineRight, - ArrowsOutSimple, - ShareNetwork, - WarningCircle, - X, -} from '@phosphor-icons/react'; +import { WarningCircle } from '@phosphor-icons/react'; import clsx from 'clsx'; -import { motion } from 'framer-motion'; import React, { type FC, type PropsWithChildren, useEffect, - useLayoutEffect, useRef, } from 'react'; import { isFullScreen } from '~constants/index.ts'; import { useActionContext } from '~context/ActionContext/ActionContext.ts'; import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; -import { useMobile } from '~hooks/index.ts'; +import ActionStatusContextProvider from '~context/ActionStatusContext/ActionStatusContextProvider.tsx'; import useCopyToClipboard from '~hooks/useCopyToClipboard.ts'; import useDisableBodyScroll from '~hooks/useDisableBodyScroll/index.ts'; import { useDraftAgreement } from '~hooks/useDraftAgreement.ts'; @@ -36,7 +28,8 @@ import useCloseSidebarClick from './hooks/useCloseSidebarClick.ts'; import useGetGroupedActionComponent from './hooks/useGetGroupedActionComponent.tsx'; import { ActionNotFound } from './partials/ActionNotFound.tsx'; import ActionSidebarContent from './partials/ActionSidebarContent/ActionSidebarContent.tsx'; -import ActionSidebarLoadingSkeleton from './partials/ActionSidebarLoadingSkeleton/ActionSidebarLoadingSkeleton.tsx'; +import ActionSidebarLayout from './partials/ActionSidebarLayout/ActionSidebarLayout.tsx'; +import ActionSidebarNotFoundContent from './partials/ActionSidebarNotFoundContent/ActionSidebarNotFoundContent.tsx'; import ActionSidebarStatusPill from './partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx'; import ExpenditureActionStatusBadge from './partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx'; import { GoBackButton } from './partials/GoBackButton/GoBackButton.tsx'; @@ -56,9 +49,7 @@ const ActionSidebar: FC> = ({ isValidTransactionHash, loadingAction, isMotion, - isMultiSig, motionState, - expenditure, loadingExpenditure, startActionPoll, stopActionPoll, @@ -77,17 +68,9 @@ const ActionSidebar: FC> = ({ actionSidebarInitialValues?.[ACTION_TYPE_FIELD_NAME] || actionType, ); const GroupedActionComponent = useGetGroupedActionComponent(); - const [isSidebarFullscreen, { toggle: toggleIsSidebarFullscreen, toggleOn }] = - useToggle(); const timeout = useRef(); - useLayoutEffect(() => { - if (localStorage.getItem(isFullScreen) === 'true') { - toggleOn(); - } - }, [toggleOn]); - useEffect(() => { clearTimeout(timeout.current); @@ -110,7 +93,6 @@ const ActionSidebar: FC> = ({ }); const { isCopied, handleClipboardCopy } = useCopyToClipboard(); - const isMobile = useMobile(); useDisableBodyScroll(isActionSidebarOpen); @@ -120,9 +102,7 @@ const ActionSidebar: FC> = ({ const getSidebarContent = () => { if (action) { - return ( - - ); + return ; } if (actionNotFound) { @@ -149,157 +129,59 @@ const ActionSidebar: FC> = ({ ); }; - const getShareButton = () => - !!transactionHash && ( - - - - ); - return ( - -
-
-
- - {actionGroupType && ( - - )} - {!isMobile && ( -
-
- - {getShareButton()} -
- {action && !isLoading && ( - - )} - {(!!( - isMotion && action?.motionData?.motionStateHistory.endedAt - ) || - !!isMultiSig) && - motionState && ( - - )} -
- )} - {isMobile && getShareButton()} -
-
{children}
-
-
- {isLoading ? ( - - ) : ( -
+ : undefined + } + additionalTopContent={children} + isLoading={isLoading} + statusPill={ + action && !isLoading ? : undefined + } + maxSize={!!transactionId && !actionNotFound ? 'big' : 'small'} + > +
{getSidebarContent()}
- )} - { - toggleCancelModalOff(); - toggleActionSidebarOff(); - }} - icon={WarningCircle} - buttonMode="primarySolid" - confirmMessage={formatText({ id: 'button.cancelAction' })} - closeMessage={formatText({ - id: 'button.continueAction', - })} - /> - + { + toggleCancelModalOff(); + toggleActionSidebarOff(); + }} + icon={WarningCircle} + buttonMode="primarySolid" + confirmMessage={formatText({ id: 'button.cancelAction' })} + closeMessage={formatText({ + id: 'button.continueAction', + })} + /> + + ); }; diff --git a/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts b/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts index 4fa0521a8a5..bd15bbbd477 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts @@ -44,11 +44,8 @@ const useGetActionFormData = (transactionId: string | undefined) => { const { streamingPaymentData, loadingStreamingPayment, - paymentStatus, - amounts, refetchStreamingPayment, - updateAmountsAndStatus, - } = useGetStreamingPaymentData(action?.streamingPaymentId); + } = useGetStreamingPaymentData(action?.expenditureId); const defaultValues = useMemo(() => { if (!action) { @@ -416,10 +413,7 @@ const useGetActionFormData = (transactionId: string | undefined) => { streamingPayment: { streamingPaymentData, loadingStreamingPayment, - paymentStatus, - amounts, refetchStreamingPayment, - updateAmountsAndStatus, }, startPollingForAction, stopPollingForAction, diff --git a/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts index 2195d0b62a4..5628f83ea43 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts @@ -1,16 +1,9 @@ -import { useCallback, useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { FAILED_LOADING_DURATION as POLLING_TIMEOUT } from '~frame/LoadingTemplate/index.ts'; import { useGetStreamingPaymentQuery } from '~gql'; -import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; -import { type StreamingPayment } from '~types/graphql.ts'; -import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; import noop from '~utils/noop.ts'; import { getSafePollingInterval } from '~utils/queries.ts'; -import { - getStreamingPaymentAmountsLeft, - getStreamingPaymentStatus, -} from '~utils/streamingPayments.ts'; export const useGetStreamingPaymentData = ( streamingPaymentId: string | null | undefined, @@ -22,27 +15,16 @@ export const useGetStreamingPaymentData = ( variables: { streamingPaymentId: streamingPaymentId || '', }, - skip: Number.isNaN(streamingPaymentId), + skip: !streamingPaymentId, fetchPolicy: 'cache-and-network', pollInterval, }); const streamingPayment = data?.getStreamingPayment; + const [isPolling, setIsPolling] = useState( streamingPaymentId && !streamingPayment, ); - const [amounts, setAmounts] = useState<{ - amountAvailableToClaim: string; - amountClaimedToDate: string; - }>({ - amountAvailableToClaim: '0', - amountClaimedToDate: '0', - }); - const [paymentStatus, setPaymentStatus] = useState( - StreamingPaymentStatus.NotStarted, - ); - const { currentBlockTime: blockTime, fetchCurrentBlockTime } = - useCurrentBlockTime(); useEffect(() => { const shouldPoll = streamingPaymentId && !streamingPayment; @@ -72,51 +54,14 @@ export const useGetStreamingPaymentData = ( pollInterval, ]); - const updateAmountsAndStatus = useCallback( - ( - payment: StreamingPayment, - currentTimestamp: number, - isMotion?: boolean, - ) => { - const { amountAvailableToClaim, amountClaimedToDate } = - getStreamingPaymentAmountsLeft(payment, currentTimestamp); - - const status = getStreamingPaymentStatus({ - streamingPayment, - currentTimestamp, - isMotion, - amountAvailableToClaim: amounts.amountAvailableToClaim, - }); - - setPaymentStatus(status); - setAmounts({ amountAvailableToClaim, amountClaimedToDate }); - }, - [amounts.amountAvailableToClaim, streamingPayment], - ); - - useEffect(() => { - if (!loading) { - fetchCurrentBlockTime(); - } - }, [fetchCurrentBlockTime, loading]); - - useEffect(() => { - if (streamingPayment) { - const currentTimestamp = Math.floor(blockTime ?? Date.now() / 1000); - - updateAmountsAndStatus(streamingPayment, currentTimestamp); - } - }, [blockTime, streamingPayment, updateAmountsAndStatus]); + const isLoading = loading || !!isPolling; return { streamingPaymentData: streamingPayment, - loadingStreamingPayment: loading || !!isPolling, + loadingStreamingPayment: isLoading, refetchStreamingPayment: refetch, startPolling, stopPolling, - updateAmountsAndStatus, - paymentStatus, - amounts, }; }; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/ActionSidebarLayout.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/ActionSidebarLayout.tsx new file mode 100644 index 00000000000..5732bc74a5a --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/ActionSidebarLayout.tsx @@ -0,0 +1,176 @@ +import { + ArrowLineRight, + ArrowsOutSimple, + ShareNetwork, + X, +} from '@phosphor-icons/react'; +import clsx from 'clsx'; +import { motion } from 'framer-motion'; +import React, { + type PropsWithChildren, + useLayoutEffect, + forwardRef, +} from 'react'; + +import { isFullScreen } from '~constants/index.ts'; +import { useMobile } from '~hooks/index.ts'; +import useToggle from '~hooks/useToggle/index.ts'; +import Tooltip from '~shared/Extensions/Tooltip/Tooltip.tsx'; +import { formatText } from '~utils/intl.ts'; + +import ActionSidebarLoadingSkeleton from '../ActionSidebarLoadingSkeleton/ActionSidebarLoadingSkeleton.tsx'; + +import { actionSidebarAnimation } from './consts.ts'; +import { type ActionSidebarLayoutProps } from './types.ts'; + +const displayName = 'v5.common.ActionSidebar.partials.ActionSidebarLayout'; + +const ActionSidebarLayout = forwardRef< + HTMLDivElement, + PropsWithChildren +>( + ( + { + onCloseClick, + children, + additionalTopContent, + statusPill, + shareButtonProps, + isLoading, + maxSize, + className, + }, + ref, + ) => { + const isMobile = useMobile(); + + const [ + isSidebarFullscreen, + { toggle: toggleIsSidebarFullscreen, toggleOn }, + ] = useToggle(); + + useLayoutEffect(() => { + if (localStorage.getItem(isFullScreen) === 'true') { + toggleOn(); + } + }, [toggleOn]); + + const getShareButton = () => { + if (!shareButtonProps) { + return null; + } + + const { + onShareButtonClick, + tooltipContent, + placement, + ...restShareTooltipProps + } = shareButtonProps; + + return ( + + + + ); + }; + + return ( + +
+
+
+ + {isMobile ? ( + getShareButton() + ) : ( +
+
+ + {getShareButton()} +
+ {statusPill} +
+ )} +
+ {additionalTopContent &&
{additionalTopContent}
} +
+
+ {isLoading ? : children} +
+ ); + }, +); + +ActionSidebarLayout.displayName = displayName; +export default ActionSidebarLayout; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/consts.ts b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/consts.ts new file mode 100644 index 00000000000..5903318ae98 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/consts.ts @@ -0,0 +1,10 @@ +import { type Variants } from 'framer-motion'; + +export const actionSidebarAnimation: Variants = { + hidden: { + x: '100%', + }, + visible: { + x: 0, + }, +}; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts new file mode 100644 index 00000000000..8a7f195bdc9 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts @@ -0,0 +1,14 @@ +import { type TooltipProps } from '~shared/Extensions/Tooltip/types.ts'; + +export interface ActionSidebarLayoutProps { + onCloseClick: () => void; + additionalTopContent?: React.ReactNode; + statusPill?: React.ReactNode; + className?: string; + shareButtonProps?: Omit & { + tooltipContent?: React.ReactNode; + onShareButtonClick: () => void; + }; + isLoading?: boolean; + maxSize?: 'small' | 'big'; +} diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarNotFoundContent/ActionSidebarNotFoundContent.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarNotFoundContent/ActionSidebarNotFoundContent.tsx new file mode 100644 index 00000000000..5e4b92ab454 --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarNotFoundContent/ActionSidebarNotFoundContent.tsx @@ -0,0 +1,81 @@ +import React, { type FC } from 'react'; +import { Link } from 'react-router-dom'; + +import { COLONY_ACTIVITY_ROUTE, TX_SEARCH_PARAM } from '~routes'; +import { formatText } from '~utils/intl.ts'; +import { removeQueryParamFromUrl } from '~utils/urls.ts'; +import FourOFourMessage from '~v5/common/FourOFourMessage/FourOFourMessage.tsx'; +import Button from '~v5/shared/Button/Button.tsx'; +import ButtonLink from '~v5/shared/Button/ButtonLink.tsx'; + +import { type ActionSidebarNotFoundContentProps } from './types.ts'; + +const ActionSidebarNotFoundContent: FC = ({ + toggleActionSidebarOff, + startPollingForAction, + isInvalidTransactionHash, +}) => { + return ( +
+ + {!isInvalidTransactionHash && ( + + {formatText({ + id: 'actionSidebar.fourOfour.activityPageLink', + })} + + )} + + {formatText({ + id: 'actionSidebar.fourOfour.createNewAction', + })} + + + } + primaryLinkButton={ + isInvalidTransactionHash ? ( + + {formatText({ + id: 'actionSidebar.fourOfour.activityPageLink', + })} + + ) : ( + + ) + } + /> +
+ ); +}; + +export default ActionSidebarNotFoundContent; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarNotFoundContent/types.ts b/src/components/v5/common/ActionSidebar/partials/ActionSidebarNotFoundContent/types.ts new file mode 100644 index 00000000000..1e88b1e7cba --- /dev/null +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarNotFoundContent/types.ts @@ -0,0 +1,5 @@ +export interface ActionSidebarNotFoundContentProps { + toggleActionSidebarOff: () => void; + startPollingForAction: () => void; + isInvalidTransactionHash?: boolean; +} diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx index aebe43b3a1b..322947b929a 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx @@ -1,6 +1,11 @@ import React, { type FC } from 'react'; +import LoadingSkeleton from '~common/LoadingSkeleton/LoadingSkeleton.tsx'; +import { useActionStatusContext } from '~context/ActionStatusContext/ActionStatusContext.ts'; import { ColonyActionType } from '~gql'; +import { type ExpenditureActionStatus } from '~types/expenditures.ts'; +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; +import { type MotionState } from '~utils/colonyMotions.ts'; import { formatText } from '~utils/intl.ts'; import PillsBase from '~v5/common/Pills/PillsBase.tsx'; @@ -8,47 +13,56 @@ import ExpenditureActionStatusBadge from '../ExpenditureActionStatusBadge/Expend import MotionOutcomeBadge from '../MotionOutcomeBadge/MotionOutcomeBadge.tsx'; import StreamingPaymentStatusPill from '../StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx'; -import { type ActionSidebarStatusPillProps } from './types.ts'; - -const ActionSidebarStatusPill: FC = ({ - action, - isMotion, - motionState, - expenditure, - streamingPaymentStatus, - isMultiSig, -}) => { - if (expenditure && action?.type === ColonyActionType.CreateExpenditure) { - return ( - - ); - } +const ActionSidebarStatusPill: FC = () => { + const { actionType, actionStatus, isLoading } = useActionStatusContext(); - if ( - streamingPaymentStatus && - action?.type === ColonyActionType.CreateStreamingPayment - ) { - return ; + if (!actionType || !actionStatus) { + return null; } - if (isMotion || isMultiSig) { - if (!motionState) { - return null; + const getStatuPill = () => { + switch (actionType) { + case ColonyActionType.CreateExpenditure: { + return ( + + ); + } + case ColonyActionType.CreateStreamingPayment: { + return ( + + ); + } + default: { + if (actionType.endsWith('Motion') || actionType.endsWith('Multisig')) { + return ( + + ); + } + + return ( + + {formatText({ id: 'action.passed' })} + + ); + } } - return ; - } + }; - return action ? ( - - {formatText({ id: 'action.passed' })} - - ) : null; + {getStatuPill()} + + ); }; export default ActionSidebarStatusPill; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/types.ts b/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/types.ts deleted file mode 100644 index 5a4f4db9d6c..00000000000 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/types.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { type ColonyAction, type Expenditure } from '~types/graphql.ts'; -import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; -import { type MotionState } from '~utils/colonyMotions.ts'; - -export interface ActionSidebarStatusPillProps { - action: ColonyAction | null | undefined; - motionState: MotionState | undefined; - expenditure: Expenditure | null | undefined; - streamingPaymentStatus: StreamingPaymentStatus | undefined; - isMotion: boolean; - isMultiSig: boolean; -} diff --git a/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx b/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx index 92a78a74d64..084ecbc5993 100644 --- a/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx +++ b/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx @@ -3,15 +3,12 @@ import React, { type FC } from 'react'; import { defineMessages } from 'react-intl'; import Tooltip from '~shared/Extensions/Tooltip/index.ts'; +import { ExpenditureActionStatus } from '~types/expenditures.ts'; import { formatText } from '~utils/intl.ts'; import PillsBase from '~v5/common/Pills/PillsBase.tsx'; import { EXPENDITURE_STATUS_TO_CLASSNAME_MAP } from './consts.ts'; -import { useExpenditureActionStatus } from './hooks.ts'; -import { - ExpenditureActionStatus, - type ExpenditureActionStatusBadgeProps, -} from './types.ts'; +import { type ExpenditureActionStatusBadgeProps } from './types.ts'; const displayName = 'v5.common.ActionSidebar.partials.ExpenditureActionStatusBadge'; @@ -19,7 +16,7 @@ const displayName = const MSG = defineMessages({ badgeText: { id: `${displayName}.badgeText`, - defaultMessage: `{activeStatus, select, + defaultMessage: `{status, select, ${ExpenditureActionStatus.Funding} {Funding} ${ExpenditureActionStatus.Cancel} {Cancel} ${ExpenditureActionStatus.Changes} {Changes} @@ -33,7 +30,7 @@ const MSG = defineMessages({ }, tooltipText: { id: `${displayName}.tooltipText`, - defaultMessage: `{activeStatus, select, + defaultMessage: `{status, select, ${ExpenditureActionStatus.Funding} {There is an active funding request for this payment.} ${ExpenditureActionStatus.Review} { Payment is currently in review. The payment creator can make changes freely until details are confirmed. @@ -51,25 +48,19 @@ const MSG = defineMessages({ }); const ExpenditureActionStatusBadge: FC = ({ - expenditure, + status, className, - withAdditionalStatuses, }) => { - const activeStatus = useExpenditureActionStatus( - expenditure, - withAdditionalStatuses, - ); - const pill = ( - {formatText(MSG.badgeText, { activeStatus })} + {formatText(MSG.badgeText, { status })} ); @@ -78,11 +69,8 @@ const ExpenditureActionStatusBadge: FC = ({ ExpenditureActionStatus.Review, ExpenditureActionStatus.Changes, ExpenditureActionStatus.Edit, - ].includes(activeStatus) ? ( - + ].includes(status) ? ( + {pill} ) : ( diff --git a/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/consts.ts b/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/consts.ts index 462a93606be..cde2f9bbcb2 100644 --- a/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/consts.ts +++ b/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/consts.ts @@ -1,7 +1,6 @@ +import { ExpenditureActionStatus } from '~types/expenditures.ts'; import { tw } from '~utils/css/index.ts'; -import { ExpenditureActionStatus } from './types.ts'; - export const EXPENDITURE_STATUS_TO_CLASSNAME_MAP: Record< ExpenditureActionStatus, string diff --git a/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/types.ts b/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/types.ts index d2de35fe417..bb72fbd561a 100644 --- a/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/types.ts +++ b/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/types.ts @@ -1,19 +1,6 @@ -import { type Expenditure } from '~types/graphql.ts'; - -export enum ExpenditureActionStatus { - Review = 'Review', - Funding = 'Funding', - Release = 'Release', - Changes = 'Changes', - Cancel = 'Cancel', - Canceled = 'Canceled', - Payable = 'Payable', - Passed = 'Passed', - Edit = 'Edit', -} +import { type ExpenditureActionStatus } from '~types/expenditures.ts'; export interface ExpenditureActionStatusBadgeProps { - expenditure: Expenditure; + status: ExpenditureActionStatus; className?: string; - withAdditionalStatuses?: boolean; } diff --git a/src/components/v5/common/CompletedAction/CompletedAction.tsx b/src/components/v5/common/CompletedAction/CompletedAction.tsx index a959b466af8..81e54c97cfc 100644 --- a/src/components/v5/common/CompletedAction/CompletedAction.tsx +++ b/src/components/v5/common/CompletedAction/CompletedAction.tsx @@ -6,7 +6,6 @@ import { ColonyActionType } from '~gql'; import { ExtendedColonyActionType } from '~types/actions.ts'; import { getExtendedActionType } from '~utils/colonyActions.ts'; -import { type UseGetStreamingPaymentDataReturnType } from '../ActionSidebar/hooks/useGetStreamingPaymentData.ts'; import PermissionSidebar from '../ActionSidebar/partials/ActionSidebarContent/partials/PermissionSidebar.tsx'; import Motions from '../ActionSidebar/partials/Motions/index.ts'; import MultiSigSidebar from '../ActionSidebar/partials/MultiSigSidebar/MultiSigSidebar.tsx'; @@ -120,12 +119,7 @@ const CompletedAction = ({ action }: ICompletedAction) => { case ExtendedColonyActionType.SplitPayment: return ; case ColonyActionType.CreateStreamingPayment: - return ( - - ); + return ; default: console.warn('Unsupported action display', action); return
Not implemented yet
; @@ -176,12 +170,7 @@ const CompletedAction = ({ action }: ICompletedAction) => { case ExtendedColonyActionType.SplitPayment: return ; case ColonyActionType.CreateStreamingPayment: - return ( - - ); + return ; default: return ; } diff --git a/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/CancelModal.tsx b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/CancelModal.tsx index e093e68ac4b..bcc977908c6 100644 --- a/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/CancelModal.tsx +++ b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/CancelModal.tsx @@ -2,6 +2,7 @@ import { Prohibit, SpinnerGap } from '@phosphor-icons/react'; import React, { useState, type FC } from 'react'; import { toast } from 'react-toastify'; +import { getRole } from '~constants/permissions.ts'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; import { usePaymentBuilderContext } from '~context/PaymentBuilderContext/PaymentBuilderContext.ts'; @@ -10,6 +11,8 @@ import { ActionTypes } from '~redux'; import { type CancelExpenditurePayload } from '~redux/types/actions/expenditures.ts'; import Toast from '~shared/Extensions/Toast/index.ts'; import { Form } from '~shared/Fields/index.ts'; +import { getHighestTierRoleForUser } from '~transformers'; +import { extractColonyRoles } from '~utils/colonyRoles.ts'; import { formatText } from '~utils/intl.ts'; import IconButton from '~v5/shared/Button/IconButton.tsx'; import Button, { ActionButton } from '~v5/shared/Button/index.ts'; @@ -19,12 +22,9 @@ import Modal from '~v5/shared/Modal/index.ts'; import DecisionMethodSelect from '../DecisionMethodSelect/DecisionMethodSelect.tsx'; import { ExpenditureStep } from '../PaymentBuilderWidget/types.ts'; -import { - cancelDecisionMethodDescriptions, - cancelDecisionMethodItems, - validationSchema, -} from './consts.ts'; +import { cancelDecisionMethodItems, validationSchema } from './consts.ts'; import { type CancelModalProps } from './types.ts'; +import { getCancelDecisionMethodDescriptions } from './utils.ts'; const CancelModal: FC = ({ isOpen, @@ -75,6 +75,8 @@ const CancelModal: FC = ({ expenditure.lockingActions?.items && expenditure.lockingActions.items.length > 0; + const colonyRoles = extractColonyRoles(colony.roles); + return ( = ({ })}

- {formatText({ - id: isExpenditureLocked - ? 'cancelModal.locked.description' - : 'cancelModal.description', - })} + {formatText( + { + id: isExpenditureLocked + ? 'cancelModal.locked.description' + : 'cancelModal.description', + }, + { role: 'Payer' }, + )}

{isExpenditureLocked ? (
= ({ > {({ watch }) => { const method = watch('decisionMethod'); + const highestTierRole = getHighestTierRoleForUser( + colonyRoles, + user?.walletAddress || '', + ); + + const highestTierRoleMeta = highestTierRole + ? getRole(highestTierRole) + : undefined; + + const cancelDecisionMethodDescriptions = + getCancelDecisionMethodDescriptions( + highestTierRoleMeta?.name || formatText({ id: 'role.mod' }), + ); return ( <> diff --git a/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/consts.ts b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/consts.ts index dd7b42e6ed8..cbb97b2dc2e 100644 --- a/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/consts.ts +++ b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/consts.ts @@ -11,12 +11,6 @@ export const cancelDecisionMethodItems: SelectBaseOption[] = [ }, ]; -export const cancelDecisionMethodDescriptions = { - [DecisionMethod.Permissions]: formatText({ - id: 'cancelModal.permissionsDescription', - }), -}; - export const validationSchema = object() .shape({ decisionMethod: object().shape({ diff --git a/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/utils.ts b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/utils.ts new file mode 100644 index 00000000000..55f5790dc43 --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/CancelModal/utils.ts @@ -0,0 +1,11 @@ +import { DecisionMethod } from '~types/actions.ts'; +import { formatText } from '~utils/intl.ts'; + +export const getCancelDecisionMethodDescriptions = (role: string) => ({ + [DecisionMethod.Permissions]: formatText( + { + id: 'cancelModal.permissionsDescription', + }, + { role }, + ), +}); diff --git a/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/PaymentBuilderWidget/utils.ts b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/PaymentBuilderWidget/utils.ts index a6918267e66..4bea621e627 100644 --- a/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/PaymentBuilderWidget/utils.ts +++ b/src/components/v5/common/CompletedAction/partials/PaymentBuilder/partials/PaymentBuilderWidget/utils.ts @@ -6,10 +6,6 @@ import { MotionState } from '~utils/colonyMotions.ts'; import { ExpenditureStep } from './types.ts'; -/** - * Returns a boolean indicating whether the expenditure is fully funded, - * i.e. the balance of each token is greater than or equal to the sum of its payouts - */ export const isExpenditureFullyFunded = (expenditure?: Expenditure | null) => { if (!expenditure) { return false; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 1f2e4addeb1..177d8024fde 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -164,7 +164,6 @@ const StreamingPayment: FC = ({ action }) => { amount || '1', selectedToken?.decimals, ); - const { endCondition } = streamingPaymentMetadata || {}; const selectedTeam = findDomainByNativeId(nativeDomainId, colony); const motionDomain = motionData?.motionDomain ?? null; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx index 5e873a3ec93..a531347002c 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/AvailableToClaimCounter.tsx @@ -2,7 +2,7 @@ import { WarningCircle } from '@phosphor-icons/react'; import clsx from 'clsx'; import Decimal from 'decimal.js'; import { AnimatePresence, motion } from 'framer-motion'; -import React, { useEffect, type FC } from 'react'; +import React, { useEffect, type FC, useState } from 'react'; import Numeral from '~shared/Numeral/Numeral.tsx'; import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; @@ -15,16 +15,26 @@ const displayName = const AvailableToClaimCounter: FC = ({ hasEnoughFunds, status, - onTimeEnd, amountAvailableToClaim, decimals, tokenSymbol, getAmounts, ratePerSecond, + currentTime: currentTimeProp, }) => { + const [currentTime, setCurrentTime] = useState(-1); + useEffect(() => { const timer = setInterval(() => { - getAmounts(); + if ( + [ + StreamingPaymentStatus.Active, + StreamingPaymentStatus.NotStarted, + ].includes(status) + ) { + getAmounts(currentTime); + setCurrentTime((oldTime) => oldTime + 1); + } }, 1000); if ( @@ -33,14 +43,17 @@ const AvailableToClaimCounter: FC = ({ StreamingPaymentStatus.NotStarted, ].includes(status) ) { - onTimeEnd(); clearInterval(timer); } return () => { clearInterval(timer); }; - }, [getAmounts, onTimeEnd, status]); + }, [currentTime, getAmounts, status]); + + useEffect(() => { + setCurrentTime(currentTimeProp); + }, [currentTimeProp]); const formattedRate = new Decimal(ratePerSecond) .div(10 ** decimals) @@ -103,7 +116,10 @@ const AvailableToClaimCounter: FC = ({ value={amountAvailableToClaim} decimals={decimals} suffix={` ${tokenSymbol}`} - className="text-sm text-gray-900" + className={clsx('text-sm', { + 'text-gray-900': hasEnoughFunds, + 'font-medium text-negative-400': !hasEnoughFunds, + })} /> ); }; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts index ca13193faed..a1ae7945c4e 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/AvailableToClaimCounter/types.ts @@ -3,10 +3,10 @@ import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; export interface AvailableToClaimCounterProps { hasEnoughFunds: boolean; status: StreamingPaymentStatus; - onTimeEnd: () => void; amountAvailableToClaim: string; decimals: number; tokenSymbol: string; - getAmounts: () => void; ratePerSecond: string; + getAmounts: (currentTime: number) => void; + currentTime: number; } diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/CancelModal.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/CancelModal.tsx new file mode 100644 index 00000000000..3f976b227fd --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/CancelModal.tsx @@ -0,0 +1,142 @@ +import { Prohibit } from '@phosphor-icons/react'; +import React, { type FC } from 'react'; + +import { getRole } from '~constants/permissions.ts'; +import { useAppContext } from '~context/AppContext/AppContext.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { ButtonWithLoader } from '~frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsHeader/ButtonWithLoader.tsx'; +import useAsyncFunction from '~hooks/useAsyncFunction.ts'; +import { ActionTypes } from '~redux'; +import { type CancelStreamingPaymentPayload } from '~redux/types/actions/expenditures.ts'; +import { Form } from '~shared/Fields/index.ts'; +import { getHighestTierRoleForUser } from '~transformers'; +import { extractColonyRoles } from '~utils/colonyRoles.ts'; +import { formatText } from '~utils/intl.ts'; +import DecisionMethodSelect from '~v5/common/CompletedAction/partials/PaymentBuilder/partials/DecisionMethodSelect/DecisionMethodSelect.tsx'; +import Button from '~v5/shared/Button/index.ts'; +import Modal from '~v5/shared/Modal/index.ts'; + +import { cancelDecisionMethodItems, validationSchema } from './consts.ts'; +import { type CancelModalProps } from './types.ts'; +import { getCancelDecisionMethodDescriptions } from './utils.ts'; + +const CancelModal: FC = ({ + isOpen, + onClose, + streamingPayment, + onSuccess, + ...rest +}) => { + const { user } = useAppContext(); + const { colony } = useColonyContext(); + + const cancel = useAsyncFunction({ + submit: ActionTypes.STREAMING_PAYMENT_CANCEL, + error: ActionTypes.STREAMING_PAYMENT_CANCEL_ERROR, + success: ActionTypes.STREAMING_PAYMENT_CANCEL_SUCCESS, + }); + + const handleCancelStreamingPayment = async ({ + shouldWaive, + }: Pick) => { + try { + if (!streamingPayment) { + return; + } + + const payload: CancelStreamingPaymentPayload = { + colonyAddress: colony.colonyAddress, + streamingPayment, + userAddress: user?.walletAddress ?? '', + shouldWaive, + }; + + await cancel(payload); + onSuccess(); + onClose(); + } catch (err) { + onClose(); + } + }; + + const colonyRoles = extractColonyRoles(colony.roles); + + return ( + +
+ {formatText({ + id: 'cancelModal.locked.title', + })} +
+

+ {formatText( + { + id: 'cancelModal.locked.description', + }, + { + role: formatText({ id: 'role.mod' }), + }, + )} +

+ handleCancelStreamingPayment({ shouldWaive: false })} + validationSchema={validationSchema} + defaultValues={{ decisionMethod: {} }} + > + {({ watch, formState: { isSubmitting } }) => { + const method = watch('decisionMethod'); + const highestTierRole = getHighestTierRoleForUser( + colonyRoles, + user?.walletAddress || '', + ); + + const highestTierRoleMeta = highestTierRole + ? getRole(highestTierRole) + : undefined; + + const cancelDecisionMethodDescriptions = + getCancelDecisionMethodDescriptions( + highestTierRoleMeta?.name || formatText({ id: 'role.mod' }), + ); + + return ( + <> +
+ + {method && method.value && ( +
+

+ + {formatText({ id: 'cancelModal.note' })} + + {cancelDecisionMethodDescriptions[method.value]} +

+
+ )} +
+
+ + + {formatText({ id: 'cancelModal.confirmCancellation' })} + +
+ + ); + }} + +
+ ); +}; + +export default CancelModal; diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/consts.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/consts.ts new file mode 100644 index 00000000000..cbb97b2dc2e --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/consts.ts @@ -0,0 +1,20 @@ +import { object, string } from 'yup'; + +import { DecisionMethod } from '~types/actions.ts'; +import { formatText } from '~utils/intl.ts'; +import { type SelectBaseOption } from '~v5/common/Fields/Select/types.ts'; + +export const cancelDecisionMethodItems: SelectBaseOption[] = [ + { + label: formatText({ id: 'decisionMethod.permissions' }), + value: DecisionMethod.Permissions, + }, +]; + +export const validationSchema = object() + .shape({ + decisionMethod: object().shape({ + value: string().required(), + }), + }) + .defined(); diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/types.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/types.ts new file mode 100644 index 00000000000..b31667d8f85 --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/types.ts @@ -0,0 +1,7 @@ +import { type StreamingPayment } from '~types/graphql.ts'; +import { type ModalProps } from '~v5/shared/Modal/types.ts'; + +export interface CancelModalProps extends ModalProps { + streamingPayment: StreamingPayment; + onSuccess: () => void; +} diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/utils.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/utils.ts new file mode 100644 index 00000000000..55f5790dc43 --- /dev/null +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/CancelModal/utils.ts @@ -0,0 +1,11 @@ +import { DecisionMethod } from '~types/actions.ts'; +import { formatText } from '~utils/intl.ts'; + +export const getCancelDecisionMethodDescriptions = (role: string) => ({ + [DecisionMethod.Permissions]: formatText( + { + id: 'cancelModal.permissionsDescription', + }, + { role }, + ), +}); diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx index d02ce0b8a52..a2f6f870db1 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx @@ -1,24 +1,31 @@ import { Id } from '@colony/colony-js'; import clsx from 'clsx'; import { BigNumber } from 'ethers'; -import React, { type FC, useState, useEffect } from 'react'; +import React, { type FC, useState, useEffect, useMemo } from 'react'; import { defineMessages } from 'react-intl'; import LoadingSkeleton from '~common/LoadingSkeleton/LoadingSkeleton.tsx'; import { Action } from '~constants/actions.ts'; import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; +import { useActionStatusContext } from '~context/ActionStatusContext/ActionStatusContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { ButtonWithLoader } from '~frame/Extensions/pages/ExtensionDetailsPage/partials/ExtensionDetailsHeader/ButtonWithLoader.tsx'; import useAsyncFunction from '~hooks/useAsyncFunction.ts'; import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; import useEnabledExtensions from '~hooks/useEnabledExtensions.ts'; import { ActionTypes } from '~redux'; import { type ClaimStreamingPaymentPayload } from '~redux/sagas/expenditures/claimStreamingPayment.ts'; import Numeral from '~shared/Numeral/Numeral.tsx'; +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; import { formatText } from '~utils/intl.ts'; +import { + getStreamingPaymentAmountsLeft, + getStreamingPaymentStatus, +} from '~utils/streamingPayments.ts'; import { getSelectedToken } from '~utils/tokens.ts'; import { ACTION_TYPE_FIELD_NAME } from '~v5/common/ActionSidebar/consts.ts'; -import StreamingPaymentStatusPill from '~v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx'; -import Button from '~v5/shared/Button/Button.tsx'; +import { useGetStreamingPaymentData } from '~v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts'; +import ActionSidebarStatusPill from '~v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx'; import MenuWithSections from '~v5/shared/MenuWithSections/MenuWithSections.tsx'; import AvailableToClaimCounter from '../AvailableToClaimCounter/AvailableToClaimCounter.tsx'; @@ -59,16 +66,18 @@ const MSG = defineMessages({ const StreamingPaymentWidget: FC = ({ action, - streamingPayment, }) => { const { - streamingPaymentData, - refetchStreamingPayment, loadingStreamingPayment, - amounts, - paymentStatus, - updateAmountsAndStatus, - } = streamingPayment; + refetchStreamingPayment, + streamingPaymentData, + } = useGetStreamingPaymentData(action.streamingPaymentId); + const { + actionStatus, + setActionStatus, + isLoading: isLoadingStatus, + } = useActionStatusContext(); + const { colony } = useColonyContext(); const { streamingPaymentsAddress } = useEnabledExtensions(); const { currentBlockTime: blockTime, fetchCurrentBlockTime } = @@ -77,22 +86,45 @@ const StreamingPaymentWidget: FC = ({ actionSidebarToggle: [, { toggleOn: toggleActionSidebarOn }], } = useActionSidebarContext(); const [isLoading, setIsLoading] = useState(false); + const [amountClaimedToDate, setAmountClaimedToDate] = useState('0'); + const [amountAvailableToClaim, setAmountAvailableToClaim] = useState('0'); + + const currentTime = useMemo( + () => Math.floor(blockTime ?? Date.now() / 1000), + [blockTime], + ); useEffect(() => { - if (streamingPaymentData && !loadingStreamingPayment) { - updateAmountsAndStatus( - streamingPaymentData, - Math.floor(blockTime ?? Date.now() / 1000), - !!action.isMotion, - ); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [loadingStreamingPayment, streamingPaymentData]); + setActionStatus( + getStreamingPaymentStatus({ + streamingPayment: streamingPaymentData, + currentTimestamp: currentTime, + }), + ); + + return () => { + setActionStatus(null); + }; + }, [currentTime, setActionStatus, streamingPaymentData]); + + useEffect(() => { + const { + amountClaimedToDate: amountClaimedToDateValue, + amountAvailableToClaim: amountAvailableToClaimValue, + } = getStreamingPaymentAmountsLeft(streamingPaymentData, currentTime); + + setAmountClaimedToDate(amountClaimedToDateValue); + setAmountAvailableToClaim(amountAvailableToClaimValue); + }, [currentTime, setActionStatus, streamingPaymentData]); + + useEffect(() => { + fetchCurrentBlockTime(); + }, [actionStatus, fetchCurrentBlockTime]); const checkIfHasEnoughFunds = useHasEnoughTokensToClaim( streamingPaymentData?.nativeDomainId || Id.RootDomain, streamingPaymentData?.tokenAddress || '', - amounts.amountAvailableToClaim, + amountAvailableToClaim, ); const [hasEnoughFunds, setHasEnoughFunds] = useState(checkIfHasEnoughFunds()); @@ -130,8 +162,8 @@ const StreamingPaymentWidget: FC = ({ await claim(claimPayload); - refetchStreamingPayment(); - fetchCurrentBlockTime(); + await fetchCurrentBlockTime(); + await refetchStreamingPayment(); } catch (error) { console.error(error); } finally { @@ -139,6 +171,12 @@ const StreamingPaymentWidget: FC = ({ } }; + useEffect(() => { + if (!loadingStreamingPayment) { + fetchCurrentBlockTime(); + } + }, [fetchCurrentBlockTime, loadingStreamingPayment]); + if (!streamingPaymentData) { return null; } @@ -193,10 +231,10 @@ const StreamingPaymentWidget: FC = ({

{formatText(MSG.streamingStatus)}

- +
@@ -204,11 +242,13 @@ const StreamingPaymentWidget: FC = ({ {formatText(MSG.paidToDate)} = ({ {formatText(MSG.availableToClaim)} - updateAmountsAndStatus( + getAmounts={(currentTimeValue) => { + const { + amountAvailableToClaim: amountAvailableToClaimValue, + } = getStreamingPaymentAmountsLeft( streamingPaymentData, - Math.floor(blockTime ?? Date.now() / 1000), - !!action.isMotion, - ) - } + currentTimeValue, + ); + + const streamingPaymentStatus = + getStreamingPaymentStatus({ + streamingPayment: streamingPaymentData, + currentTimestamp: currentTimeValue, + }); + + if (streamingPaymentStatus !== actionStatus) { + setActionStatus(streamingPaymentStatus); + } + + setAmountAvailableToClaim(amountAvailableToClaimValue); + }} ratePerSecond={ratePerSecond} + currentTime={currentTime} />
- +
), diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/types.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/types.ts index 77b5c5497dc..cb5589b5d4a 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/types.ts +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/types.ts @@ -1,10 +1,5 @@ import { type ColonyAction } from '~types/graphql.ts'; -import { type UseGetStreamingPaymentDataReturnType } from '~v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts'; export interface StreamingPaymentWidgetProps { action: ColonyAction; - streamingPayment: Omit< - UseGetStreamingPaymentDataReturnType, - 'startPolling' | 'stopPolling' - >; } diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/types.ts b/src/components/v5/common/CompletedAction/partials/StreamingPayment/types.ts index 4c4bb82c6ac..0e46390c167 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/types.ts +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/types.ts @@ -1,10 +1,5 @@ import { type ColonyAction } from '~types/graphql.ts'; -import { type UseGetStreamingPaymentDataReturnType } from '~v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts'; export interface StreamingPaymentProps { action: ColonyAction; - streamingPayment: Omit< - UseGetStreamingPaymentDataReturnType, - 'startPolling' | 'stopPolling' - >; } diff --git a/src/context/ActionStatusContext/ActionStatusContext.ts b/src/context/ActionStatusContext/ActionStatusContext.ts new file mode 100644 index 00000000000..288981186d7 --- /dev/null +++ b/src/context/ActionStatusContext/ActionStatusContext.ts @@ -0,0 +1,31 @@ +import { createContext, useContext } from 'react'; + +import { type ColonyActionType } from '~gql'; +import { type ExpenditureActionStatus } from '~types/expenditures.ts'; +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; +import { type MotionState } from '~utils/colonyMotions.ts'; + +export type ActionStatus = + | ExpenditureActionStatus + | StreamingPaymentStatus + | MotionState + | null + | undefined; + +export interface ActionStatusContextValue { + actionType: ColonyActionType | null | undefined; + actionStatus: ActionStatus; + setActionStatus: (status: ActionStatus) => void; + isLoading: boolean; + setIsLoading: (isLoading: boolean) => void; +} + +export const ActionStatusContext = createContext({ + actionStatus: null, + setActionStatus: () => {}, + actionType: null, + isLoading: false, + setIsLoading: () => {}, +}); + +export const useActionStatusContext = () => useContext(ActionStatusContext); diff --git a/src/context/ActionStatusContext/ActionStatusContextProvider.tsx b/src/context/ActionStatusContext/ActionStatusContextProvider.tsx new file mode 100644 index 00000000000..051d4a69f78 --- /dev/null +++ b/src/context/ActionStatusContext/ActionStatusContextProvider.tsx @@ -0,0 +1,44 @@ +import React, { + useMemo, + type FC, + type PropsWithChildren, + useState, +} from 'react'; + +import { type ColonyActionType } from '~gql'; +import { type MotionState } from '~utils/colonyMotions.ts'; + +import { + type ActionStatus, + ActionStatusContext, + type ActionStatusContextValue, +} from './ActionStatusContext.ts'; + +const ActionStatusContextProvider: FC< + PropsWithChildren<{ + actionType: ColonyActionType | null | undefined; + motionState: MotionState | undefined; + }> +> = ({ actionType, motionState, children }) => { + const [actionStatus, setActionStatus] = useState(motionState); + const [isLoading, setIsLoading] = useState(false); + + const value = useMemo( + () => ({ + actionStatus, + setActionStatus, + actionType, + isLoading, + setIsLoading, + }), + [actionStatus, actionType, isLoading], + ); + + return ( + + {children} + + ); +}; + +export default ActionStatusContextProvider; diff --git a/src/hooks/useActivityFeed/helpers.ts b/src/hooks/useActivityFeed/helpers.ts index 0a8d997d273..344de9002af 100644 --- a/src/hooks/useActivityFeed/helpers.ts +++ b/src/hooks/useActivityFeed/helpers.ts @@ -120,7 +120,11 @@ const ACTION_TYPES_TO_HIDE = [ ColonyActionType.EditExpenditure, ColonyActionType.EditExpenditureMotion, ColonyActionType.ReleaseStagedPaymentsMotion, - ColonyActionType.ReleaseStagedPayments, + ColonyActionType.CancelAndWaiveStreamingPayment, + ColonyActionType.CancelStreamingPayment, + ColonyActionType.CancelStreamingPaymentMotion, + ColonyActionType.EditStreamingPayment, + ColonyActionType.EditStreamingPaymentMotion, ]; export const filterByActionTypes = ( diff --git a/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/hooks.ts b/src/hooks/useExpenditureActionStatus.ts similarity index 90% rename from src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/hooks.ts rename to src/hooks/useExpenditureActionStatus.ts index 9b8f1700a92..8a1f6557e77 100644 --- a/src/components/v5/common/ActionSidebar/partials/ExpenditureActionStatusBadge/hooks.ts +++ b/src/hooks/useExpenditureActionStatus.ts @@ -1,10 +1,9 @@ import { useMemo } from 'react'; import { ExpenditureStatus } from '~gql'; +import { ExpenditureActionStatus } from '~types/expenditures.ts'; import { type Expenditure } from '~types/graphql.ts'; -import { isExpenditureFullyFunded } from '~v5/common/CompletedAction/partials/PaymentBuilder/partials/PaymentBuilderWidget/utils.ts'; - -import { ExpenditureActionStatus } from './types.ts'; +import { isExpenditureFullyFunded } from '~utils/expenditures.ts'; export const useExpenditureActionStatus = ( expenditure: Expenditure | null | undefined, diff --git a/src/i18n/en.json b/src/i18n/en.json index eda03dd4c9a..0a4fda24c97 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -219,6 +219,8 @@ "transaction.group.approveExit.description": "Approve Exiting Recovery Mode", "transaction.group.buyTokens.title": "Buy Tokens", "transaction.group.buyTokens.description": "Buy Tokens", + "transaction.group.cancelStreamingPayment.title": "Cancel Streaming Payment", + "transaction.group.cancelStreamingPayment.description": "Cancel Streaming Payment", "transaction.group.cancelDraftExpenditure.title": "Cancel Draft Expenditure", "transaction.group.cancelDraftExpenditure.description": "Cancel Draft Expenditure", "transaction.group.cancelStakedExpenditure.title": "Cancel Staked Expenditure", @@ -395,6 +397,10 @@ "transaction.OneTxPaymentClient.makePaymentFundedFromDomain.title": "Expenditure Payment", + "transaction.StreamingPaymentsClient.cancel.title": "Cancel Streaming Payment", + "transaction.StreamingPaymentsClient.cancelAndPunish.title": "Cancel Streaming Payment", + "transaction.StreamingPaymentsClient.cancelAndReclaimStake.title": "Cancel Streaming Payment", + "transaction.StakedExpenditureClient.cancelAndPunish.title": "Cancel Staked Expenditure", "transaction.StakedExpenditureClient.cancelAndReclaimStake.title": "Cancel and Reclaim Stake", "transaction.StakedExpenditureClient.initialise.title": "Initialize Staked Expenditure Extension", @@ -1883,11 +1889,14 @@ "decisionMethodSelect.error": "A decision method is required", "cancelModal.title": "Cancel this payment", "cancelModal.locked.title": "Cancel the payment", - "cancelModal.description": "This action cannot be undone. You will not be penalized for canceling the payment, any stakes made will be returned.", - "cancelModal.locked.description": "To cancel, you will need to have Payer level or above permissions or use an available decision method.", - "cancelModal.permissionsDescription": "This will use your Payer permissions to immediately cancel the payment and either return or penalize the creators stake.", + "cancelModal.description": "This action cannot be undone and you will not be penalized for cancelling the payment.", + "cancelModal.locked.description": "To cancel, you will need to have {role} level or above permissions or use an available decision method.", + "cancelModal.permissionsDescription": "This will use your {role} permissions to immediately cancel the payment and either return or penalize the creators stake.", "cancelModal.note": "Note: ", - "cancelModal.submit": "Confirm cancelation", + "cancelModal.cancel": "Do not cancel payment", + "cancelModal.submit": "Yes, cancel payment", + "cancelModal.locked.submit": "Yes, cancel and return stake", + "cancelModal.confirmCancellation": "Confirm cancellation", "cancelModal.toast.title": "Payment cancelled", "cancelModal.toast.description": "Payment was successfully cancelled.", "finalizeModal.title": "Release payment", diff --git a/src/types/expenditures.ts b/src/types/expenditures.ts index 67766b210e9..bb1dbbd629b 100644 --- a/src/types/expenditures.ts +++ b/src/types/expenditures.ts @@ -18,3 +18,15 @@ export interface ExpenditureStageFieldValue { export interface ExpenditurePayoutWithSlotId extends ExpenditurePayout { slotId: number; } + +export enum ExpenditureActionStatus { + Review = 'Review', + Funding = 'Funding', + Release = 'Release', + Changes = 'Changes', + Cancel = 'Cancel', + Canceled = 'Canceled', + Payable = 'Payable', + Passed = 'Passed', + Edit = 'Edit', +} diff --git a/src/utils/expenditures.ts b/src/utils/expenditures.ts index 251972dec1c..30c4c19662e 100644 --- a/src/utils/expenditures.ts +++ b/src/utils/expenditures.ts @@ -86,3 +86,49 @@ export const getExpenditureCreatingActionId = ( ) => { return expenditure?.creatingActions?.items[0]?.transactionHash ?? ''; }; + +/** + * Returns a boolean indicating whether the expenditure is fully funded, + * i.e. the balance of each token is greater than or equal to the sum of its payouts + */ +export const isExpenditureFullyFunded = (expenditure?: Expenditure | null) => { + if (!expenditure) { + return false; + } + + if (!expenditure.balances) { + return false; + } + + const slotAmountsByToken = expenditure.slots.flatMap((slot) => { + const amounts: { tokenAddress: string; amount: BigNumber }[] = []; + + slot.payouts?.forEach((payout) => { + if (!payout.isClaimed) { + const existingAmountIndex = amounts.findIndex( + (item) => item.tokenAddress === payout.tokenAddress, + ); + if (existingAmountIndex !== -1) { + amounts[existingAmountIndex].amount = BigNumber.from( + amounts[existingAmountIndex].amount ?? 0, + ).add(payout.amount); + } else { + amounts.push({ + tokenAddress: payout.tokenAddress, + amount: BigNumber.from(payout.amount), + }); + } + } + }); + + return amounts; + }); + + return slotAmountsByToken.every(({ tokenAddress, amount }) => { + const tokenBalance = expenditure.balances?.find( + (balance) => balance.tokenAddress === tokenAddress, + ); + + return amount.lte(tokenBalance?.amount ?? 0); + }); +}; diff --git a/src/utils/streamingPayments.ts b/src/utils/streamingPayments.ts index 9770679b166..c95fbfb99b0 100644 --- a/src/utils/streamingPayments.ts +++ b/src/utils/streamingPayments.ts @@ -132,6 +132,13 @@ export const checkIfStreamingPaymentEnded = ({ }; } + if (isCancelled) { + return { + ended: true, + status: StreamingPaymentStatus.Cancelled, + }; + } + switch (endCondition) { case StreamingPaymentEndCondition.LimitReached: return { @@ -157,12 +164,10 @@ export const getStreamingPaymentStatus = ({ streamingPayment, currentTimestamp, isMotion, - amountAvailableToClaim, }: { streamingPayment: StreamingPayment | null | undefined; currentTimestamp: number; isMotion?: boolean; - amountAvailableToClaim: string; }) => { if (!streamingPayment) { return StreamingPaymentStatus.NotStarted; @@ -176,6 +181,12 @@ export const getStreamingPaymentStatus = ({ startTime, currentTimestamp, }); + + const { amountAvailableToClaim } = getStreamingPaymentAmountsLeft( + streamingPayment, + currentTimestamp, + ); + const { ended, status } = checkIfStreamingPaymentEnded({ amountAvailableToClaim, endCondition, @@ -185,7 +196,7 @@ export const getStreamingPaymentStatus = ({ currentTimestamp, }); - if (!started) { + if (!started && !isCancelled) { return StreamingPaymentStatus.NotStarted; } From 703f3a5a625bd14f25d19036e7a73a64a5a3f97c Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 26 Nov 2024 18:41:13 +0100 Subject: [PATCH 095/126] fix: rebase --- .../v5/common/ActionSidebar/hooks/useGetActionFormData.ts | 2 +- .../partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts b/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts index bd15bbbd477..5368d3f18c5 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useGetActionFormData.ts @@ -45,7 +45,7 @@ const useGetActionFormData = (transactionId: string | undefined) => { streamingPaymentData, loadingStreamingPayment, refetchStreamingPayment, - } = useGetStreamingPaymentData(action?.expenditureId); + } = useGetStreamingPaymentData(action?.streamingPaymentId); const defaultValues = useMemo(() => { if (!action) { diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx index a2f6f870db1..dba7ab8c267 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx @@ -71,7 +71,7 @@ const StreamingPaymentWidget: FC = ({ loadingStreamingPayment, refetchStreamingPayment, streamingPaymentData, - } = useGetStreamingPaymentData(action.streamingPaymentId); + } = useGetStreamingPaymentData(action?.streamingPaymentId); const { actionStatus, setActionStatus, From 9264fb9e800e5af6c78adba09b4105bb6df6f6dc Mon Sep 17 00:00:00 2001 From: strzelec Date: Thu, 9 Jan 2025 16:44:39 +0100 Subject: [PATCH 096/126] fix: navigate to relevant action --- src/components/v5/common/CompletedAction/CompletedAction.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/v5/common/CompletedAction/CompletedAction.tsx b/src/components/v5/common/CompletedAction/CompletedAction.tsx index 81e54c97cfc..5ffa7db3daa 100644 --- a/src/components/v5/common/CompletedAction/CompletedAction.tsx +++ b/src/components/v5/common/CompletedAction/CompletedAction.tsx @@ -120,6 +120,8 @@ const CompletedAction = ({ action }: ICompletedAction) => { return ; case ColonyActionType.CreateStreamingPayment: return ; + case ColonyActionType.CancelStreamingPayment: + return ; default: console.warn('Unsupported action display', action); return
Not implemented yet
; From 9e159f6110ae32f438dcf695cc1a0c291a26cb69 Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 20 Jan 2025 14:16:56 +0100 Subject: [PATCH 097/126] fix: rebase fixes --- .../api/colonycdapp/schema/schema.graphql | 2 +- .../ActionDescription/ActionDescription.tsx | 6 +- .../common/Extensions/UserHub/UserHub.tsx | 2 +- .../partials/BalanceTab/BalanceTab.styles.ts | 11 + .../partials/BalanceTab/BalanceTab.tsx | 53 +++-- .../partials/BalanceTab/partials/Balance.tsx | 199 ++++++++++++++++++ .../BalanceInfoRow/BalanceInfoRow.tsx | 159 -------------- .../partials/BalanceInfoRow/types.ts | 10 - .../PendingReputation/PendingReputation.tsx | 104 +++++++++ .../partials/PendingReputation/index.ts | 1 + .../partials/PendingReputation/utils.ts | 31 +++ .../BalanceTab/partials/TotalReputation.tsx | 95 +++++++++ .../UserHub/partials/BalanceTab/types.ts | 24 +++ .../v5/common/ActionSidebar/ActionSidebar.tsx | 7 +- .../StreamingPayment/StreamingPayment.tsx | 18 +- src/graphql/generated.ts | 11 - 16 files changed, 517 insertions(+), 216 deletions(-) create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx delete mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx diff --git a/amplify/backend/api/colonycdapp/schema/schema.graphql b/amplify/backend/api/colonycdapp/schema/schema.graphql index 0d1665d7b62..7b7da98120a 100644 --- a/amplify/backend/api/colonycdapp/schema/schema.graphql +++ b/amplify/backend/api/colonycdapp/schema/schema.graphql @@ -4482,4 +4482,4 @@ type UserStake @model { Only applicable for expenditure stakes, indicates if the creator's stake was forfeited when expenditure was cancelled """ isForfeited: Boolean -} +} \ No newline at end of file diff --git a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx index c89e315df66..18614eb5533 100644 --- a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx +++ b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx @@ -33,7 +33,6 @@ const ActionDescription: FC = ({ isMotion, motionData, motionState, - expenditureId, recipientAddress, } = action; @@ -42,8 +41,9 @@ const ActionDescription: FC = ({ true, ); - const { expenditure, loadingExpenditure } = - useGetExpenditureData(expenditureId); + const { expenditure, loadingExpenditure } = useGetExpenditureData( + action.streamingPaymentId, + ); const { streamingPaymentData, loadingStreamingPayment } = useGetStreamingPaymentData(action?.streamingPaymentId); diff --git a/src/components/common/Extensions/UserHub/UserHub.tsx b/src/components/common/Extensions/UserHub/UserHub.tsx index d73b14e5dfe..bcfa4658f75 100644 --- a/src/components/common/Extensions/UserHub/UserHub.tsx +++ b/src/components/common/Extensions/UserHub/UserHub.tsx @@ -13,13 +13,13 @@ import NotificationsEnabledWrapper from '~v5/common/NotificationsEnabledWrapper/ import TitleLabel from '~v5/shared/TitleLabel/index.ts'; import { tabList } from './consts.ts'; +import BalanceTab from './partials/BalanceTab/BalanceTab.tsx'; import CryptoToFiatTab from './partials/CryptoToFiatTab/CryptoToFiatTab.tsx'; import NotificationsTab from './partials/NotificationsTab/NotificationsTab.tsx'; import StakesTab from './partials/StakesTab/index.ts'; import TransactionsTab from './partials/TransactionsTab/index.ts'; import UnreadNotifications from './partials/UnreadNotifications.tsx'; import { UserHubTab } from './types.ts'; -import BalanceTab from './partials/BalanceTab/BalanceTab.tsx'; // @BETA: Disabled for now // import { COLONY_HOME_ROUTE } from '~routes'; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts new file mode 100644 index 00000000000..dd4640e5a0f --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts @@ -0,0 +1,11 @@ +import { tw } from '~utils/css/index.ts'; + +const balanceTabClasses = { + rowName: tw`min-w-[2.875rem] text-md`, + row: tw`flex justify-between font-medium`, + numeral: tw`ml-1 text-sm font-medium`, + icon: tw`mr-1 w-[0.875rem] text-blue-400`, + reputationValue: tw`mt-px text-blue-400`, +}; + +export default balanceTabClasses; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx index e0e3f5d851a..754cf0f8749 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/BalanceTab.tsx @@ -1,53 +1,52 @@ -import React, { type FC } from 'react'; -import { defineMessages } from 'react-intl'; +import React from 'react'; +import { useIntl } from 'react-intl'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import { formatText } from '~utils/intl.ts'; -import BalanceInfoRow from './partials/BalanceInfoRow/BalanceInfoRow.tsx'; -import StreamsInfoRow from './partials/StreamsInfoRow/StreamsInfoRow.tsx'; +import Balance from './partials/Balance.tsx'; +import PendingReputation from './partials/PendingReputation/index.ts'; +import TotalReputation from './partials/TotalReputation.tsx'; import { type BalanceTabProps } from './types.ts'; const displayName = 'common.Extensions.UserHub.partials.BalanceTab'; -const MSG = defineMessages({ - title: { - id: `${displayName}.title`, - defaultMessage: 'Your overview in {colonyName}', - }, - titleColonyOverview: { - id: `${displayName}.titleColonyOverview`, - defaultMessage: 'Your overview', - }, -}); - -const BalanceTab: FC = ({ onTabChange }) => { - const { colony } = useColonyContext(); - const { metadata, nativeToken } = colony; - const { displayName: colonyDisplayName = '' } = metadata || {}; - +const BalanceTab = ({ onTabChange }: BalanceTabProps) => { + const { formatMessage } = useIntl(); + const { + colony: { colonyAddress, nativeToken }, + } = useColonyContext(); const { wallet } = useAppContext(); if (!wallet) { return null; } + // @TODO: handle empty state return (
-
- {formatText(MSG.title, { colonyName: colonyDisplayName })} -
- + {formatMessage({ id: 'userHub.reputation' })} +

+ - + +
); }; BalanceTab.displayName = displayName; + export default BalanceTab; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx new file mode 100644 index 00000000000..e63120390b9 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/Balance.tsx @@ -0,0 +1,199 @@ +import { + ArrowCircleDownRight, + ArrowCircleUpRight, + Eye, +} from '@phosphor-icons/react'; +import React, { type FC, useMemo } from 'react'; +import { defineMessages, useIntl } from 'react-intl'; + +import { UserHubTab } from '~common/Extensions/UserHub/types.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { useTokensModalContext } from '~context/TokensModalContext/TokensModalContext.ts'; +import { useGetUserTokenBalanceQuery } from '~gql'; +import { useMobile } from '~hooks/index.ts'; +import Numeral from '~shared/Numeral/index.ts'; +import { formatText } from '~utils/intl.ts'; +import { multiLineTextEllipsis } from '~utils/strings.ts'; +import { getTokenDecimalsWithFallback } from '~utils/tokens.ts'; +import { TokensModalType } from '~v5/common/TokensModal/consts.ts'; +import Button from '~v5/shared/Button/index.ts'; +import TitleLabel from '~v5/shared/TitleLabel/index.ts'; + +import balanceTabClasses from '../BalanceTab.styles.ts'; +import { type BalanceProps, type ViewStakedButtonProps } from '../types.ts'; + +const displayName = + 'common.Extensions.UserHub.partials.ReputationTab.partials.Balance'; + +const MSG = defineMessages({ + nativeToken: { + id: `${displayName}.nativeToken`, + defaultMessage: 'Native token balance', + }, +}); + +const ViewStakedButton: FC = ({ + isFullSize, + onClick, +}) => ( +
+ )} + + + + {isMobile && ( +
+
+ )} + + + {/* @TODO: stacked icon viewed? */} +
+
+
+ + {formatMessage({ id: 'staked' })} + + {!isMobile && ( + onTabChange(UserHubTab.Stakes)} + /> + )} +
+ +
+ {isMobile && ( +
+ onTabChange(UserHubTab.Stakes)} + isFullSize + /> +
+ )} +
+ + + ); +}; + +Balance.displayName = displayName; + +export default Balance; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx deleted file mode 100644 index 9ff538a93f9..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/BalanceInfoRow.tsx +++ /dev/null @@ -1,159 +0,0 @@ -import { ArrowDownRight, ArrowUpRight } from '@phosphor-icons/react'; -import React, { type FC, useMemo } from 'react'; -import { defineMessages } from 'react-intl'; - -import UserHubInfoSection from '~common/Extensions/UserHub/partials/UserHubInfoSection/UserHubInfoSection.tsx'; -import { UserHubTab } from '~common/Extensions/UserHub/types.ts'; -import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import { useTokensModalContext } from '~context/TokensModalContext/TokensModalContext.ts'; -import { useGetUserTokenBalanceQuery } from '~gql'; -import Numeral from '~shared/Numeral/index.ts'; -import { formatText } from '~utils/intl.ts'; -import { multiLineTextEllipsis } from '~utils/strings.ts'; -import { getTokenDecimalsWithFallback } from '~utils/tokens.ts'; -import { TokensModalType } from '~v5/common/TokensModal/consts.ts'; -import Button from '~v5/shared/Button/index.ts'; - -import { type BalanceInfoRowProps } from './types.ts'; - -const displayName = - 'common.Extensions.UserHub.partials.BalanceTab.partials.BalanceInfoRow'; - -const MSG = defineMessages({ - title: { - id: `${displayName}.title`, - defaultMessage: 'Balance in this colony', - }, - viewStakes: { - id: `${displayName}.viewStakes`, - defaultMessage: 'View stakes', - }, - totalBalance: { - id: `${displayName}.totalBalance`, - defaultMessage: 'Total balance', - }, - activeFunds: { - id: `${displayName}.activeFunds`, - defaultMessage: 'Active funds', - }, - stakedFunds: { - id: `${displayName}.stakedFunds`, - defaultMessage: 'Staked funds', - }, - depositFunds: { - id: `${displayName}.depositFunds`, - defaultMessage: 'Deposit funds', - }, - withdrawalFunds: { - id: `${displayName}.withdrawalFunds`, - defaultMessage: 'Withdrawal funds', - }, -}); - -const BalanceInfoRow: FC = ({ - nativeToken, - wallet, - onTabChange, - className, -}) => { - const { - colony: { colonyAddress }, - } = useColonyContext(); - - const { data: tokenBalanceQueryData } = useGetUserTokenBalanceQuery({ - variables: { - input: { - walletAddress: wallet?.address ?? '', - tokenAddress: nativeToken?.tokenAddress ?? '', - colonyAddress, - }, - }, - skip: !wallet?.address || !nativeToken?.tokenAddress, - }); - const tokenBalanceData = tokenBalanceQueryData?.getUserTokenBalance; - - const tokenDecimals = useMemo( - () => getTokenDecimalsWithFallback(nativeToken?.decimals), - [nativeToken], - ); - - const { toggleOnTokensModal, setTokensModalType } = useTokensModalContext(); - - return ( - onTabChange(UserHubTab.Stakes), - }} - items={[ - { - key: '1', - label: formatText(MSG.totalBalance), - value: ( - - ), - }, - { - key: '2', - label: formatText(MSG.activeFunds), - value: ( - - ), - }, - { - key: '3', - label: formatText(MSG.stakedFunds), - value: ( - - ), - }, - ]} - > -
-
-
- ); -}; - -BalanceInfoRow.displayName = displayName; - -export default BalanceInfoRow; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts deleted file mode 100644 index 54b9737e5e9..00000000000 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/BalanceInfoRow/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { type UserHubTab } from '~common/Extensions/UserHub/types.ts'; -import { type Token } from '~types/graphql.ts'; -import { type ColonyWallet } from '~types/wallet.ts'; - -export interface BalanceInfoRowProps { - nativeToken: Token; - wallet: ColonyWallet; - onTabChange: (newTab: UserHubTab) => void; - className?: string; -} diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx new file mode 100644 index 00000000000..7c9961460a1 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/PendingReputation.tsx @@ -0,0 +1,104 @@ +import React, { type FC, useEffect, useState } from 'react'; +import { useIntl } from 'react-intl'; + +import balanceTabClasses from '~common/Extensions/UserHub/partials/BalanceTab/BalanceTab.styles.ts'; +import { type PendingReputationProps } from '~common/Extensions/UserHub/partials/BalanceTab/types.ts'; +import { useGetReputationMiningCycleMetadataQuery } from '~gql'; +import useUserReputation from '~hooks/useUserReputation.ts'; +import TimeRelative from '~shared/TimeRelative/index.ts'; +import TitleLabel from '~v5/shared/TitleLabel/index.ts'; + +import { + getNextMiningCycleDate, + getReputationDecayInNextDay, +} from './utils.ts'; + +const displayName = + 'common.Extensions.UserHub.partials.ReputationTab.partials.PendingReputation'; + +const UPDATE_INTERVAL = 15; + +const PendingReputation: FC = ({ + colonyAddress, + wallet, + nativeToken, +}) => { + const { formatMessage } = useIntl(); + + const { userReputation } = useUserReputation({ + colonyAddress, + walletAddress: wallet?.address, + }); + + const { data } = useGetReputationMiningCycleMetadataQuery(); + const { lastCompletedAt } = data?.getReputationMiningCycleMetadata ?? {}; + + const [nextMiningCycleDate, setNextMiningCycleDate] = useState( + lastCompletedAt + ? getNextMiningCycleDate(new Date(lastCompletedAt ?? '')) + : null, + ); + + useEffect(() => { + const intervalTimer = setInterval(() => { + if (!nextMiningCycleDate) { + return; + } + + const halfIntervalAgo = new Date( + Date.now() - (UPDATE_INTERVAL / 2) * 1000, + ); + + if (nextMiningCycleDate < halfIntervalAgo) { + setNextMiningCycleDate(getNextMiningCycleDate(nextMiningCycleDate)); + } + }, UPDATE_INTERVAL * 1000); + + return () => clearInterval(intervalTimer); + }, [nextMiningCycleDate]); + + return ( +
+ +
+
+

+ {formatMessage({ id: 'userHub.reputationNextUpdate' })} +

+ + {nextMiningCycleDate ? ( + + ) : ( + '-' + )} + +
+
+

+ {formatMessage({ id: 'userHub.reputationDecayLabel' })} +

+ + {formatMessage( + { id: 'userHub.reputationDecayValue' }, + { + points: userReputation + ? getReputationDecayInNextDay( + userReputation, + nativeToken.decimals, + ) + : '0', + }, + )} + +
+
+
+ ); +}; + +PendingReputation.displayName = displayName; + +export default PendingReputation; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts new file mode 100644 index 00000000000..10737e3b7f6 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/index.ts @@ -0,0 +1 @@ +export { default } from './PendingReputation.tsx'; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts new file mode 100644 index 00000000000..94a2fdbd974 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/PendingReputation/utils.ts @@ -0,0 +1,31 @@ +import Decimal from 'decimal.js'; + +/** + * Function calculating and formatting the amount of reputation decay in the next day + */ +export const getReputationDecayInNextDay = ( + currentReputation: string, + nativeTokenDecimals: number, +) => { + const convertedReputation = new Decimal(currentReputation); + const nextDayDecay = convertedReputation.sub( + convertedReputation.mul(new Decimal(0.5).pow(1 / 90)), + ); + return nextDayDecay + .div(new Decimal(10).pow(nativeTokenDecimals)) + .round() + .toString(); +}; + +const REPUTATION_CYCLE_DURATION_IN_HOURS = 1; + +/** + * Function calculating the date of the next reputation mining cycle, based on the date of the last completed cycle + */ +export const getNextMiningCycleDate = (lastCompletedAt: Date) => { + const nextCycleTime = new Date(lastCompletedAt); + nextCycleTime.setHours( + nextCycleTime.getHours() + REPUTATION_CYCLE_DURATION_IN_HOURS, + ); + return nextCycleTime; +}; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx new file mode 100644 index 00000000000..e42da76a115 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/TotalReputation.tsx @@ -0,0 +1,95 @@ +import { Star } from '@phosphor-icons/react'; +import clsx from 'clsx'; +import Decimal from 'decimal.js'; +import React, { type FC } from 'react'; +import { useIntl } from 'react-intl'; + +import useUserReputation from '~hooks/useUserReputation.ts'; +import Numeral from '~shared/Numeral/index.ts'; +import { calculatePercentageReputation, ZeroValue } from '~utils/reputation.ts'; +import { + getFormattedTokenValue, + getTokenDecimalsWithFallback, +} from '~utils/tokens.ts'; +import TitleLabel from '~v5/shared/TitleLabel/index.ts'; + +import balanceTabClasses from '../BalanceTab.styles.ts'; +import { type TotalReputationProps } from '../types.ts'; + +const displayName = + 'common.Extensions.UserHub.partials.ReputationTab.partials.TotalReputation'; + +const TotalReputation: FC = ({ + colonyAddress, + wallet, + nativeToken, +}) => { + const { formatMessage } = useIntl(); + const { userReputation, totalReputation } = useUserReputation({ + colonyAddress, + walletAddress: wallet?.address, + }); + + const percentageReputation = calculatePercentageReputation( + userReputation || '0', + totalReputation || '0', + ); + + const formattedReputationPoints = getFormattedTokenValue( + new Decimal(userReputation || 0).toString(), + getTokenDecimalsWithFallback(nativeToken.decimals), + ); + + return ( +
+
+ + {/* @BETA: add action */} + {/* */} +
+
+
+ + {formatMessage({ id: 'total.balance' })} + +
+ + {percentageReputation === ZeroValue.NearZero && ( + + {percentageReputation} + + )} + {percentageReputation && + percentageReputation !== ZeroValue.NearZero && ( + + )} +
+
+
+ + {formatMessage({ id: 'reputation.points' })} + + +
+
+
+ ); +}; + +TotalReputation.displayName = displayName; + +export default TotalReputation; diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts index 091261a8921..c73f47e9a41 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/types.ts @@ -1,5 +1,29 @@ import { type UserHubTab } from '~common/Extensions/UserHub/types.ts'; +import { type Token } from '~types/graphql.ts'; +import { type ColonyWallet } from '~types/wallet.ts'; export interface BalanceTabProps { onTabChange: (newTab: UserHubTab) => void; } + +export interface BalanceProps extends Pick { + nativeToken: Token; + wallet: ColonyWallet; +} + +export interface ViewStakedButtonProps { + isFullSize?: boolean; + onClick: () => void; +} + +export interface TotalReputationProps { + colonyAddress: string; + wallet: ColonyWallet; + nativeToken: Token; +} + +export interface PendingReputationProps { + nativeToken: Token; + colonyAddress: string; + wallet: ColonyWallet; +} diff --git a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx index f8be098d74d..7f089e2aa50 100644 --- a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx +++ b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx @@ -29,7 +29,6 @@ import useGetGroupedActionComponent from './hooks/useGetGroupedActionComponent.t import { ActionNotFound } from './partials/ActionNotFound.tsx'; import ActionSidebarContent from './partials/ActionSidebarContent/ActionSidebarContent.tsx'; import ActionSidebarLayout from './partials/ActionSidebarLayout/ActionSidebarLayout.tsx'; -import ActionSidebarNotFoundContent from './partials/ActionSidebarNotFoundContent/ActionSidebarNotFoundContent.tsx'; import ActionSidebarStatusPill from './partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx'; import ExpenditureActionStatusBadge from './partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx'; import { GoBackButton } from './partials/GoBackButton/GoBackButton.tsx'; @@ -136,7 +135,11 @@ const ActionSidebar: FC> = ({ > + closeSidebarClick({ + shouldShowCancelModal: !getIsDraftAgreement(), + }) + } className={className} shareButtonProps={ transactionId diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 177d8024fde..594f653187b 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -24,7 +24,11 @@ import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSid import { useActionStatusContext } from '~context/ActionStatusContext/ActionStatusContext.ts'; import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import { ColonyActionType, StreamingPaymentEndCondition } from '~gql'; +import { + ColonyActionType, + StreamingPaymentEndCondition, + useGetUserByAddressQuery, +} from '~gql'; import { useMobile } from '~hooks'; import useToggle from '~hooks/useToggle/index.ts'; import { @@ -114,6 +118,14 @@ const StreamingPayment: FC = ({ action }) => { const { loadingStreamingPayment, streamingPaymentData } = useGetStreamingPaymentData(action?.streamingPaymentId); + const { data: recipentData } = useGetUserByAddressQuery({ + variables: { address: streamingPaymentData?.recipientAddress || '' }, + skip: !streamingPaymentData?.recipientAddress, + }); + + const recipientName = + recipentData?.getUserByAddress?.items[0]?.profile?.displayName ?? ''; + useEffect(() => { if (expectedActionStatus && expectedActionStatus !== actionStatus) { setIsLoading(true); @@ -298,7 +310,9 @@ const StreamingPayment: FC = ({ action }) => { walletAddress={recipientAddress} withVerifiedBadge={false} withUserName - /> + > + {recipientName} + ) : null, initiator: initiatorUser ? ( ; -export type GetStreamingPaymentsByColonyQuery = { __typename?: 'Query', getStreamingPaymentsByColony?: { __typename?: 'ModelStreamingPaymentConnection', nextToken?: string | null, items: Array<{ __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null> } | null }; - -export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ - colonyId: Scalars['ID']; - sortDirection?: InputMaybe; - limit?: InputMaybe; - nextToken?: InputMaybe; - recipientAddress: Scalars['String']; -}>; - - export type GetStreamingPaymentsByColonyQuery = { __typename?: 'Query', getStreamingPaymentsByColony?: { __typename?: 'ModelStreamingPaymentConnection', nextToken?: string | null, items: Array<{ __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null> } | null }; export type GetTokenByAddressQueryVariables = Exact<{ From 3350e2ffbc86b5846bc1d52fe8a8065d2b170539 Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 20 Jan 2025 15:27:25 +0100 Subject: [PATCH 098/126] fix: display streamed info for cancelled transaction --- .../partials/StreamsInfoRow/utils.ts | 136 ++++++++++++++++++ .../ActionSidebarStatusPill.tsx | 7 + .../CompletedAction/CompletedAction.tsx | 2 + 3 files changed, 145 insertions(+) create mode 100644 src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts new file mode 100644 index 00000000000..06d79bd04e4 --- /dev/null +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts @@ -0,0 +1,136 @@ +import Decimal from 'decimal.js'; + +import { type ColonyFragment, type SupportedCurrencies } from '~gql'; +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; +import { fetchCurrentPrice } from '~utils/currency/currency.ts'; +import { + getStreamingPaymentAmountsLeft, + getStreamingPaymentStatus, +} from '~utils/streamingPayments.ts'; +import { + getSelectedToken, + getTokenDecimalsWithFallback, +} from '~utils/tokens.ts'; + +import { type StreamingPaymentItems } from './types.ts'; + +export const calculateToCurrency = async ({ + amount, + tokenAddress, + currency, + colony, +}: { + amount: string; + tokenAddress: string; + currency: SupportedCurrencies; + colony: ColonyFragment; +}): Promise => { + const currentToken = getSelectedToken(colony, tokenAddress); + const { decimals } = currentToken || {}; + + const currentPrice = await fetchCurrentPrice({ + contractAddress: tokenAddress, + conversionDenomination: currency, + }); + + if (currentPrice === null) { + return null; + } + + const balanceInWeiToEth = new Decimal(amount).div( + 10 ** getTokenDecimalsWithFallback(decimals), + ); + + return new Decimal(balanceInWeiToEth).mul(currentPrice ?? 0); +}; + +export const calculateTotalsFromStreams = async ({ + colony, + currency, + streamingPayments, + currentTimestamp, +}: { + streamingPayments: StreamingPaymentItems; + currentTimestamp: number; + currency: SupportedCurrencies; + colony: ColonyFragment; +}) => { + const totals = streamingPayments.reduce( + async (result, item) => { + if (!item) { + return result; + } + + const { amountClaimedToDate, amountAvailableToClaim } = + getStreamingPaymentAmountsLeft(item, currentTimestamp); + + const paymentStatus = getStreamingPaymentStatus({ + streamingPayment: item, + currentTimestamp, + }); + + const amountAvailableToClaimToCurrency = await calculateToCurrency({ + amount: amountAvailableToClaim, + tokenAddress: item.tokenAddress, + currency, + colony, + }); + + const amountClaimedToDateToCurrency = await calculateToCurrency({ + amount: amountClaimedToDate, + tokenAddress: item.tokenAddress, + currency, + colony, + }); + + const ratePerSecondValue = new Decimal(item.amount || '0').div( + item.interval || 1, + ); + + const ratePerSecondToCurrency = await calculateToCurrency({ + amount: ratePerSecondValue.toString(), + tokenAddress: item.tokenAddress, + currency, + colony, + }); + + const { + totalAvailable, + totalClaimed, + isAtLeastOnePaymentActive, + ratePerSecond, + } = await result; + + return { + totalAvailable: totalAvailable.add( + amountAvailableToClaimToCurrency ?? '0', + ), + totalClaimed: totalClaimed.add(amountClaimedToDateToCurrency ?? '0'), + ratePerSecond: ratePerSecond.add(ratePerSecondToCurrency ?? '0'), + isAtLeastOnePaymentActive: + paymentStatus === StreamingPaymentStatus.Active || + isAtLeastOnePaymentActive, + }; + }, + Promise.resolve({ + totalAvailable: new Decimal(0), + totalClaimed: new Decimal(0), + ratePerSecond: new Decimal(0), + isAtLeastOnePaymentActive: false, + }), + ); + + const { + totalClaimed, + totalAvailable, + isAtLeastOnePaymentActive, + ratePerSecond, + } = await totals; + + return { + totalClaimed: totalClaimed.toNumber(), + totalAvailable: totalAvailable.toNumber(), + ratePerSecond: ratePerSecond.toNumber(), + isAtLeastOnePaymentActive, + }; +}; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx index 322947b929a..5e54855f6c4 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx @@ -36,6 +36,13 @@ const ActionSidebarStatusPill: FC = () => { /> ); } + case ColonyActionType.CancelStreamingPayment: { + return ( + + ); + } default: { if (actionType.endsWith('Motion') || actionType.endsWith('Multisig')) { return ( diff --git a/src/components/v5/common/CompletedAction/CompletedAction.tsx b/src/components/v5/common/CompletedAction/CompletedAction.tsx index 5ffa7db3daa..a44d4fcfcf5 100644 --- a/src/components/v5/common/CompletedAction/CompletedAction.tsx +++ b/src/components/v5/common/CompletedAction/CompletedAction.tsx @@ -173,6 +173,8 @@ const CompletedAction = ({ action }: ICompletedAction) => { return ; case ColonyActionType.CreateStreamingPayment: return ; + case ColonyActionType.CancelStreamingPayment: + return ; default: return ; } From b371820165e57c165bb9cde57cf33b2f6c7b65c9 Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 21 Jan 2025 13:34:47 +0100 Subject: [PATCH 099/126] fix: available to claim amount and add associated action id --- .../expenditures/cancelStreamingPayment.ts | 4 ++ .../expenditures/claimStreamingPayment.ts | 2 + src/utils/streamingPayments.ts | 39 +++++++++++++------ 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/redux/sagas/expenditures/cancelStreamingPayment.ts b/src/redux/sagas/expenditures/cancelStreamingPayment.ts index 64cf72b5a00..fbb2d37f880 100644 --- a/src/redux/sagas/expenditures/cancelStreamingPayment.ts +++ b/src/redux/sagas/expenditures/cancelStreamingPayment.ts @@ -8,6 +8,7 @@ import { type ColonyManager, } from '~context/index.ts'; import { type Action, ActionTypes, type AllActions } from '~redux/index.ts'; +import { getStreamingPaymentCreatingActionId } from '~utils/streamingPayments.ts'; import { createTransaction, @@ -85,6 +86,7 @@ function* cancelStreamingPaymentAction({ params: isCancelMethod ? [permissionDomainId, childSkillIndex, streamingPayment.nativeId] : [streamingPayment.nativeId], + associatedActionId: getStreamingPaymentCreatingActionId(streamingPayment), }); yield takeFrom( @@ -103,6 +105,8 @@ function* cancelStreamingPaymentAction({ index: 1, }, ready: false, + associatedActionId: + getStreamingPaymentCreatingActionId(streamingPayment), }); } diff --git a/src/redux/sagas/expenditures/claimStreamingPayment.ts b/src/redux/sagas/expenditures/claimStreamingPayment.ts index 5284b4dd485..2b90f2de164 100644 --- a/src/redux/sagas/expenditures/claimStreamingPayment.ts +++ b/src/redux/sagas/expenditures/claimStreamingPayment.ts @@ -2,6 +2,7 @@ import { ClientType, ColonyRole, getPermissionProofs } from '@colony/colony-js'; import { call, fork, put, takeEvery } from 'redux-saga/effects'; import { type Action, ActionTypes, type AllActions } from '~redux/index.ts'; +import { getStreamingPaymentCreatingActionId } from '~utils/streamingPayments.ts'; import { createTransaction, @@ -61,6 +62,7 @@ function* claimStreamingPayment({ id: meta.id, index: 0, }, + associatedActionId: getStreamingPaymentCreatingActionId(streamingPayment), }); yield initiateTransaction(meta.id); diff --git a/src/utils/streamingPayments.ts b/src/utils/streamingPayments.ts index c95fbfb99b0..ceec559358c 100644 --- a/src/utils/streamingPayments.ts +++ b/src/utils/streamingPayments.ts @@ -1,7 +1,10 @@ import { BigNumber } from 'ethers'; import { ONE_DAY_IN_SECONDS, ONE_HOUR_IN_SECONDS } from '~constants/time.ts'; -import { StreamingPaymentEndCondition } from '~gql'; +import { + StreamingPaymentEndCondition, + type StreamingPaymentFragment, +} from '~gql'; import { type StreamingPayment } from '~types/graphql.ts'; import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; @@ -12,6 +15,10 @@ interface GetStreamingPaymentAmountsLeftReturn { amountAvailableToClaim: string; } +export const getStreamingPaymentCreatingActionId = ( + streamingPayment?: StreamingPaymentFragment | null, +) => streamingPayment?.metadata?.changelog?.[0].transactionHash; + export const getStreamingPaymentLimit = ({ streamingPayment, }: { @@ -50,12 +57,10 @@ export const getStreamingPaymentAmountsLeft = ( const amountClaimedToDate = streamingPayment.claims?.reduce((sum, claim) => { - const newAmount = BigNumber.from(claim.amount).add(sum); - - return newAmount.toString(); - }, '0') ?? '0'; + return BigNumber.from(claim.amount).add(sum); + }, BigNumber.from(0)) ?? BigNumber.from(0); - let amountAvailableToClaim: BigNumber; + let amountAvailableToClaim = BigNumber.from(0); const { startTime: startTimeString, @@ -74,19 +79,29 @@ export const getStreamingPaymentAmountsLeft = ( ? endTime.sub(startTime) // End time has already passed, the whole duration can be claimed. : BigNumber.from(currentTimestamp).sub(startTime); // End time has not passed, calculate duration to be claimed. + const PRECISION = BigNumber.from(10).pow(18); + const intervalBigNumber = BigNumber.from(interval); + const amountAvailableSinceStart = BigNumber.from(amount) .mul(durationToClaim) - .div(interval); + .mul(PRECISION) + .div(intervalBigNumber.mul(PRECISION)); - amountAvailableToClaim = amountAvailableSinceStart.sub(amountClaimedToDate); + const difference = amountAvailableSinceStart.sub(amountClaimedToDate); - amountAvailableToClaim = amountAvailableToClaim.lt(0) - ? BigNumber.from(0) - : amountAvailableToClaim; + const tolerance = BigNumber.from(amount).div(BigNumber.from(10).pow(12)); + + if (difference.abs().lte(tolerance)) { + amountAvailableToClaim = BigNumber.from(0); + } else { + amountAvailableToClaim = difference.lt(0) + ? BigNumber.from(0) + : difference; + } } return { - amountClaimedToDate, + amountClaimedToDate: amountClaimedToDate.toString(), amountAvailableToClaim: amountAvailableToClaim.toString(), }; }; From db245b48fd54fc92fa5a17fa036f5a24d2424b14 Mon Sep 17 00:00:00 2001 From: Sam Gibbs <34915414+iamsamgibbs@users.noreply.github.com> Date: Mon, 27 Jan 2025 10:56:06 +0000 Subject: [PATCH 100/126] Fix: Change getStreamingPaymentCreatingActionId to use creatingAction transaction hash --- src/graphql/fragments/streamingPayment.graphql | 5 +++++ src/graphql/generated.ts | 16 ++++++++++++++-- src/utils/streamingPayments.ts | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/graphql/fragments/streamingPayment.graphql b/src/graphql/fragments/streamingPayment.graphql index e20e7dbdffc..5230ee84411 100644 --- a/src/graphql/fragments/streamingPayment.graphql +++ b/src/graphql/fragments/streamingPayment.graphql @@ -31,6 +31,11 @@ fragment StreamingPayment on StreamingPayment { timestamp tokenAddress } + creatingActions: actions(filter: { type: { eq: CREATE_STREAMING_PAYMENT } }) { + items { + transactionHash: id + } + } } fragment StreamingPaymentChanges on StreamingPaymentChanges { diff --git a/src/graphql/generated.ts b/src/graphql/generated.ts index b0e9e632201..53e444e0ad3 100644 --- a/src/graphql/generated.ts +++ b/src/graphql/generated.ts @@ -11386,7 +11386,7 @@ export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: export type UserStakeFragment = { __typename?: 'UserStake', id: string, amount: string, isClaimed: boolean, createdAt: string, type?: UserStakeType | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType, blockNumber: number, initiatorAddress: string, recipientAddress?: string | null, amount?: string | null, networkFee?: string | null, tokenAddress?: string | null, createdAt: string, newColonyVersion?: number | null, rolesAreMultiSig?: boolean | null, individualEvents?: string | null, isMotion?: boolean | null, showInActionsList: boolean, members?: Array | null, rootHash: string, expenditureId?: string | null, streamingPaymentId?: string | null, isMultiSig?: boolean | null, multiSigId?: string | null, transactionHash: string, colonyAddress: string, initiatorUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, initiatorColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, initiatorExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, initiatorToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipientUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, recipientColony?: { __typename?: 'Colony', name: string, version: number, reputation?: string | null, expendituresGlobalClaimDelay?: string | null, private?: boolean | null, lastUpdatedContributorsWithReputation?: string | null, colonyAddress: string, metadata?: { __typename?: 'ColonyMetadata', avatar?: string | null, displayName: string, thumbnail?: string | null, description?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', link: string, name: ExternalLinks }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, nativeToken: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string }, status?: { __typename?: 'ColonyStatus', recovery?: boolean | null, nativeToken?: { __typename?: 'NativeTokenStatus', mintable?: boolean | null, unlockable?: boolean | null, unlocked?: boolean | null } | null } | null, chainMetadata: { __typename?: 'ChainMetadata', chainId: string, network?: Network | null }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, motionsWithUnclaimedStakes?: Array<{ __typename?: 'ColonyUnclaimedStake', motionId: string, unclaimedRewards: Array<{ __typename?: 'StakerRewards', address: string, rewards: { __typename?: 'MotionStakeValues', nay: string, yay: string } }> }> | null, domains?: { __typename?: 'ModelDomainConnection', items: Array<{ __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null> } | null, balances?: { __typename?: 'ColonyBalances', items?: Array<{ __typename?: 'ColonyBalance', id: string, balance: string, domain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> | null } | null, fundsClaimData?: { __typename?: 'ModelColonyFundsClaimConnection', items: Array<{ __typename?: 'ColonyFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, chainFundsClaim?: { __typename?: 'ColonyChainFundsClaim', id: string, createdAtBlock: number, createdAt: string, amount: string, isClaimed?: boolean | null } | null, roles?: { __typename?: 'ModelColonyRoleConnection', items: Array<{ __typename?: 'ColonyRole', id: string, targetAddress: string, role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null, isMultiSig?: boolean | null, domain: { __typename?: 'Domain', id: string, nativeId: number } } | null> } | null, colonyMemberInvite?: { __typename?: 'ColonyMemberInvite', id: string, invitesRemaining: number } | null } | null, recipientExtension?: { __typename?: 'ColonyExtension', hash: string, installedBy: string, installedAt: number, isDeprecated: boolean, isDeleted: boolean, isInitialized: boolean, address: string, colonyAddress: string, currentVersion: number, params?: { __typename?: 'ExtensionParams', votingReputation?: { __typename?: 'VotingReputationParams', maxVoteFraction: string, totalStakeFraction: string, voterRewardFraction: string, userMinStakeFraction: string, stakePeriod: string, submitPeriod: string, revealPeriod: string, escalationPeriod: string } | null, stakedExpenditure?: { __typename?: 'StakedExpenditureParams', stakeFraction: string } | null, multiSig?: { __typename?: 'MultiSigParams', colonyThreshold: number, domainThresholds?: Array<{ __typename?: 'MultiSigDomainConfig', domainId: string, domainThreshold: number } | null> | null } | null } | null } | null, recipientToken?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, fromDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, toDomain?: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null } | null, roles?: { __typename?: 'ColonyActionRoles', role_0?: boolean | null, role_1?: boolean | null, role_2?: boolean | null, role_3?: boolean | null, role_5?: boolean | null, role_6?: boolean | null } | null, payments?: Array<{ __typename?: 'Payment', amount: string, tokenAddress: string, recipientAddress: string }> | null, motionData?: { __typename?: 'ColonyMotion', remainingStakes: Array, userMinStake: string, requiredStake: string, nativeMotionDomainId: string, isFinalized: boolean, skillRep: string, repSubmitted: string, hasObjection: boolean, isDecision: boolean, transactionHash: string, createdAt: string, createdBy: string, expenditureSlotIds?: Array | null, databaseMotionId: string, motionId: string, motionStakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, usersStakes: Array<{ __typename?: 'UserMotionStakes', address: string, stakes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } } }>, motionDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, stakerRewards: Array<{ __typename?: 'StakerRewards', address: string, isClaimed: boolean, rewards: { __typename?: 'MotionStakeValues', yay: string, nay: string } }>, voterRewards?: { __typename?: 'ModelVoterRewardsHistoryConnection', items: Array<{ __typename?: 'VoterRewardsHistory', userAddress: string, amount: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, voterRecord: Array<{ __typename?: 'VoterRecord', address: string, voteCount: string, vote?: number | null }>, revealedVotes: { __typename?: 'MotionStakes', raw: { __typename?: 'MotionStakeValues', yay: string, nay: string }, percentage: { __typename?: 'MotionStakeValues', yay: string, nay: string } }, motionStateHistory: { __typename?: 'MotionStateHistory', hasVoted: boolean, hasPassed: boolean, hasFailed: boolean, hasFailedNotFinalizable: boolean, inRevealPhase: boolean, yaySideFullyStakedAt?: string | null, naySideFullyStakedAt?: string | null, allVotesSubmittedAt?: string | null, allVotesRevealedAt?: string | null, endedAt?: string | null, finalizedAt?: string | null }, messages?: { __typename?: 'ModelMotionMessageConnection', items: Array<{ __typename?: 'MotionMessage', initiatorAddress: string, name: string, messageKey: string, vote?: string | null, amount?: string | null, createdAt: string, initiatorUser?: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } | null } | null> } | null, objectionAnnotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, action?: { __typename?: 'ColonyAction', type: ColonyActionType } | null } | null, colony: { __typename?: 'Colony', name: string, colonyAddress: string, nativeToken: { __typename?: 'Token', name: string, nativeTokenDecimals: number, nativeTokenSymbol: string, tokenAddress: string }, tokens?: { __typename?: 'ModelColonyTokensConnection', items: Array<{ __typename?: 'ColonyTokens', colonyTokensId: string, token: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } } | null> } | null, metadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null }, pendingDomainMetadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null, pendingColonyMetadata?: { __typename?: 'ColonyMetadata', displayName: string, avatar?: string | null, description?: string | null, thumbnail?: string | null, externalLinks?: Array<{ __typename?: 'ExternalLink', name: ExternalLinks, link: string }> | null, objective?: { __typename?: 'ColonyObjective', title: string, description: string, progress: number } | null, changelog?: Array<{ __typename?: 'ColonyMetadataChangelog', transactionHash: string, newDisplayName: string, oldDisplayName: string, hasAvatarChanged: boolean, hasDescriptionChanged?: boolean | null, haveExternalLinksChanged?: boolean | null, hasObjectiveChanged?: boolean | null, newSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null, oldSafes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null }> | null, safes?: Array<{ __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }> | null } | null, annotation?: { __typename?: 'Annotation', createdAt: string, message: string } | null, decisionData?: { __typename?: 'ColonyDecision', title: string, description: string, motionDomainId: number, walletAddress: string, createdAt: string, actionId: string, colonyAddress: string } | null, safeTransaction?: { __typename?: 'SafeTransaction', id: string, safe: { __typename?: 'Safe', name: string, address: string, chainId: string, moduleContractAddress: string }, transactions?: { __typename?: 'ModelSafeTransactionDataConnection', items: Array<{ __typename?: 'SafeTransactionData', transactionType: SafeTransactionType, amount?: string | null, rawAmount?: string | null, data?: string | null, abi?: string | null, contractFunction?: string | null, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, recipient?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, contract?: { __typename?: 'SimpleTarget', id: string, walletAddress: string, profile: { __typename?: 'SimpleTargetProfile', avatarHash?: string | null, displayName?: string | null } } | null, nft?: { __typename?: 'NFT', id: string, walletAddress: string, profile: { __typename?: 'NFTProfile', displayName: string } } | null, nftData?: { __typename?: 'NFTData', address: string, description?: string | null, id: string, imageUri?: string | null, logoUri: string, name?: string | null, tokenName: string, tokenSymbol: string, uri: string } | null, functionParams?: Array<{ __typename?: 'FunctionParam', name: string, type: string, value: string } | null> | null } | null> } | null } | null, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string, arbitraryTxAbis?: Array<{ __typename?: 'ArbitraryTxAbi', contractAddress: string, jsonAbi: string }> | null } | null, multiSigData?: { __typename?: 'ColonyMultiSig', id: string, nativeMultiSigId: string, createdAt: string, multiSigDomainId: string, nativeMultiSigDomainId: string, requiredPermissions: number, transactionHash: string, isExecuted: boolean, hasActionCompleted: boolean, isRejected: boolean, isDecision: boolean, executedAt?: string | null, executedBy?: string | null, rejectedAt?: string | null, rejectedBy?: string | null, multiSigDomain: { __typename?: 'Domain', id: string, nativeId: number, isRoot: boolean, nativeFundingPotId: number, nativeSkillId: string, reputation?: string | null, reputationPercentage?: string | null, metadata?: { __typename?: 'DomainMetadata', name: string, color: DomainColor, description?: string | null, id: string, changelog?: Array<{ __typename?: 'DomainMetadataChangelog', transactionHash: string, oldName: string, newName: string, oldColor: DomainColor, newColor: DomainColor, oldDescription?: string | null, newDescription?: string | null }> | null } | null }, signatures?: { __typename?: 'ModelMultiSigUserSignatureConnection', items: Array<{ __typename?: 'MultiSigUserSignature', id: string, role: number, userAddress: string, multiSigId: string, vote: MultiSigVote, createdAt: string, updatedAt: string, user: { __typename?: 'User', bridgeCustomerId?: string | null, walletAddress: string, profile?: { __typename?: 'Profile', avatar?: string | null, bio?: string | null, displayName?: string | null, displayNameChanged?: string | null, email?: string | null, location?: string | null, thumbnail?: string | null, website?: string | null, preferredCurrency?: SupportedCurrencies | null, isAutoOfframpEnabled?: boolean | null, meta?: { __typename?: 'ProfileMetadata', metatransactionsEnabled?: boolean | null, decentralizedModeEnabled?: boolean | null, customRpc?: string | null } | null } | null, privateBetaInviteCode?: { __typename?: 'PrivateBetaInviteCode', id: string, shareableInvites?: number | null } | null, notificationsData?: { __typename?: 'NotificationsData', magicbellUserId: string, notificationsDisabled: boolean, mutedColonyAddresses: Array, paymentNotificationsDisabled: boolean, mentionNotificationsDisabled: boolean, adminNotificationsDisabled: boolean } | null } } | null> } | null, executedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null, rejectedByUser?: { __typename?: 'User', walletAddress: string, profile?: { __typename?: 'Profile', displayName?: string | null, displayNameChanged?: string | null, avatar?: string | null, thumbnail?: string | null } | null } | null } | null, approvedTokenChanges?: { __typename?: 'ApprovedTokenChanges', added: Array, removed: Array, unaffected: Array } | null, expenditure?: { __typename?: 'Expenditure', isStaked: boolean, type: ExpenditureType, metadata?: { __typename?: 'ExpenditureMetadata', distributionType?: SplitPaymentDistributionType | null } | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string } | null> } | null } | null, arbitraryTransactions?: Array<{ __typename?: 'ColonyActionArbitraryTransaction', contractAddress: string, encodedFunction: string }> | null } | null }; >>>>>>> af9aebdf0 (fix: rebase fixes) -export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null }; +export type StreamingPaymentFragment = { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null } | null> } | null }; export type StreamingPaymentChangesFragment = { __typename?: 'StreamingPaymentChanges', startTime: string, endTime: string, interval: string, amount: string }; @@ -11963,6 +11963,7 @@ export type GetStreamingPaymentQueryVariables = Exact<{ <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; export type GetStreamingPaymentQueryVariables = Exact<{ @@ -11998,6 +11999,9 @@ export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayme ======= export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null }; >>>>>>> 39a7fd207 (Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga) +======= +export type GetStreamingPaymentQuery = { __typename?: 'Query', getStreamingPayment?: { __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null } | null> } | null } | null }; +>>>>>>> 7c6dc1c15 (Fix: Change getStreamingPaymentCreatingActionId to use creatingAction transaction hash) export type GetColonyExtensionsByColonyAddressQueryVariables = Exact<{ colonyAddress: Scalars['ID']; @@ -12137,7 +12141,7 @@ export type GetStreamingPaymentsByColonyQueryVariables = Exact<{ }>; -export type GetStreamingPaymentsByColonyQuery = { __typename?: 'Query', getStreamingPaymentsByColony?: { __typename?: 'ModelStreamingPaymentConnection', nextToken?: string | null, items: Array<{ __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null } | null> } | null }; +export type GetStreamingPaymentsByColonyQuery = { __typename?: 'Query', getStreamingPaymentsByColony?: { __typename?: 'ModelStreamingPaymentConnection', nextToken?: string | null, items: Array<{ __typename?: 'StreamingPayment', id: string, nativeId: number, recipientAddress: string, nativeDomainId: number, startTime: string, endTime: string, interval: string, tokenAddress: string, amount: string, isCancelled?: boolean | null, isWaived?: boolean | null, createdAt: string, token?: { __typename?: 'Token', decimals: number, name: string, symbol: string, type?: TokenType | null, avatar?: string | null, thumbnail?: string | null, tokenAddress: string } | null, metadata?: { __typename?: 'StreamingPaymentMetadata', endCondition: StreamingPaymentEndCondition, changelog?: Array<{ __typename?: 'StreamingPaymentMetadataChangelog', transactionHash: string, oldEndCondition: StreamingPaymentEndCondition, newEndCondition: StreamingPaymentEndCondition }> | null } | null, claims?: Array<{ __typename?: 'StreamingPaymentClaim', amount: string, timestamp: string }> | null, creatingActions?: { __typename?: 'ModelColonyActionConnection', items: Array<{ __typename?: 'ColonyAction', transactionHash: string, metadata?: { __typename?: 'ColonyActionMetadata', customTitle: string } | null } | null> } | null } | null> } | null }; export type GetTokenByAddressQueryVariables = Exact<{ address: Scalars['ID']; @@ -13443,6 +13447,14 @@ export const StreamingPaymentFragmentDoc = gql` amount timestamp } + creatingActions: actions(filter: {type: {eq: CREATE_STREAMING_PAYMENT}}) { + items { + metadata { + customTitle + } + transactionHash: id + } + } } ${TokenFragmentDoc}`; export const StreamingPaymentChangesFragmentDoc = gql` diff --git a/src/utils/streamingPayments.ts b/src/utils/streamingPayments.ts index ceec559358c..6ef340c87fa 100644 --- a/src/utils/streamingPayments.ts +++ b/src/utils/streamingPayments.ts @@ -17,7 +17,7 @@ interface GetStreamingPaymentAmountsLeftReturn { export const getStreamingPaymentCreatingActionId = ( streamingPayment?: StreamingPaymentFragment | null, -) => streamingPayment?.metadata?.changelog?.[0].transactionHash; +) => streamingPayment?.creatingActions?.items?.[0]?.transactionHash ?? ''; export const getStreamingPaymentLimit = ({ streamingPayment, From 78ac6ea0cc1dbcab6e1cfb5ab975ee5aaf390cc5 Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 28 Jan 2025 12:30:06 +0100 Subject: [PATCH 101/126] fix: sidebar width --- .../v5/common/ActionSidebar/ActionSidebar.tsx | 4 +++- .../ActionSidebarLayout.tsx | 22 +++++++++++-------- .../partials/ActionSidebarLayout/types.ts | 4 +++- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx index 7f089e2aa50..a154ec02072 100644 --- a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx +++ b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx @@ -156,7 +156,9 @@ const ActionSidebar: FC> = ({ statusPill={ action && !isLoading ? : undefined } - maxSize={!!transactionId && !actionNotFound ? 'big' : 'small'} + transactionId={transactionId} + isMotion={isMotion} + actionNotFound={!!actionNotFound} >
{ @@ -96,17 +98,17 @@ const ActionSidebarLayout = forwardRef< exit="hidden" initial="hidden" animate="visible" + data-testid="action-drawer" className={clsx( className, ` fixed - bottom-4 right-0 - top-0 + top-[calc(var(--top-content-height))] isolate z-sidebar flex - h-full + h-[calc(100vh-var(--top-content-height))] w-full flex-col border @@ -116,15 +118,17 @@ const ActionSidebarLayout = forwardRef< shadow-default transition-[max-width] md:bottom-0 - md:top-4 - md:h-[calc(100vh-2rem)] - md:w-[calc(100vw-8.125rem)] + md:top-[calc(var(--top-content-height)+16px)] + md:h-[calc(100vh-var(--top-content-height)-2rem)] + md:w-[calc(100vw-248px)] md:rounded-l-lg `, { 'md:max-w-full': isSidebarFullscreen, - 'md:max-w-[43.375rem]': !isSidebarFullscreen && maxSize === 'small', - 'md:max-w-[67.3125rem]': !isSidebarFullscreen && maxSize === 'big', + 'md:max-w-[43.375rem]': !isSidebarFullscreen && !isMotion, + 'md:max-w-[67.3125rem]': + (!isSidebarFullscreen && !!transactionId && !actionNotFound) || + (!isSidebarFullscreen && !!transactionId && isLoading), }, )} ref={ref} diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts index 8a7f195bdc9..5fabe371590 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts @@ -10,5 +10,7 @@ export interface ActionSidebarLayoutProps { onShareButtonClick: () => void; }; isLoading?: boolean; - maxSize?: 'small' | 'big'; + transactionId?: string; + isMotion: boolean; + actionNotFound?: boolean; } From fcbbfaae9439c7e893b488e49fb794c3e4fc824c Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 28 Jan 2025 12:38:41 +0100 Subject: [PATCH 102/126] fix: replace streaming payment id with expenditure id --- .../partials/ActionDescription/ActionDescription.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx index 18614eb5533..577b1e4eb34 100644 --- a/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx +++ b/src/components/common/ColonyActionsTable/partials/ActionDescription/ActionDescription.tsx @@ -42,7 +42,7 @@ const ActionDescription: FC = ({ ); const { expenditure, loadingExpenditure } = useGetExpenditureData( - action.streamingPaymentId, + action.expenditureId, ); const { streamingPaymentData, loadingStreamingPayment } = From cdc1c16c685ccdf7baf5e4275c01afa63908ccf1 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Fri, 31 Jan 2025 22:27:37 +0000 Subject: [PATCH 103/126] Fix: Claimable amount calculations to match contracts arithmetic --- src/utils/streamingPayments.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/utils/streamingPayments.ts b/src/utils/streamingPayments.ts index 6ef340c87fa..a9f6d6e48e0 100644 --- a/src/utils/streamingPayments.ts +++ b/src/utils/streamingPayments.ts @@ -79,13 +79,12 @@ export const getStreamingPaymentAmountsLeft = ( ? endTime.sub(startTime) // End time has already passed, the whole duration can be claimed. : BigNumber.from(currentTimestamp).sub(startTime); // End time has not passed, calculate duration to be claimed. - const PRECISION = BigNumber.from(10).pow(18); - const intervalBigNumber = BigNumber.from(interval); - + // Convert to WAD arithmetic to match Solidity implementation + const WAD = BigNumber.from(10).pow(18); + const intervalsToClaim = durationToClaim.mul(WAD).div(interval); const amountAvailableSinceStart = BigNumber.from(amount) - .mul(durationToClaim) - .mul(PRECISION) - .div(intervalBigNumber.mul(PRECISION)); + .mul(intervalsToClaim) + .div(WAD); // Divide by WAD to get back to normal scale const difference = amountAvailableSinceStart.sub(amountClaimedToDate); From eeae54d95f84a12cab0e4f08a87d2eb936ea71b4 Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Mon, 25 Nov 2024 12:11:46 +0100 Subject: [PATCH 104/126] feat: added streaming payments table feat: add table filtering, pagination fix after rebase fix: filters fix: dates fix: multiple dates fix: types fix: date filter fix: filters, copy --- .../StreamingPaymentsPage.tsx | 2 + .../StreamingActionsTable.tsx | 171 +++++++++++ .../partials/StreamingActionsTable/hooks.tsx | 102 +++++++ .../StreamingActionMobileItem.tsx | 119 ++++++++ .../StreamingActionMobileItem/hooks.tsx | 21 ++ .../partials/TeamField/TeamField.tsx | 25 ++ .../partials/TitleField/TitleField.tsx | 97 +++++++ .../useRenderRowLink.tsx | 41 +++ .../FiltersContext/StreamingFiltersContext.ts | 57 ++++ .../StreamingFiltersContextProvider.tsx | 245 ++++++++++++++++ .../FiltersContext/index.ts | 2 + .../FiltersContext/types.ts | 17 ++ .../StreamingPaymentsTable.tsx | 61 ++++ .../partials/StreamingPaymentsTable/hooks.tsx | 271 ++++++++++++++++++ .../ActiveFiltersList/ActiveFiltersList.tsx | 32 +++ .../partials/ActiveFiltersList/hooks.ts | 122 ++++++++ .../StreamingPaymentFilters.tsx | 150 ++++++++++ .../StreamingPaymentFilters/consts.tsx | 52 ++++ .../partials/DateFilters/DateFilters.tsx | 62 ++++ .../partials/DateFilters/consts.ts | 26 ++ .../EndConditionFilters.tsx | 40 +++ .../partials/EndConditionFilters/consts.ts | 17 ++ .../partials/StatusFilters/StatusFilters.tsx | 39 +++ .../partials/StatusFilters/consts.ts | 25 ++ .../partials/TokenFilters/TokenFilters.tsx | 52 ++++ .../partials/TokenFilters/hooks.ts | 20 ++ .../TotalStreamedFilters.tsx | 42 +++ .../partials/TotalStreamedFilters/consts.ts | 13 + .../partials/StreamingPaymentFilters/types.ts | 25 ++ .../partials/StreamingPaymentFilters/utils.ts | 82 ++++++ .../StreamingPaymentPageFiltersItem.tsx | 92 ++++++ .../StreamingPaymentPageFiltersItem/types.ts | 8 + .../partials/UserField/UserField.tsx | 48 ++++ .../partials/UserStreams/UserStreams.tsx | 141 +++++++++ .../partials/StreamingPaymentsTable/types.ts | 31 ++ .../useRenderSubComponent.tsx | 12 + .../partials/StreamingPaymentsTable/utils.ts | 141 +++++++++ .../hooks/useGetStreamingPaymentData.ts | 2 +- .../StreamingPayment/StreamingPayment.tsx | 12 + .../RangeDatepicker/RangeDatepicker.tsx | 8 +- .../datepickers/RangeDatepicker/types.ts | 21 +- src/constants/time.ts | 1 + src/graphql/fragments/actions.graphql | 1 + src/graphql/fragments/expenditures.graphql | 3 + .../fragments/streamingPayment.graphql | 1 + src/graphql/generated.ts | 81 +++++- src/graphql/queries/streamingPayments.graphql | 30 ++ src/i18n/en.json | 27 ++ src/routes/Routes.tsx | 7 +- src/utils/streamingPayments.ts | 15 +- 50 files changed, 2695 insertions(+), 17 deletions(-) create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/hooks.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/StreamingActionMobileItem.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/hooks.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/TeamField/TeamField.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/TitleField/TitleField.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/useRenderRowLink.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContextProvider.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/index.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/types.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/ActiveFiltersList/ActiveFiltersList.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/ActiveFiltersList/hooks.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/StreamingPaymentFilters.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/consts.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/DateFilters.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/consts.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/EndConditionFilters/EndConditionFilters.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/EndConditionFilters/consts.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/StatusFilters/StatusFilters.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/StatusFilters/consts.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TokenFilters/TokenFilters.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TokenFilters/hooks.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TotalStreamedFilters/TotalStreamedFilters.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TotalStreamedFilters/consts.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/types.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/utils.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentPageFiltersItem/StreamingPaymentPageFiltersItem.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentPageFiltersItem/types.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserField/UserField.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserStreams/UserStreams.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/types.ts create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/useRenderSubComponent.tsx create mode 100644 src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/utils.ts diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx index 7b77432cdb5..28083205cca 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -8,6 +8,7 @@ import { formatText } from '~utils/intl.ts'; import ContentWithTeamFilter from '~v5/frame/ContentWithTeamFilter/ContentWithTeamFilter.tsx'; import StatsCards from './partials/StatsCards/StatsCards.tsx'; +import StreamingPaymentsTable from './partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx'; const displayName = 'v5.pages.StreamingPaymentsPage'; @@ -37,6 +38,7 @@ const StreamingPaymentsPage = () => { prefix={currencySymbolMap[currency]} suffix={currency} /> + ); }; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx new file mode 100644 index 00000000000..bcef9a81bc7 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx @@ -0,0 +1,171 @@ +import { FilePlus, ShareNetwork } from '@phosphor-icons/react'; +import { ArrowCircleDown } from '@phosphor-icons/react/dist/ssr/ArrowCircleDown'; +import { + type SortingState, + type Row, + getSortedRowModel, + getPaginationRowModel, +} from '@tanstack/react-table'; +import clsx from 'clsx'; +import React, { useState, type FC } from 'react'; +import { defineMessages } from 'react-intl'; +import { generatePath, useNavigate } from 'react-router-dom'; + +import MeatballMenuCopyItem from '~common/ColonyActionsTable/partials/MeatballMenuCopyItem/MeatballMenuCopyItem.tsx'; +import { APP_URL } from '~constants'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { useMobile, useTablet } from '~hooks'; +import { + COLONY_ACTIVITY_ROUTE, + COLONY_HOME_ROUTE, + TX_SEARCH_PARAM, +} from '~routes'; +import { formatText } from '~utils/intl.ts'; +import { MEATBALL_MENU_COLUMN_ID } from '~v5/common/Table/consts.ts'; +import Table from '~v5/common/Table/Table.tsx'; +import { type TableProps } from '~v5/common/Table/types.ts'; + +import { + type StreamingTableFieldModel, + type StreamingActionTableFieldModel, +} from '../StreamingPaymentsTable/types.ts'; + +import { useStreamingActionsTableColumns } from './hooks.tsx'; +import useRenderSubComponent from './partials/StreamingActionMobileItem/hooks.tsx'; +import useRenderRowLink from './useRenderRowLink.tsx'; + +const displayName = + 'pages.StreamingPaymentsPage.partials.StreamingActionsTable.StreamingActionsTable'; + +const MSG = defineMessages({ + loadMoreStreams: { + id: `${displayName}.loadMoreStreams`, + defaultMessage: 'Load more streams', + }, +}); + +interface StreamingActionsTableProps { + actionRow: Row; + isLoading: boolean; +} + +const StreamingActionsTable: FC = ({ + actionRow, + isLoading, +}) => { + const { + colony: { name: colonyName }, + } = useColonyContext(); + const { original } = actionRow; + const isTablet = useTablet(); + const isMobile = useMobile(); + const columns = useStreamingActionsTableColumns(); + const [sorting, setSorting] = useState([ + { + id: 'totalStreamedAmount', + desc: true, + }, + ]); + const navigate = useNavigate(); + const getMenuProps: TableProps['getMenuProps'] = + ({ original: { transactionId } }) => ({ + items: [ + { + key: '1', + label: formatText({ id: 'activityFeedTable.menu.view' }), + icon: FilePlus, + onClick: () => { + navigate( + `${window.location.pathname}?${TX_SEARCH_PARAM}=${transactionId}`, + { + replace: true, + }, + ); + }, + }, + { + key: '2', + label: formatText({ id: 'activityFeedTable.menu.share' }), + renderItemWrapper: (itemWrapperProps, children) => ( + + {children} + + ), + icon: ShareNetwork, + onClick: () => false, + }, + ], + }); + + const renderSubComponent = useRenderSubComponent({ + getMenuProps, + }); + const renderRowLink = useRenderRowLink(isLoading); + + return ( + + data={isLoading ? [] : original.actions} + columns={columns} + renderCellWrapper={isMobile ? undefined : renderRowLink} + className={clsx( + '[&_td:first-child]:!pl-0 [&_td>a]:px-[1.125rem] [&_td>a]:py-2 [&_td>div]:px-[1.125rem] [&_td>div]:py-2 [&_td]:border-b [&_td]:border-gray-100 [&_td]:!pr-0 [&_th:not(:first-child)]:sm:text-center [&_th]:!rounded-none [&_th]:!border-b [&_th]:!border-solid [&_th]:border-gray-200 [&_tr.expanded-below_td]:border-none sm:[&_tr:hover]:bg-gray-25 [&_tr:last-child_td]:border-none', + { + '[&_table]:table-auto lg:[&_table]:table-fixed [&_tbody_td]:h-[54px] [&_th:not(:first-child)]:pl-0': + !isTablet, + }, + )} + enableSortingRemoval={false} + enableSorting + loadMoreProps={{ + renderContent: (loadMore) => ( + + ), + itemsPerPage: 5, + }} + initialState={{ + pagination: { + pageSize: 1000000, + }, + }} + hidePagination + state={{ + sorting, + columnVisibility: isMobile + ? { + title: true, + streamed: true, + token: true, + team: false, + status: false, + [MEATBALL_MENU_COLUMN_ID]: false, + } + : { + expander: false, + }, + }} + getRowId={(row) => row.transactionId} + getMenuProps={getMenuProps} + onSortingChange={setSorting} + getSortedRowModel={getSortedRowModel()} + getPaginationRowModel={getPaginationRowModel()} + renderSubComponent={renderSubComponent} + tableClassName="border-none" + /> + ); +}; + +StreamingActionsTable.displayName = displayName; + +export default StreamingActionsTable; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/hooks.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/hooks.tsx new file mode 100644 index 00000000000..fae3cfbb422 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/hooks.tsx @@ -0,0 +1,102 @@ +import { CaretDown } from '@phosphor-icons/react'; +import { createColumnHelper } from '@tanstack/react-table'; +import clsx from 'clsx'; +import React, { useMemo } from 'react'; + +import { DEFAULT_TOKEN_DECIMALS } from '~constants'; +import Numeral from '~shared/Numeral/Numeral.tsx'; +import { formatText } from '~utils/intl.ts'; +import StreamingPaymentStatusPill from '~v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx'; + +import { type StreamingActionTableFieldModel } from '../StreamingPaymentsTable/types.ts'; + +import TeamField from './partials/TeamField/TeamField.tsx'; +import TitleField from './partials/TitleField/TitleField.tsx'; + +export const useStreamingActionsTableColumns = () => { + return useMemo(() => { + const helper = createColumnHelper(); + + return [ + helper.display({ + id: 'title', + enableSorting: false, + cell: ({ row }) => ( + + ), + colSpan: (isExpanded) => (isExpanded ? 3 : undefined), + header: formatText({ id: 'streamingPayment.table.description' }), + }), + helper.accessor('totalStreamedAmount', { + id: 'totalStreamedAmount', + staticSize: '7rem', + enableSorting: true, + cell: ({ row }) => ( + + ), + colSpan: (isExpanded) => (isExpanded ? 0 : undefined), + header: formatText({ id: 'streamingPayment.table.streamed' }), + }), + helper.accessor('token.symbol', { + id: 'token', + staticSize: '5rem', + enableSorting: true, + cell: ({ row }) => ( +

+ {row.original.token?.symbol || ''} +

+ ), + colSpan: (isExpanded) => (isExpanded ? 0 : undefined), + header: formatText({ id: 'streamingPayment.table.token' }), + }), + helper.accessor('nativeDomainId', { + id: 'team', + staticSize: '8.125rem', + enableSorting: true, + cell: ({ row }) => , + header: formatText({ id: 'streamingPayment.table.team' }), + }), + helper.display({ + id: 'status', + staticSize: '7.5rem', + enableSorting: false, + cell: ({ row }) => ( + + ), + header: formatText({ id: 'streamingPayment.table.status' }), + }), + helper.display({ + id: 'expander', + staticSize: '2.25rem', + header: () => null, + enableSorting: false, + cell: ({ row: { getIsExpanded, toggleExpanded } }) => { + return ( + + ); + }, + cellContentWrapperClassName: 'pl-0', + }), + ]; + }, []); +}; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/StreamingActionMobileItem.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/StreamingActionMobileItem.tsx new file mode 100644 index 00000000000..7943530d291 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/StreamingActionMobileItem.tsx @@ -0,0 +1,119 @@ +import { type Row } from '@tanstack/react-table'; +import clsx from 'clsx'; +import React, { type FC } from 'react'; +import { defineMessages } from 'react-intl'; + +import { type StreamingActionTableFieldModel } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/types.ts'; +import Numeral from '~shared/Numeral/Numeral.tsx'; +import { formatText } from '~utils/intl.ts'; +import StreamingPaymentStatusPill from '~v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx'; +import MeatBallMenu from '~v5/shared/MeatBallMenu/MeatBallMenu.tsx'; +import { type MeatBallMenuProps } from '~v5/shared/MeatBallMenu/types.ts'; + +import TeamField from '../TeamField/TeamField.tsx'; + +interface StreamingActionMobileItemProps { + actionRow: Row; + getMenuProps: ( + row: Row, + ) => MeatBallMenuProps | undefined; +} + +const displayName = + 'pages.StreamingPaymentsPage.partials.StreamingActionsTable.partials.StreamingActionMobileItem'; + +const MSG = defineMessages({ + streamed: { + id: `${displayName}.streamed`, + defaultMessage: '

Streamed:

{streamed}', + }, + token: { + id: `${displayName}.token`, + defaultMessage: '

Token:

{token}', + }, + team: { + id: `${displayName}.team`, + defaultMessage: '

Team:

{team}', + }, + status: { + id: `${displayName}.status`, + defaultMessage: '

Status:

{status}', + }, +}); + +const StreamingActionMobileItem: FC = ({ + actionRow, + getMenuProps, +}) => { + const { + original: { amount, nativeDomainId, token, status }, + } = actionRow; + + const meatBallMenuProps = getMenuProps(actionRow); + + const textClassName = 'font-normal text-sm'; + const renderLabel = (chunks: string[]) => ( +

{chunks}

+ ); + + return ( +
+
+
+ {formatText(MSG.streamed, { + streamed: ( + + + + ), + p: renderLabel, + })} +
+
+ {formatText(MSG.token, { + token: ( + + {token?.symbol} + + ), + p: renderLabel, + })} +
+
+ {formatText(MSG.team, { + team: ( + + + + ), + p: renderLabel, + })} +
+
+ {formatText(MSG.status, { + status: ( + + + + ), + p: renderLabel, + })} +
+
+ {meatBallMenuProps && ( + + clsx({ '!text-gray-600': !isMenuOpen }) + } + iconSize={18} + /> + )} +
+ ); +}; + +StreamingActionMobileItem.displayName = displayName; + +export default StreamingActionMobileItem; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/hooks.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/hooks.tsx new file mode 100644 index 00000000000..8a5b8af316b --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/hooks.tsx @@ -0,0 +1,21 @@ +import { type Row } from '@tanstack/react-table'; +import React from 'react'; + +import { type StreamingActionTableFieldModel } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/types.ts'; +import { type MeatBallMenuProps } from '~v5/shared/MeatBallMenu/types.ts'; + +import StreamingActionMobileItem from './StreamingActionMobileItem.tsx'; + +const useRenderSubComponent = ({ + getMenuProps, +}: { + getMenuProps: ( + row: Row, + ) => MeatBallMenuProps | undefined; +}) => { + return ({ row }: { row: Row }) => ( + + ); +}; + +export default useRenderSubComponent; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/TeamField/TeamField.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/TeamField/TeamField.tsx new file mode 100644 index 00000000000..7f4a6d3adcc --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/TeamField/TeamField.tsx @@ -0,0 +1,25 @@ +import React, { type FC } from 'react'; + +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { findDomainByNativeId } from '~utils/domains.ts'; +import TeamBadge from '~v5/common/Pills/TeamBadge/TeamBadge.tsx'; + +interface TeamFieldProps { + domainId: number; +} + +const TeamField: FC = ({ domainId }) => { + const { colony } = useColonyContext(); + const currentTeam = findDomainByNativeId(domainId, colony); + + return currentTeam ? ( + + ) : ( +
+ ); +}; + +export default TeamField; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/TitleField/TitleField.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/TitleField/TitleField.tsx new file mode 100644 index 00000000000..5b125f478b4 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/TitleField/TitleField.tsx @@ -0,0 +1,97 @@ +import React, { type FC } from 'react'; +import { defineMessages } from 'react-intl'; + +import { DEFAULT_TOKEN_DECIMALS } from '~constants'; +import { useMobile } from '~hooks'; +import useUserByAddress from '~hooks/useUserByAddress.ts'; +import { formatText } from '~utils/intl.ts'; +import { getAmountPerValue } from '~utils/streamingPayments.ts'; +import { + getFormattedTokenValue, + getTokenDecimalsWithFallback, +} from '~utils/tokens.ts'; + +interface TitleFieldProps { + tokenSymbol: string; + amount: string; + period: string; + recipient: string; + initiator: string; + title: string; + decimals: number; + hideDescription: boolean; +} + +const displayName = + 'pages.StreamingPaymentsPage.partials.StreamingActionsTable.partials.TitleField'; + +const MSG = defineMessages({ + title: { + id: `${displayName}.title`, + defaultMessage: + 'Stream {amount} {tokenSymbol} / {period} to {recipient} by {initiator}', + }, +}); + +const TitleField: FC = ({ + tokenSymbol, + amount, + initiator, + period, + recipient, + title, + decimals, + hideDescription, +}) => { + const isMobile = useMobile(); + const { user: recipientUser, loading: isRecipientLoading } = useUserByAddress( + recipient, + true, + ); + const { user: initiatorUser, loading: isInitiatorLoading } = useUserByAddress( + initiator, + true, + ); + + return ( +
+

{title}

+ {isMobile && hideDescription && ( +

+ {formatText(MSG.title, { + amount: getFormattedTokenValue( + amount, + getTokenDecimalsWithFallback(decimals, DEFAULT_TOKEN_DECIMALS), + ), + tokenSymbol, + period: period || 0, + recipient: isRecipientLoading + ? '' + : recipientUser?.profile?.displayName, + initiator: isInitiatorLoading + ? '' + : initiatorUser?.profile?.displayName, + })} +

+ )} +

+ {formatText(MSG.title, { + amount: getFormattedTokenValue( + amount, + getTokenDecimalsWithFallback(decimals, DEFAULT_TOKEN_DECIMALS), + ), + tokenSymbol, + period: getAmountPerValue(period).toLowerCase(), + recipient: isRecipientLoading + ? '' + : recipientUser?.profile?.displayName, + initiator: isInitiatorLoading + ? '' + : initiatorUser?.profile?.displayName, + })} +

+
+ ); +}; + +export default TitleField; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/useRenderRowLink.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/useRenderRowLink.tsx new file mode 100644 index 00000000000..62a804e01a4 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/useRenderRowLink.tsx @@ -0,0 +1,41 @@ +import clsx from 'clsx'; +import React from 'react'; + +import { TX_SEARCH_PARAM } from '~routes/index.ts'; +import { tw } from '~utils/css/index.ts'; +import { setQueryParamOnUrl } from '~utils/urls.ts'; +import { MEATBALL_MENU_COLUMN_ID } from '~v5/common/Table/consts.ts'; +import { type RenderCellWrapper } from '~v5/common/Table/types.ts'; +import Link from '~v5/shared/Link/index.ts'; + +import { type StreamingActionTableFieldModel } from '../StreamingPaymentsTable/types.ts'; + +const useRenderRowLink = ( + loading: boolean, +): RenderCellWrapper => { + const cellClassName = tw( + 'flex h-full flex-col justify-center py-1 text-md text-gray-500', + ); + + return (_, content, { cell, row }) => + cell.column.columnDef.id === MEATBALL_MENU_COLUMN_ID || loading ? ( +
+ {content} +
+ ) : ( + + {content} + + ); +}; + +export default useRenderRowLink; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts new file mode 100644 index 00000000000..22b86be0222 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts @@ -0,0 +1,57 @@ +import { createContext, useContext } from 'react'; + +import { + type ModelSortDirection, + type StreamingPaymentEndCondition, +} from '~gql'; +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; + +import { + type StreamingPaymentFilters, + type DateOptions, +} from '../partials/StreamingPaymentFilters/types.ts'; + +import { type TokenTypes } from './types.ts'; + +import type React from 'react'; + +interface StreamingFiltersContextValue { + searchFilter: string; + setSearchFilter: (searchValue: string) => void; + statuses: StreamingPaymentStatus[]; + endConditions: StreamingPaymentEndCondition[]; + tokenTypes: TokenTypes; + dateFilters: DateOptions; + activeFilters: StreamingPaymentFilters; + totalStreamedFilters: ModelSortDirection | undefined; + selectedFiltersCount: number; + handleStatusesFilterChange: ( + event: React.ChangeEvent, + ) => void; + handleEndConditionsFilterChange: ( + event: React.ChangeEvent, + ) => void; + handleTokenTypesFilterChange: ( + event: React.ChangeEvent, + ) => void; + handleTotalStreamedFilterChange: ( + event: React.ChangeEvent, + ) => void; + handleDateFilterChange: (event: React.ChangeEvent) => void; + handleCustomDateFilterChange: (date: [Date | null, Date | null]) => void; + handleResetFilters: (category: string) => void; +} + +export const StreamingFiltersContext = createContext< + StreamingFiltersContextValue | undefined +>(undefined); + +export const useStreamingFiltersContext = () => { + const context = useContext(StreamingFiltersContext); + if (context === undefined) { + throw new Error( + 'useFiltersContext must be used within the StreamingFiltersContextProvider', + ); + } + return context; +}; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContextProvider.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContextProvider.tsx new file mode 100644 index 00000000000..3bfd5580797 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContextProvider.tsx @@ -0,0 +1,245 @@ +import React, { + type FC, + type PropsWithChildren, + useState, + useMemo, + useCallback, +} from 'react'; + +import { + type ModelSortDirection, + type StreamingPaymentEndCondition, +} from '~gql'; +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; + +import { STATUS_FILTERS } from '../partials/StreamingPaymentFilters/partials/StatusFilters/consts.ts'; +import { + type StreamingPaymentFilters, + type DateOptions, +} from '../partials/StreamingPaymentFilters/types.ts'; +import { getDateFilter } from '../partials/StreamingPaymentFilters/utils.ts'; + +import { StreamingFiltersContext } from './StreamingFiltersContext.ts'; +import { FiltersValues, type TokenTypes } from './types.ts'; + +const StreamingFiltersContextProvider: FC = ({ + children, +}) => { + const [searchFilter, setSearchFilter] = useState(''); + const [statuses, setStatuses] = useState([]); + const [tokenTypes, setTokenTypes] = useState({}); + const [totalStreamedFilters, setTotalStreamedFilters] = useState< + ModelSortDirection | undefined + >(undefined); + const [endConditions, setEndConditions] = useState< + StreamingPaymentEndCondition[] + >([]); + const [dateFilters, setDateFilters] = useState({ + pastHour: false, + pastDay: false, + pastWeek: false, + pastMonth: false, + pastYear: false, + custom: undefined, + }); + + const handleStatusesFilterChange = useCallback( + (event: React.ChangeEvent) => { + const isChecked = event.target.checked; + const name = event.target.name as StreamingPaymentStatus; + + if (isChecked) { + setStatuses([...statuses, name]); + } else { + setStatuses(statuses.filter((checkedItem) => checkedItem !== name)); + } + }, + [statuses], + ); + const handleEndConditionsFilterChange = useCallback( + (event: React.ChangeEvent) => { + const isChecked = event.target.checked; + const name = event.target.name as StreamingPaymentEndCondition; + + if (isChecked) { + setEndConditions([...endConditions, name]); + } else { + setEndConditions( + endConditions.filter((checkedItem) => checkedItem !== name), + ); + } + }, + [endConditions], + ); + const handleTokenTypesFilterChange = useCallback( + (event: React.ChangeEvent) => { + const isChecked = event.target.checked; + const name = event.target.name as keyof TokenTypes; + + if (isChecked) { + setTokenTypes({ ...tokenTypes, [name]: true }); + } else { + setTokenTypes({ ...tokenTypes, [name]: false }); + } + }, + [tokenTypes], + ); + const handleDateFilterChange = useCallback( + (event: React.ChangeEvent) => { + const isChecked = event.target.checked; + const name = event.target.name as keyof DateOptions; + + if (isChecked) { + setDateFilters({ ...dateFilters, [name]: true }); + } else { + setDateFilters({ ...dateFilters, [name]: false }); + } + }, + [dateFilters], + ); + const handleCustomDateFilterChange = useCallback( + (date: [Date | null, Date | null]) => { + const [newStartDate, newEndDate] = date; + + if (newStartDate && newEndDate) { + setDateFilters({ + ...dateFilters, + custom: + !newStartDate && !newEndDate + ? undefined + : [newStartDate.toString(), newEndDate.toString()], + }); + } + }, + [dateFilters], + ); + const handleTotalStreamedFilterChange = useCallback( + (event: React.ChangeEvent) => { + const isChecked = event.target.checked; + const name = event.target.name as ModelSortDirection; + + if (isChecked) { + setTotalStreamedFilters(name); + } else { + setTotalStreamedFilters(undefined); + } + }, + [], + ); + + const activeFilters: StreamingPaymentFilters = useMemo(() => { + const date = getDateFilter(dateFilters); + + return { + ...(statuses.length ? { statuses } : {}), + ...(endConditions.length ? { endConditions } : {}), + ...(totalStreamedFilters ? { totalStreamedFilters } : {}), + ...(tokenTypes.length ? { endConditions } : {}), + ...(searchFilter ? { search: searchFilter } : {}), + ...(Object.keys(tokenTypes).length ? { tokenTypes } : {}), + ...(date || {}), + }; + }, [ + dateFilters, + statuses, + endConditions, + tokenTypes, + searchFilter, + totalStreamedFilters, + ]); + + const handleResetFilters = useCallback( + (filter: FiltersValues) => { + switch (filter) { + case FiltersValues.Status: { + return setStatuses([]); + } + case FiltersValues.Date: { + return setDateFilters({ + pastHour: false, + pastDay: false, + pastWeek: false, + pastMonth: false, + pastYear: false, + custom: dateFilters.custom, + }); + } + case FiltersValues.Custom: { + return setDateFilters({ + ...dateFilters, + custom: undefined, + }); + } + case FiltersValues.EndCondition: { + return setEndConditions([]); + } + case FiltersValues.TokenType: { + return setTokenTypes({}); + } + case FiltersValues.TotalStreamedFilters: { + return setTotalStreamedFilters(undefined); + } + default: { + return undefined; + } + } + }, + [dateFilters], + ); + + const statusCount = statuses.reduce((acc, current) => { + if (STATUS_FILTERS[current]) { + return acc + 1; + } + return acc; + }, 0); + + const selectedFiltersCount = + statusCount + Object.values(dateFilters).filter(Boolean).length; + + const value = useMemo( + () => ({ + searchFilter, + setSearchFilter, + dateFilters, + statuses, + endConditions, + tokenTypes, + activeFilters, + totalStreamedFilters, + selectedFiltersCount, + handleStatusesFilterChange, + handleResetFilters, + handleDateFilterChange, + handleCustomDateFilterChange, + handleEndConditionsFilterChange, + handleTokenTypesFilterChange, + handleTotalStreamedFilterChange, + }), + [ + searchFilter, + statuses, + endConditions, + dateFilters, + tokenTypes, + activeFilters, + totalStreamedFilters, + selectedFiltersCount, + handleStatusesFilterChange, + handleResetFilters, + handleDateFilterChange, + handleCustomDateFilterChange, + handleEndConditionsFilterChange, + handleTokenTypesFilterChange, + handleTotalStreamedFilterChange, + ], + ); + + return ( + + {children} + + ); +}; + +export default StreamingFiltersContextProvider; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/index.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/index.ts new file mode 100644 index 00000000000..753c56cab09 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/index.ts @@ -0,0 +1,2 @@ +export { useStreamingFiltersContext } from './StreamingFiltersContext.ts'; +export { default as FiltersContextProvider } from './StreamingFiltersContextProvider.tsx'; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/types.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/types.ts new file mode 100644 index 00000000000..31337e36a9b --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/types.ts @@ -0,0 +1,17 @@ +import { type SearchStreamingPaymentsQueryVariables } from '~gql'; + +export enum FiltersValues { + Status = 'status', + Date = 'date', + Custom = 'custom', + EndCondition = 'endCondition', + TokenType = 'tokenType', + TotalStreamedFilters = 'TotalStreamedFilters', +} + +export interface TokenTypes { + [key: string]: boolean; +} + +export type SearchStreamingPaymentFilterVariable = + SearchStreamingPaymentsQueryVariables['filter']; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx new file mode 100644 index 00000000000..e67edf46ab4 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx @@ -0,0 +1,61 @@ +import { Binoculars } from '@phosphor-icons/react'; +import { getPaginationRowModel } from '@tanstack/react-table'; +import React from 'react'; + +import EmptyContent from '~v5/common/EmptyContent/EmptyContent.tsx'; +import { Table } from '~v5/common/Table/Table.tsx'; + +import { useStreamingFiltersContext } from './FiltersContext/StreamingFiltersContext.ts'; +import { + useStreamingPaymentTable, + useStreamingTableColumns, +} from './hooks.tsx'; +import { type StreamingTableFieldModel } from './types.ts'; +import { useRenderSubComponent } from './useRenderSubComponent.tsx'; + +const displayName = + 'pages.StreamingPaymentsPage.partials.StreamingPaymentsTable'; + +const StreamingPaymentsTable = () => { + const { searchFilter, selectedFiltersCount } = useStreamingFiltersContext(); + const { items, loading } = useStreamingPaymentTable(); + + const columns = useStreamingTableColumns(loading); + const renderSubComponent = useRenderSubComponent(loading); + + return ( + + className="[&_table]:table-auto [&_table]:overflow-hidden lg:[&_table]:table-fixed [&_tbody_td]:h-[57px] [&_td:first-child]:pl-0 [&_td:last-child]:pr-0 [&_td]:border-gray-100 [&_td]:pr-0 [&_th]:border-none [&_tr.expanded-below+tr_td]:pl-0 [&_tr.expanded-below+tr_td]:pr-0 [&_tr.expanded-below>td]:border-gray-200 [&_tr.expanded-below_td]:h-[57px] [&_tr:hover_.toggler]:text-blue-400 [&_tr:not(.expanded-content):hover_td]:bg-gray-25 [&_tr:not(:last-child)_td]:border-b" + data={loading ? Array(4).fill({}) : items} + columns={columns} + renderCellWrapper={(_, content) => content} + renderSubComponent={renderSubComponent} + paginationDisabled={loading} + showTotalPagesNumber={false} + getPaginationRowModel={getPaginationRowModel()} + initialState={{ + pagination: { + pageSize: 10, + }, + }} + emptyContent={ + + } + /> + ); +}; + +StreamingPaymentsTable.displayName = displayName; + +export default StreamingPaymentsTable; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx new file mode 100644 index 00000000000..c243c7c22da --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx @@ -0,0 +1,271 @@ +import { CaretDown } from '@phosphor-icons/react'; +import { createColumnHelper } from '@tanstack/react-table'; +import clsx from 'clsx'; +import { BigNumber } from 'ethers'; +import React, { useMemo } from 'react'; + +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { useMemberContext } from '~context/MemberContext/MemberContext.ts'; +import { useSearchStreamingPaymentsQuery } from '~gql'; +import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; +import { useGetAllTokens } from '~hooks/useGetAllTokens.ts'; +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; +import { notNull } from '~utils/arrays/index.ts'; +import { + convertToMonthlyAmount, + getStreamingPaymentAmountsLeft, + getStreamingPaymentStatus, +} from '~utils/streamingPayments.ts'; +import { getTokenDecimalsWithFallback } from '~utils/tokens.ts'; + +import { useStreamingFiltersContext } from './FiltersContext/StreamingFiltersContext.ts'; +import { type SearchStreamingPaymentFilterVariable } from './FiltersContext/types.ts'; +import { type StreamingPaymentFilters } from './partials/StreamingPaymentFilters/types.ts'; +import UserField from './partials/UserField/UserField.tsx'; +import UserStreams from './partials/UserStreams/UserStreams.tsx'; +import { + type StreamingPaymentItem, + type StreamingTableFieldModel, +} from './types.ts'; +import { + filterByActionStatus, + filterByEndCondition, + searchStreamingPayments, + sortStreamingPayments, +} from './utils.ts'; + +export const useStreamingTableColumns = (loading: boolean) => { + return useMemo(() => { + const helper = createColumnHelper(); + + return [ + helper.display({ + id: 'user', + enableSorting: false, + header: () => null, + cell: ({ row }) => ( + + ), + }), + helper.display({ + id: 'amount', + staticSize: '13rem', + enableSorting: false, + header: () => null, + cell: ({ row }) => + loading ? ( +
+ ) : ( + + ), + }), + helper.display({ + id: 'expander', + staticSize: '2.25rem', + header: () => null, + enableSorting: false, + cell: ({ row: { getIsExpanded, toggleExpanded } }) => + loading ? ( +
+ ) : ( + + ), + cellContentWrapperClassName: 'pl-0', + }), + ]; + }, [loading]); +}; + +const getSearchStreamingPaymentsFilterVariable = ( + colonyAddress: string, + { dateFrom, dateTo, tokenTypes }: StreamingPaymentFilters = {}, +): SearchStreamingPaymentFilterVariable => { + const dateFilter = + dateFrom && dateTo + ? { + createdAt: { + range: [dateFrom?.toISOString(), dateTo?.toISOString()], + }, + } + : { + ...(dateFrom + ? { + createdAt: { + gte: dateFrom?.toISOString(), + }, + } + : {}), + ...(dateTo + ? { + createdAt: { + lte: dateTo?.toISOString(), + }, + } + : {}), + }; + + const activeTokens = tokenTypes + ? Object.entries(tokenTypes) + .filter(([, value]) => value === true) + .map(([tokenAddress]) => ({ + tokenAddress: { eq: tokenAddress }, + })) + : []; + + return { + and: [ + { colonyId: { eq: colonyAddress } }, + ...(activeTokens.length > 0 ? [{ or: activeTokens }] : []), + dateFilter, + ].filter((obj) => Object.keys(obj).length > 0), + }; +}; + +export const useStreamingPaymentTable = () => { + const { + colony: { colonyAddress }, + } = useColonyContext(); + const { activeFilters, searchFilter } = useStreamingFiltersContext(); + + const { data, loading, refetch } = useSearchStreamingPaymentsQuery({ + variables: { + filter: getSearchStreamingPaymentsFilterVariable( + colonyAddress, + useMemo(() => activeFilters, [activeFilters]), + ), + }, + fetchPolicy: 'network-only', + }); + + const { currentBlockTime: blockTime } = useCurrentBlockTime(); + const { totalMembers: members } = useMemberContext(); + const allTokens = useGetAllTokens(); + + const groupedStreamingPayments = (data?.searchStreamingPayments?.items || []) + .filter(notNull) + .map((item) => { + const { amountAvailableToClaim, amountClaimedToDate } = + getStreamingPaymentAmountsLeft( + item, + Math.floor(blockTime ?? Date.now() / 1000), + ); + const paymentStatus = getStreamingPaymentStatus({ + streamingPayment: item, + currentTimestamp: Math.floor(blockTime ?? Date.now() / 1000), + amountAvailableToClaim, + }); + const selectedToken = allTokens.find( + (token) => token.token.tokenAddress === item.tokenAddress, + ); + const summedAmount = BigNumber.from(amountAvailableToClaim).add( + BigNumber.from(amountClaimedToDate), + ); + + return { + ...item, + title: item.actions?.items[0]?.metadata?.customTitle || '', + token: item.token || selectedToken?.token, + paymentId: item.id, + totalStreamedAmount: summedAmount.toString(), + transactionId: item.actions?.items[0]?.transactionHash || '', + status: paymentStatus, + endCondition: item.metadata?.endCondition, + }; + }) + .reduce((result, item) => { + const { recipientAddress } = item; + + const newResult = { ...result }; + + if (!newResult[recipientAddress]) { + newResult[recipientAddress] = { + tokenTotalsPerMonth: {}, + actions: [], + }; + } + + const existingUser = newResult[recipientAddress]; + const tokenAddress = item.token?.tokenAddress || item.tokenAddress; + + const isPaymentActive = item.status === StreamingPaymentStatus.Active; + + if (!existingUser.tokenTotalsPerMonth[tokenAddress]) { + existingUser.tokenTotalsPerMonth[tokenAddress] = { + amount: '0', + tokenDecimals: getTokenDecimalsWithFallback(item.token?.decimals), + tokenSymbol: item.token?.symbol || '', + }; + } + + const monthlyAmount = isPaymentActive + ? convertToMonthlyAmount( + BigNumber.from(item.amount), + BigNumber.from(item.interval), + ) + : '0'; + + const currentStream = existingUser.tokenTotalsPerMonth[tokenAddress]; + const totalAmount = BigNumber.from(currentStream.amount) + .add(monthlyAmount) + .toString(); + + existingUser.tokenTotalsPerMonth[tokenAddress] = { + ...currentStream, + amount: totalAmount, + }; + + existingUser.actions = [...existingUser.actions, item]; + + return newResult; + }, {}); + + const paymentsArray: StreamingTableFieldModel[] = Object.entries( + groupedStreamingPayments, + ).map(([user, paymentData]) => ({ + user, + ...paymentData, + })); + + const searchedStreamingPayments = useMemo( + () => + paymentsArray + .map((action) => searchStreamingPayments(action, members, searchFilter)) + .filter(notNull), + [paymentsArray, searchFilter, members], + ); + + const filteredActions = searchedStreamingPayments + .map((action) => filterByActionStatus(action, activeFilters.statuses)) + .filter(notNull) + .map((action) => filterByEndCondition(action, activeFilters.endConditions)) + .filter(notNull); + + const sortedActions = useMemo( + () => sortStreamingPayments(filteredActions, activeFilters), + [filteredActions, activeFilters], + ); + + return { + items: sortedActions, + loading, + refetch, + }; +}; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/ActiveFiltersList/ActiveFiltersList.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/ActiveFiltersList/ActiveFiltersList.tsx new file mode 100644 index 00000000000..f01145424d6 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/ActiveFiltersList/ActiveFiltersList.tsx @@ -0,0 +1,32 @@ +import { X } from '@phosphor-icons/react'; +import React, { type FC } from 'react'; + +import { useActiveFilters } from './hooks.ts'; + +const ActiveFiltersList: FC = () => { + const { activeFiltersToDisplay, handleResetFilters } = useActiveFilters(); + + return ( +
    + {activeFiltersToDisplay.map(({ filter, items, label }) => ( +
  • +
    +
    + {label}:{' '} + {items.join(', ')} +
    + +
    +
  • + ))} +
+ ); +}; + +export default ActiveFiltersList; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/ActiveFiltersList/hooks.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/ActiveFiltersList/hooks.ts new file mode 100644 index 00000000000..0d919679c2b --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/ActiveFiltersList/hooks.ts @@ -0,0 +1,122 @@ +import { useMemo } from 'react'; + +import { useStreamingFiltersContext } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts'; +import { FiltersValues } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/types.ts'; +import { formatText } from '~utils/intl.ts'; + +import { DATE_FILTERS } from '../StreamingPaymentFilters/partials/DateFilters/consts.ts'; +import { END_CONDITION_FILTERS } from '../StreamingPaymentFilters/partials/EndConditionFilters/consts.ts'; +import { STATUS_FILTERS } from '../StreamingPaymentFilters/partials/StatusFilters/consts.ts'; +import { useGetTokenTypeFilters } from '../StreamingPaymentFilters/partials/TokenFilters/hooks.ts'; +import { TOTAL_STREAMED_FILTERS } from '../StreamingPaymentFilters/partials/TotalStreamedFilters/consts.ts'; +import { getCustomDateLabel } from '../StreamingPaymentFilters/utils.ts'; + +export const useActiveFilters = () => { + const { + statuses, + handleResetFilters, + dateFilters, + endConditions, + tokenTypes, + totalStreamedFilters, + } = useStreamingFiltersContext(); + + const tokenTypesFilters = useGetTokenTypeFilters(); + const tokenItems = tokenTypesFilters.map(({ token }) => ({ + symbol: token.symbol, + name: token?.tokenAddress || '', + })); + + const activeFiltersToDisplay = useMemo(() => { + const customDate = getCustomDateLabel(dateFilters.custom); + const restDateFilters = DATE_FILTERS.filter( + ({ name }) => dateFilters[name], + ).map(({ label }) => label); + + return [ + ...(statuses.length + ? [ + { + filter: FiltersValues.Status, + label: formatText({ + id: 'streamingPayment.table.filter.status', + }), + items: STATUS_FILTERS.filter(({ name }) => + statuses.includes(name), + ).map(({ label }) => label), + }, + ] + : []), + ...(endConditions.length + ? [ + { + filter: FiltersValues.EndCondition, + label: formatText({ + id: 'streamingPayment.table.filter.endCondition', + }), + items: END_CONDITION_FILTERS.filter(({ name }) => + endConditions.includes(name), + ).map(({ label }) => label), + }, + ] + : []), + ...(totalStreamedFilters && totalStreamedFilters.length + ? [ + { + filter: FiltersValues.TotalStreamedFilters, + label: formatText({ + id: 'streamingPayment.table.filter.totalStreamed', + }), + items: TOTAL_STREAMED_FILTERS.filter(({ name }) => + totalStreamedFilters.includes(name), + ).map(({ label }) => label), + }, + ] + : []), + ...(Object.values(tokenTypes).some((value) => value === true) + ? [ + { + filter: FiltersValues.TokenType, + label: formatText({ + id: 'streamingPayment.table.filter.tokenType', + }), + items: tokenItems + .filter(({ name }) => tokenTypes[name]) + .map(({ symbol }) => symbol), + }, + ] + : []), + ...(dateFilters.custom && customDate + ? [ + { + filter: FiltersValues.Custom, + label: formatText({ + id: 'streamingPayment.table.filter.date.custom', + }), + items: [customDate], + }, + ] + : []), + ...(restDateFilters.length + ? [ + { + filter: FiltersValues.Date, + label: formatText({ + id: 'streamingPayment.table.filter.date', + }), + items: restDateFilters, + }, + ] + : []), + ]; + }, [ + dateFilters, + endConditions, + statuses, + tokenItems, + tokenTypes, + totalStreamedFilters, + ]); + + return { activeFiltersToDisplay, handleResetFilters }; +}; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/StreamingPaymentFilters.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/StreamingPaymentFilters.tsx new file mode 100644 index 00000000000..af9d559dac3 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/StreamingPaymentFilters.tsx @@ -0,0 +1,150 @@ +import { MagnifyingGlass } from '@phosphor-icons/react'; +import clsx from 'clsx'; +import React, { useState, type FC } from 'react'; +import { usePopperTooltip } from 'react-popper-tooltip'; + +import { useStreamingFiltersContext } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts'; +import { useMobile } from '~hooks/index.ts'; +import { formatText } from '~utils/intl.ts'; +import SearchInput from '~v5/common/Filter/partials/SearchInput/index.ts'; +import Button from '~v5/shared/Button/Button.tsx'; +import FilterButton from '~v5/shared/Filter/FilterButton.tsx'; +import Modal from '~v5/shared/Modal/index.ts'; +import PopoverBase from '~v5/shared/PopoverBase/index.ts'; + +import ActiveFiltersList from '../ActiveFiltersList/ActiveFiltersList.tsx'; +import StreamingPaymentFiltersItem from '../StreamingPaymentPageFiltersItem/StreamingPaymentPageFiltersItem.tsx'; + +import { filterItems, sortItems } from './consts.tsx'; + +const StreamingPaymentPageFilters: FC = () => { + const { searchFilter, setSearchFilter, selectedFiltersCount } = + useStreamingFiltersContext(); + const [isOpened, setOpened] = useState(false); + const [isSearchOpened, setIsSearchOpened] = useState(false); + const isMobile = useMobile(); + const { getTooltipProps, setTooltipRef, setTriggerRef, visible } = + usePopperTooltip({ + delayShow: 200, + delayHide: 200, + placement: 'bottom-start', + trigger: 'click', + interactive: true, + }); + + const SearchInputComponent = ( + setIsSearchOpened(false)} + searchValue={searchFilter} + setSearchValue={setSearchFilter} + searchInputPlaceholder={formatText({ + id: 'streamingPayment.table.filter.searchPlaceholder', + })} + /> + ); + const FiltersContent = ( +
+

+ {formatText({ id: isMobile ? 'filterAndSort' : 'filters' })} +

+
    + {filterItems.map(({ icon, label, children }) => ( +
  • + + {children} + +
  • + ))} +
  • +

    + {formatText({ id: 'streamingPayment.table.filter.sortBy' })} +

    +
  • + {sortItems.map(({ icon, label, children }) => ( +
  • + + {children} + +
  • + ))} +
+
+ ); + + return ( + <> + {isMobile ? ( +
+ setOpened(!isOpened)} + numberSelectedFilters={selectedFiltersCount} + customLabel={formatText({ id: 'allFilters' })} + /> + + setOpened(false)} + isOpen={isOpened} + > + {FiltersContent} + + setIsSearchOpened(false)} + isOpen={isSearchOpened} + > +

+ {formatText({ + id: 'streamingPayment.table.filter.searchPlaceholder', + })} +

+
{SearchInputComponent}
+
+
+ ) : ( + <> +
+ + +
+ {visible && ( + +
{SearchInputComponent}
+ {FiltersContent} +
+ )} + + )} + + ); +}; + +export default StreamingPaymentPageFilters; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/consts.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/consts.tsx new file mode 100644 index 00000000000..cf355620886 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/consts.tsx @@ -0,0 +1,52 @@ +import { + Calendar, + CalendarBlank, + ClockCountdown, + CoinVertical, + Vignette, +} from '@phosphor-icons/react'; +import React from 'react'; + +import { formatText } from '~utils/intl.ts'; + +import DateFilters from './partials/DateFilters/DateFilters.tsx'; +import EndConditionFilters from './partials/EndConditionFilters/EndConditionFilters.tsx'; +import StatusFilters from './partials/StatusFilters/StatusFilters.tsx'; +import TokenFilters from './partials/TokenFilters/TokenFilters.tsx'; +import TotalStreamedFilters from './partials/TotalStreamedFilters/TotalStreamedFilters.tsx'; + +export const filterItems = [ + { + icon: ClockCountdown, + label: formatText({ id: 'streamingPayment.table.filter.status' }), + name: 'status', + children: , + }, + { + icon: CalendarBlank, + label: formatText({ id: 'streamingPayment.table.filter.endCondition' }), + name: 'endCondition', + children: , + }, + { + icon: CoinVertical, + label: formatText({ id: 'streamingPayment.table.filter.tokenType' }), + name: 'endCondition', + children: , + }, + { + icon: Calendar, + label: formatText({ id: 'streamingPayment.table.filter.date' }), + name: 'date', + children: , + }, +]; + +export const sortItems = [ + { + icon: Vignette, + label: formatText({ id: 'streamingPayment.table.filter.totalStreamed' }), + name: 'totalStreamed', + children: , + }, +]; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/DateFilters.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/DateFilters.tsx new file mode 100644 index 00000000000..43962b1e1e4 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/DateFilters.tsx @@ -0,0 +1,62 @@ +import clsx from 'clsx'; +import React, { type FC } from 'react'; + +import { useStreamingFiltersContext } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts'; +import { useMobile } from '~hooks'; +import { formatText } from '~utils/intl.ts'; +import Checkbox from '~v5/common/Checkbox/index.ts'; +import RangeDatepicker from '~v5/common/Fields/datepickers/RangeDatepicker/index.ts'; + +import { DATE_FILTERS } from './consts.ts'; + +const DateFilters: FC = () => { + const isMobile = useMobile(); + const { dateFilters, handleCustomDateFilterChange, handleDateFilterChange } = + useStreamingFiltersContext(); + + const [startDate, endDate] = dateFilters.custom || []; + + return ( +
+
+ {formatText({ id: 'streamingPayment.table.filters.date' })} +
+
    + {DATE_FILTERS.map(({ label, name }) => { + const isChecked = dateFilters[name]; + + return ( +
  • + + {label} + +
  • + ); + })} +
+
+ {formatText({ id: 'streamingPayment.table.filter.date.custom' })} +
+
+ +
+
+ ); +}; + +export default DateFilters; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/consts.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/consts.ts new file mode 100644 index 00000000000..808e11eeed1 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/consts.ts @@ -0,0 +1,26 @@ +import { formatText } from '~utils/intl.ts'; + +export const DATE_FILTERS = [ + { + label: formatText({ + id: 'streamingPayment.table.filter.date.pastHour', + }), + name: 'pastHour', + }, + { + label: formatText({ id: 'streamingPayment.table.filter.date.pastDay' }), + name: 'pastDay', + }, + { + label: formatText({ + id: 'streamingPayment.table.filter.date.pastWeek', + }), + name: 'pastWeek', + }, + { + label: formatText({ + id: 'streamingPayment.table.filter.date.pastMonth', + }), + name: 'pastMonth', + }, +]; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/EndConditionFilters/EndConditionFilters.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/EndConditionFilters/EndConditionFilters.tsx new file mode 100644 index 00000000000..08a42ca8697 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/EndConditionFilters/EndConditionFilters.tsx @@ -0,0 +1,40 @@ +import React, { type FC } from 'react'; + +import { useStreamingFiltersContext } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts'; +import { formatText } from '~utils/intl.ts'; +import Checkbox from '~v5/common/Checkbox/index.ts'; + +import { END_CONDITION_FILTERS } from './consts.ts'; + +const ActiveStatusFilters: FC = () => { + const { endConditions, handleEndConditionsFilterChange } = + useStreamingFiltersContext(); + + return ( +
+
+ {formatText({ id: 'streamingPayment.table.filter.endCondition' })} +
+
    + {END_CONDITION_FILTERS.map(({ label, name }) => { + const isChecked = endConditions.includes(name); + + return ( +
  • + + {label} + +
  • + ); + })} +
+
+ ); +}; + +export default ActiveStatusFilters; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/EndConditionFilters/consts.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/EndConditionFilters/consts.ts new file mode 100644 index 00000000000..2e52ef5a323 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/EndConditionFilters/consts.ts @@ -0,0 +1,17 @@ +import { StreamingPaymentEndCondition } from '~gql'; +import { formatText } from '~utils/intl.ts'; + +export const END_CONDITION_FILTERS = [ + { + label: formatText({ id: 'streamingPayment.table.filter.whenCancelled' }), + name: StreamingPaymentEndCondition.WhenCancelled, + }, + { + label: formatText({ id: 'streamingPayment.table.filter.fixedDate' }), + name: StreamingPaymentEndCondition.FixedTime, + }, + { + label: formatText({ id: 'streamingPayment.table.filter.limitReached' }), + name: StreamingPaymentEndCondition.LimitReached, + }, +]; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/StatusFilters/StatusFilters.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/StatusFilters/StatusFilters.tsx new file mode 100644 index 00000000000..003ba219a53 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/StatusFilters/StatusFilters.tsx @@ -0,0 +1,39 @@ +import React, { type FC } from 'react'; + +import { useStreamingFiltersContext } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts'; +import { formatText } from '~utils/intl.ts'; +import Checkbox from '~v5/common/Checkbox/index.ts'; + +import { STATUS_FILTERS } from './consts.ts'; + +const StatusFilters: FC = () => { + const { statuses, handleStatusesFilterChange } = useStreamingFiltersContext(); + + return ( +
+
+ {formatText({ id: 'streamingPayment.table.filter.status' })} +
+
    + {STATUS_FILTERS.map(({ label, name }) => { + const isChecked = statuses.includes(name); + + return ( +
  • + + {label} + +
  • + ); + })} +
+
+ ); +}; + +export default StatusFilters; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/StatusFilters/consts.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/StatusFilters/consts.ts new file mode 100644 index 00000000000..f02b60970ce --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/StatusFilters/consts.ts @@ -0,0 +1,25 @@ +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; +import { formatText } from '~utils/intl.ts'; + +export const STATUS_FILTERS = [ + { + label: formatText({ id: 'streamingPayment.status.active' }), + name: StreamingPaymentStatus.Active, + }, + { + label: formatText({ id: 'streamingPayment.status.ended' }), + name: StreamingPaymentStatus.Ended, + }, + { + label: formatText({ id: 'streamingPayment.status.limitReached' }), + name: StreamingPaymentStatus.LimitReached, + }, + { + label: formatText({ id: 'streamingPayment.status.cancelled' }), + name: StreamingPaymentStatus.Cancelled, + }, + { + label: formatText({ id: 'streamingPayment.status.notStarted' }), + name: StreamingPaymentStatus.NotStarted, + }, +]; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TokenFilters/TokenFilters.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TokenFilters/TokenFilters.tsx new file mode 100644 index 00000000000..85f771e9685 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TokenFilters/TokenFilters.tsx @@ -0,0 +1,52 @@ +import React, { type FC } from 'react'; + +import { useStreamingFiltersContext } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts'; +import { formatText } from '~utils/intl.ts'; +import { multiLineTextEllipsis } from '~utils/strings.ts'; +import Checkbox from '~v5/common/Checkbox/index.ts'; +import { TokenAvatar } from '~v5/shared/TokenAvatar/TokenAvatar.tsx'; + +import { useGetTokenTypeFilters } from './hooks.ts'; + +const TokenFilters: FC = () => { + const { tokenTypes, handleTokenTypesFilterChange } = + useStreamingFiltersContext(); + const tokenTypesFilters = useGetTokenTypeFilters(); + + return ( +
+
+ {formatText({ id: 'balancePage.filter.approvedTokenTypes' })} +
+
    + {tokenTypesFilters.map(({ token }) => { + const name = token?.tokenAddress || ''; + const isChecked = tokenTypes[name]; + + return ( +
  • + +
    + + {multiLineTextEllipsis(token.symbol, 5)} +
    +
    +
  • + ); + })} +
+
+ ); +}; + +export default TokenFilters; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TokenFilters/hooks.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TokenFilters/hooks.ts new file mode 100644 index 00000000000..c9753506923 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TokenFilters/hooks.ts @@ -0,0 +1,20 @@ +import { useMemo } from 'react'; + +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { notNull } from '~utils/arrays/index.ts'; + +export const useGetTokenTypeFilters = () => { + const { colony } = useColonyContext(); + + return useMemo( + () => + colony.tokens?.items.filter(notNull).sort((a, b) => { + if (!a.token || !b.token) return 0; + + return a.token.name + .toLowerCase() + .localeCompare(b.token.name.toLowerCase()); + }) || [], + [colony.tokens?.items], + ); +}; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TotalStreamedFilters/TotalStreamedFilters.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TotalStreamedFilters/TotalStreamedFilters.tsx new file mode 100644 index 00000000000..15c536097e4 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TotalStreamedFilters/TotalStreamedFilters.tsx @@ -0,0 +1,42 @@ +import React, { type FC } from 'react'; + +import { useStreamingFiltersContext } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/StreamingFiltersContext.ts'; +import { formatText } from '~utils/intl.ts'; +import Checkbox from '~v5/common/Checkbox/index.ts'; + +import { TOTAL_STREAMED_FILTERS } from './consts.ts'; + +const TotalStreamedFilters: FC = () => { + const { totalStreamedFilters, handleTotalStreamedFilterChange } = + useStreamingFiltersContext(); + + return ( +
+
+ {formatText({ id: 'streamingPayment.table.filter.status' })} +
+
    + {TOTAL_STREAMED_FILTERS.map(({ label, name }) => { + const isChecked = totalStreamedFilters + ? totalStreamedFilters.includes(name) + : false; + + return ( +
  • + + {label} + +
  • + ); + })} +
+
+ ); +}; + +export default TotalStreamedFilters; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TotalStreamedFilters/consts.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TotalStreamedFilters/consts.ts new file mode 100644 index 00000000000..2744493156c --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/TotalStreamedFilters/consts.ts @@ -0,0 +1,13 @@ +import { ModelSortDirection } from '~gql'; +import { formatText } from '~utils/intl.ts'; + +export const TOTAL_STREAMED_FILTERS = [ + { + label: formatText({ id: 'streamingPayment.table.filter.descending' }), + name: ModelSortDirection.Desc, + }, + { + label: formatText({ id: 'streamingPayment.table.filter.ascending' }), + name: ModelSortDirection.Asc, + }, +]; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/types.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/types.ts new file mode 100644 index 00000000000..a9989407816 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/types.ts @@ -0,0 +1,25 @@ +import { type TokenTypes } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/FiltersContext/types.ts'; +import { + type ModelSortDirection, + type StreamingPaymentEndCondition, +} from '~gql'; +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; + +export interface StreamingPaymentFilters { + statuses?: StreamingPaymentStatus[]; + dateFrom?: Date; + dateTo?: Date; + search?: string; + tokenTypes?: TokenTypes; + endConditions?: StreamingPaymentEndCondition[]; + totalStreamedFilters?: ModelSortDirection | undefined; +} + +export interface DateOptions { + pastHour: boolean; + pastDay: boolean; + pastWeek: boolean; + pastMonth: boolean; + pastYear: boolean; + custom?: [string, string]; +} diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/utils.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/utils.ts new file mode 100644 index 00000000000..61583944100 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/utils.ts @@ -0,0 +1,82 @@ +import sub from 'date-fns/sub'; + +import { getFormattedDateFrom } from '~utils/getFormattedDateFrom.ts'; + +import { type StreamingPaymentFilters, type DateOptions } from './types.ts'; + +export const getDateFilter = ( + dateFilter: DateOptions | undefined, +): Pick | undefined => { + if (!dateFilter) { + return undefined; + } + + const now = new Date(); + const baseFilter = { + dateTo: now, + }; + + switch (true) { + case !!dateFilter.custom: { + const filteredDates = dateFilter.custom?.filter( + (date): date is string => !!date, + ); + + if (!filteredDates) { + return undefined; + } + + const [from, to] = filteredDates; + + return { + dateFrom: new Date(from), + dateTo: new Date(to), + }; + } + case dateFilter.pastYear: { + return { + dateFrom: sub(now, { years: 1 }), + ...baseFilter, + }; + } + case dateFilter.pastMonth: { + return { + dateFrom: sub(now, { months: 1 }), + ...baseFilter, + }; + } + case dateFilter.pastWeek: { + return { + dateFrom: sub(now, { weeks: 1 }), + ...baseFilter, + }; + } + case dateFilter.pastDay: { + return { + dateFrom: sub(now, { days: 1 }), + ...baseFilter, + }; + } + case dateFilter.pastHour: { + return { + dateFrom: sub(now, { hours: 1 }), + ...baseFilter, + }; + } + default: { + return undefined; + } + } +}; + +export const getCustomDateLabel = (dateRange?: DateOptions['custom']) => { + const [startDateString, endDateString] = dateRange || []; + if (!startDateString || !endDateString) { + return null; + } + + const startDate = new Date(startDateString); + const endDate = new Date(endDateString); + + return `${getFormattedDateFrom(startDate)} - ${getFormattedDateFrom(endDate)}`; +}; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentPageFiltersItem/StreamingPaymentPageFiltersItem.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentPageFiltersItem/StreamingPaymentPageFiltersItem.tsx new file mode 100644 index 00000000000..02a6d3abcae --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentPageFiltersItem/StreamingPaymentPageFiltersItem.tsx @@ -0,0 +1,92 @@ +import { CaretDown } from '@phosphor-icons/react'; +import clsx from 'clsx'; +import { AnimatePresence, motion } from 'framer-motion'; +import React, { type FC } from 'react'; +import { usePopperTooltip } from 'react-popper-tooltip'; + +import { accordionAnimation } from '~constants/accordionAnimation.ts'; +import { useMobile } from '~hooks'; +import useToggle from '~hooks/useToggle/index.ts'; +import PopoverBase from '~v5/shared/PopoverBase/index.ts'; + +import { type StreamingPaymentPageFiltersItemProps } from './types.ts'; + +const StreamingPaymentPageFiltersItem: FC< + StreamingPaymentPageFiltersItemProps +> = ({ icon: Icon, label, children }) => { + const isMobile = useMobile(); + const [isOpen, { toggle }] = useToggle({ defaultToggleState: true }); + const { getTooltipProps, setTooltipRef, setTriggerRef, visible } = + usePopperTooltip({ + delayShow: 200, + delayHide: 200, + placement: 'left-start', + interactive: true, + offset: [0, 16], + trigger: 'hover', + }); + + return isMobile ? ( +
+ + + {isOpen && ( + +
{children}
+
+ )} +
+
+ ) : ( +
+ + {visible && ( + + {children} + + )} +
+ ); +}; + +export default StreamingPaymentPageFiltersItem; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentPageFiltersItem/types.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentPageFiltersItem/types.ts new file mode 100644 index 00000000000..f05a86cb786 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentPageFiltersItem/types.ts @@ -0,0 +1,8 @@ +import { type IconProps } from '@phosphor-icons/react'; +import { type ComponentType } from 'react'; + +export interface StreamingPaymentPageFiltersItemProps { + icon: ComponentType; + label: string; + children: React.ReactNode; +} diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserField/UserField.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserField/UserField.tsx new file mode 100644 index 00000000000..c66c3ff5d92 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserField/UserField.tsx @@ -0,0 +1,48 @@ +import React, { type FC } from 'react'; + +import useUserByAddress from '~hooks/useUserByAddress.ts'; +import UserAvatar from '~v5/shared/UserAvatar/UserAvatar.tsx'; + +const displayName = + 'pages.StreamingPaymentsPage.partials.StreamingPaymentsTable.partials.UserField'; + +interface UserFieldProps { + address: string; + isLoading: boolean; + toggleExpanded: (expanded?: boolean | undefined) => void; +} + +const UserField: FC = ({ + address, + isLoading, + toggleExpanded, +}) => { + const { user, loading: isUserLoading } = useUserByAddress(address, true); + + return isUserLoading || isLoading ? ( +
+
+
+
+ ) : ( + + ); +}; + +UserField.displayName = displayName; + +export default UserField; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserStreams/UserStreams.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserStreams/UserStreams.tsx new file mode 100644 index 00000000000..5654c73ad0a --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserStreams/UserStreams.tsx @@ -0,0 +1,141 @@ +import Decimal from 'decimal.js'; +import React, { + useCallback, + type FC, + useState, + useEffect, + useMemo, +} from 'react'; + +import { calculateToCurrency } from '~common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts'; +import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; +import { useCurrencyContext } from '~context/CurrencyContext/CurrencyContext.ts'; +import Tooltip from '~shared/Extensions/Tooltip/Tooltip.tsx'; +import Numeral from '~shared/Numeral/Numeral.tsx'; +import { NumeralCurrency } from '~shared/Numeral/NumeralCurrency.tsx'; + +export interface UserStreamsItem { + amount: string; + tokenDecimals: number; + tokenSymbol: string; +} + +interface UserStreamsProps { + items: { + [tokenAddress: string]: UserStreamsItem; + }; + toggleExpanded: (expanded?: boolean | undefined) => void; +} + +const UserStreams: FC = ({ items, toggleExpanded }) => { + const { currency } = useCurrencyContext(); + const { colony } = useColonyContext(); + const [calculatedAmountPerToken, setCalculatedAmountPerToken] = useState<{ + [tokenAddress: string]: Decimal; + }>({}); + const tokenTotals = useMemo( + () => + Object.entries(items).map(([tokenAddress, item]) => ({ + ...item, + tokenAddress, + })), + [items], + ); + + const calculateFunds = useCallback(async () => { + const accumulatedAmounts: { [tokenAddress: string]: Decimal } = {}; + + const calculationPromises = tokenTotals.map( + async ({ amount, tokenAddress }) => { + const calculatedAmount = await calculateToCurrency({ + amount, + tokenAddress, + currency, + colony, + }); + + if (accumulatedAmounts[tokenAddress]) { + accumulatedAmounts[tokenAddress] = accumulatedAmounts[ + tokenAddress + ].plus(calculatedAmount || new Decimal(0)); + } else { + accumulatedAmounts[tokenAddress] = calculatedAmount || new Decimal(0); + } + }, + ); + + await Promise.all(calculationPromises); + + setCalculatedAmountPerToken(accumulatedAmounts); + }, [colony, currency, tokenTotals]); + + useEffect(() => { + calculateFunds(); + }, [calculateFunds]); + + const calculatedAmountArray = Object.entries(calculatedAmountPerToken).map( + ([tokenAddress, amount]) => ({ tokenAddress, amount }), + ); + + const totalFunds = calculatedAmountArray.reduce( + (acc, { amount }) => acc.plus(amount || 0), + new Decimal(0), + ); + const shouldShowTooltip = calculatedAmountArray.length > 0; + const content = ( +
+ {currency} {' /month'} +
+ ); + + return totalFunds ? ( + <> + {shouldShowTooltip ? ( +
+ } + > + {content} + + + ) : ( + + )} + + ) : ( +
+ ); +}; + +export default UserStreams; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/types.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/types.ts new file mode 100644 index 00000000000..3de9d3578fb --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/types.ts @@ -0,0 +1,31 @@ +import { type StreamingPaymentEndCondition } from '~gql'; +import { type StreamingPayment } from '~types/graphql.ts'; +import { type StreamingPaymentStatus } from '~types/streamingPayments.ts'; + +import { type UserStreamsItem } from './partials/UserStreams/UserStreams.ts'; + +export interface StreamingPaymentItem { + [user: string]: { + tokenTotalsPerMonth: { + [token: string]: UserStreamsItem; + }; + actions: StreamingActionTableFieldModel[]; + }; +} + +export interface StreamingTableFieldModel { + user: string; + tokenTotalsPerMonth: { + [token: string]: UserStreamsItem; + }; + actions: StreamingActionTableFieldModel[]; +} + +export interface StreamingActionTableFieldModel extends StreamingPayment { + title: string; + paymentId: string; + transactionId: string; + status: StreamingPaymentStatus; + endCondition?: StreamingPaymentEndCondition; + totalStreamedAmount: string; +} diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/useRenderSubComponent.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/useRenderSubComponent.tsx new file mode 100644 index 00000000000..b2ee70fd3be --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/useRenderSubComponent.tsx @@ -0,0 +1,12 @@ +import { type Row } from '@tanstack/react-table'; +import React from 'react'; + +import StreamingActionsTable from '../StreamingActionsTable/StreamingActionsTable.tsx'; + +import { type StreamingTableFieldModel } from './types.ts'; + +export const useRenderSubComponent = (loading: boolean) => { + return ({ row }: { row: Row }) => ( + + ); +}; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/utils.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/utils.ts new file mode 100644 index 00000000000..e10837f9dc9 --- /dev/null +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/utils.ts @@ -0,0 +1,141 @@ +import { BigNumber } from 'ethers'; + +import { ModelSortDirection, type StreamingPaymentEndCondition } from '~gql'; +import { type ColonyContributor } from '~types/graphql.ts'; +import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; + +import { type StreamingPaymentFilters } from './partials/StreamingPaymentFilters/types.ts'; +import { type StreamingTableFieldModel } from './types.ts'; + +export const searchStreamingPayments = ( + streamingPayment: StreamingTableFieldModel, + members: ColonyContributor[], + searchValue?: string, +): StreamingTableFieldModel | null => { + if (!searchValue) { + return streamingPayment; + } + + const searchedMembers = members.filter( + (member) => + member.user?.profile?.displayName + ?.toLowerCase() + .startsWith(searchValue.toLowerCase()) || + member.contributorAddress.startsWith(searchValue), + ); + + const member = searchedMembers.find( + (searchedMember) => + searchedMember.contributorAddress === streamingPayment.user, + ); + const filteredActions = streamingPayment.actions.filter((action) => + action.title.toLowerCase().startsWith(searchValue.toLowerCase()), + ); + + if (member) { + return { + user: streamingPayment.user, + tokenTotalsPerMonth: streamingPayment.tokenTotalsPerMonth, + actions: streamingPayment.actions, + }; + } + + if (filteredActions.length > 0) { + return { + user: streamingPayment.user, + tokenTotalsPerMonth: streamingPayment.tokenTotalsPerMonth, + actions: filteredActions, + }; + } + + return null; +}; + +export const filterByActionStatus = ( + action: StreamingTableFieldModel, + statuses?: StreamingPaymentStatus[], +): StreamingTableFieldModel | null => { + if (!statuses) { + return action; + } + + const filteredActions = action.actions.filter((actionItem) => + statuses.includes(actionItem.status), + ); + + if (filteredActions.length > 0) { + return { + user: action.user, + tokenTotalsPerMonth: action.tokenTotalsPerMonth, + actions: filteredActions, + }; + } + + return null; +}; + +export const filterByEndCondition = ( + action: StreamingTableFieldModel, + endConditions?: StreamingPaymentEndCondition[], +): StreamingTableFieldModel | null => { + if (!endConditions) { + return action; + } + + const filteredActions = action.actions.filter((actionItem) => { + const { endCondition } = actionItem || {}; + + if (!endCondition) { + return false; + } + + return endConditions.includes(endCondition); + }); + + if (filteredActions.length > 0) { + return { + ...action, + actions: filteredActions, + }; + } + + return null; +}; + +export const sortStreamingPayments = ( + actions: StreamingTableFieldModel[], + activeFilters: StreamingPaymentFilters, +) => + actions.sort((a, b) => { + const totalStreamedFilter = activeFilters.totalStreamedFilters; + + if (totalStreamedFilter) { + const aTotalStreamed = a.actions.reduce( + (acc, { totalStreamedAmount }) => + acc.add(BigNumber.from(totalStreamedAmount)), + BigNumber.from(0), + ); + const bTotalStreamed = b.actions.reduce( + (acc, { totalStreamedAmount }) => + acc.add(BigNumber.from(totalStreamedAmount)), + BigNumber.from(0), + ); + + if (totalStreamedFilter === ModelSortDirection.Asc) { + return aTotalStreamed.lt(bTotalStreamed) ? -1 : 1; + } + return aTotalStreamed.gt(bTotalStreamed) ? -1 : 1; + } + + const aHasActive = a.actions.some( + (action) => action.status === StreamingPaymentStatus.Active, + ); + const bHasActive = b.actions.some( + (action) => action.status === StreamingPaymentStatus.Active, + ); + + if (aHasActive === bHasActive) { + return 0; + } + return aHasActive ? -1 : 1; + }); diff --git a/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts index 5628f83ea43..55b2da4d239 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts @@ -15,7 +15,7 @@ export const useGetStreamingPaymentData = ( variables: { streamingPaymentId: streamingPaymentId || '', }, - skip: !streamingPaymentId, + skip: Number.isNaN(streamingPaymentId) || !streamingPaymentId, fetchPolicy: 'cache-and-network', pollInterval, }); diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx index 594f653187b..3765947b685 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/StreamingPayment.tsx @@ -1,3 +1,4 @@ +import { useApolloClient } from '@apollo/client'; import { ColonyRole } from '@colony/colony-js'; import { Calendar, @@ -26,6 +27,7 @@ import { useAppContext } from '~context/AppContext/AppContext.ts'; import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; import { ColonyActionType, + SearchStreamingPaymentsDocument, StreamingPaymentEndCondition, useGetUserByAddressQuery, } from '~gql'; @@ -41,6 +43,7 @@ import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; import { addressHasRoles } from '~utils/checks/userHasRoles.ts'; import { findDomainByNativeId } from '~utils/domains.ts'; import { formatText } from '~utils/intl.ts'; +import { isQueryActive } from '~utils/isQueryActive.ts'; import { getAmountPerValue, getStreamingPaymentLimit, @@ -125,6 +128,15 @@ const StreamingPayment: FC = ({ action }) => { const recipientName = recipentData?.getUserByAddress?.items[0]?.profile?.displayName ?? ''; + const client = useApolloClient(); + + useEffect(() => { + if (isQueryActive('SearchStreamingPayments')) { + client.refetchQueries({ + include: [SearchStreamingPaymentsDocument], + }); + } + }, [client]); useEffect(() => { if (expectedActionStatus && expectedActionStatus !== actionStatus) { diff --git a/src/components/v5/common/Fields/datepickers/RangeDatepicker/RangeDatepicker.tsx b/src/components/v5/common/Fields/datepickers/RangeDatepicker/RangeDatepicker.tsx index 6b52d0943ee..04c383be8dc 100644 --- a/src/components/v5/common/Fields/datepickers/RangeDatepicker/RangeDatepicker.tsx +++ b/src/components/v5/common/Fields/datepickers/RangeDatepicker/RangeDatepicker.tsx @@ -31,6 +31,7 @@ const RangeDatepicker: FC = ({ popperClassName, minYear, maxYear, + withoutButtons, ...rest }) => { const isMobile = useMobile(); @@ -118,13 +119,18 @@ const RangeDatepicker: FC = ({ const formattedEndDate = end ? addDays(subSeconds(end, 1), 1) : null; setStartDate(start); setEndDate(formattedEndDate); + + if (withoutButtons && start && formattedEndDate) { + onChange([start, formattedEndDate], undefined); + calendarRef.current?.setOpen(false); + } }} startDate={startDate} endDate={endDate} onClickOutside={resetValues} {...rest} > - {startDate && endDate && ( + {startDate && endDate && !withoutButtons && (
- ), - itemsPerPage: 5, - }} - initialState={{ - pagination: { - pageSize: 1000000, + overrides={{ + enableSorting: true, + initialState: { + pagination: { + pageIndex: 0, + pageSize: 1000000, + }, }, + state: { + sorting, + columnVisibility: isMobile + ? { + title: true, + streamed: true, + token: true, + team: false, + status: false, + [MEATBALL_MENU_COLUMN_ID]: false, + } + : { + expander: false, + }, + }, + getRowId: (row) => row.transactionId, + onSortingChange: setSorting, + getPaginationRowModel: getPaginationRowModel(), }} - hidePagination - state={{ - sorting, - columnVisibility: isMobile - ? { - title: true, - streamed: true, - token: true, - team: false, - status: false, - [MEATBALL_MENU_COLUMN_ID]: false, - } - : { - expander: false, - }, + pagination={{ + visible: false, + }} + rows={{ + canExpand: () => true, + renderSubComponent, }} - getRowId={(row) => row.transactionId} - getMenuProps={getMenuProps} - onSortingChange={setSorting} - getSortedRowModel={getSortedRowModel()} - getPaginationRowModel={getPaginationRowModel()} - renderSubComponent={renderSubComponent} + // loadMoreProps={{ + // renderContent: (loadMore) => ( + // + // ), + // itemsPerPage: 5, + // }} tableClassName="border-none" /> ); diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx index e67edf46ab4..b41886849ea 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx @@ -29,13 +29,20 @@ const StreamingPaymentsTable = () => { data={loading ? Array(4).fill({}) : items} columns={columns} renderCellWrapper={(_, content) => content} - renderSubComponent={renderSubComponent} - paginationDisabled={loading} - showTotalPagesNumber={false} - getPaginationRowModel={getPaginationRowModel()} - initialState={{ - pagination: { - pageSize: 10, + rows={{ + canExpand: () => true, + renderSubComponent, + }} + pagination={{ + disabled: loading, + }} + overrides={{ + getPaginationRowModel: getPaginationRowModel(), + initialState: { + pagination: { + pageSize: 10, + pageIndex: 0, + }, }, }} emptyContent={ diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/StreamingPaymentFilters.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/StreamingPaymentFilters.tsx index af9d559dac3..ecac6dc57c4 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/StreamingPaymentFilters.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/StreamingPaymentFilters.tsx @@ -135,7 +135,7 @@ const StreamingPaymentPageFilters: FC = () => { hasShadow: true, className: 'pt-6 pb-4 px-2', }} - classNames="sm:min-w-[20.375rem]" + className="sm:min-w-[20.375rem]" >
{SearchInputComponent}
{FiltersContent} diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/DateFilters.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/DateFilters.tsx index 43962b1e1e4..275dedb2655 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/DateFilters.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/partials/DateFilters/DateFilters.tsx @@ -28,7 +28,7 @@ const DateFilters: FC = () => { return (
  • { return (
  • { return (
  • { return (
  • { return (
  • {children} From 932f3fb0500b47ff9bbae9fda2bd822ad688ddcf Mon Sep 17 00:00:00 2001 From: Cezary Dryl Date: Thu, 23 Jan 2025 19:45:17 +0100 Subject: [PATCH 106/126] fix: add load more --- .../StreamingPaymentsPage.tsx | 40 +++++++++++++++++++ .../StreamingActionsTable.tsx | 36 ++++++++++------- .../TableLayout/HorizontalTableLayout.tsx | 25 +++++++++++- src/components/v5/common/Table/types.ts | 5 +++ 4 files changed, 90 insertions(+), 16 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx index 28083205cca..ae86f4030f8 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -1,21 +1,41 @@ import React from 'react'; +import { defineMessages } from 'react-intl'; +import { Action } from '~constants/actions.ts'; import { currencySymbolMap } from '~constants/currency.ts'; +import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; import { useSetPageHeadingTitle } from '~context/PageHeadingContext/PageHeadingContext.ts'; import useGetSelectedDomainFilter from '~hooks/useGetSelectedDomainFilter.tsx'; import { useStreamingPaymentsTotalFunds } from '~shared/StreamingPayments/hooks.ts'; import { formatText } from '~utils/intl.ts'; +import { ACTION_TYPE_FIELD_NAME } from '~v5/common/ActionSidebar/consts.ts'; import ContentWithTeamFilter from '~v5/frame/ContentWithTeamFilter/ContentWithTeamFilter.tsx'; +import Button from '~v5/shared/Button/Button.tsx'; import StatsCards from './partials/StatsCards/StatsCards.tsx'; +import StreamingPaymentPageFilters from './partials/StreamingPaymentsTable/partials/StreamingPaymentFilters/StreamingPaymentFilters.tsx'; import StreamingPaymentsTable from './partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx'; const displayName = 'v5.pages.StreamingPaymentsPage'; +const MSG = defineMessages({ + title: { + id: `${displayName}.title`, + defaultMessage: 'Streaming Payments', + }, + createNewStream: { + id: `${displayName}.createNewStream`, + defaultMessage: 'Create new stream', + }, +}); + const StreamingPaymentsPage = () => { useSetPageHeadingTitle(formatText({ id: 'streamingPaymentsPage.title' })); const nativeDomainId = useGetSelectedDomainFilter()?.nativeId; + const { + actionSidebarToggle: [, { toggleOn: toggleActionSidebarOn }], + } = useActionSidebarContext(); const { totalFunds, @@ -38,6 +58,26 @@ const StreamingPaymentsPage = () => { prefix={currencySymbolMap[currency]} suffix={currency} /> +
    +
    +

    {formatText(MSG.title)}

    +
    +
    + + +
    +
    ); diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx index 91ff303ca61..8219861c5ef 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx @@ -1,4 +1,4 @@ -import { FilePlus, ShareNetwork } from '@phosphor-icons/react'; +import { ArrowCircleDown, FilePlus, ShareNetwork } from '@phosphor-icons/react'; import { type SortingState, type Row, @@ -6,6 +6,7 @@ import { } from '@tanstack/react-table'; import clsx from 'clsx'; import React, { useState, type FC } from 'react'; +import { defineMessages } from 'react-intl'; import { generatePath, useNavigate } from 'react-router-dom'; import MeatballMenuCopyItem from '~common/ColonyActionsTable/partials/MeatballMenuCopyItem/MeatballMenuCopyItem.tsx'; @@ -33,6 +34,13 @@ import useRenderRowLink from './useRenderRowLink.tsx'; const displayName = 'pages.StreamingPaymentsPage.partials.StreamingActionsTable.StreamingActionsTable'; +const MSG = defineMessages({ + loadMoreStreams: { + id: `${displayName}.loadMoreStreams`, + defaultMessage: 'Load more streams', + }, +}); + interface StreamingActionsTableProps { actionRow: Row; isLoading: boolean; @@ -115,6 +123,19 @@ const StreamingActionsTable: FC = ({ pageSize: 1000000, }, }, + loadMoreProps: { + renderContent: (loadMore) => ( + + ), + itemsPerPage: 5, + }, state: { sorting, columnVisibility: isMobile @@ -141,19 +162,6 @@ const StreamingActionsTable: FC = ({ canExpand: () => true, renderSubComponent, }} - // loadMoreProps={{ - // renderContent: (loadMore) => ( - // - // ), - // itemsPerPage: 5, - // }} tableClassName="border-none" /> ); diff --git a/src/components/v5/common/Table/partials/TableLayout/HorizontalTableLayout.tsx b/src/components/v5/common/Table/partials/TableLayout/HorizontalTableLayout.tsx index 4c168b39227..0853adf944c 100644 --- a/src/components/v5/common/Table/partials/TableLayout/HorizontalTableLayout.tsx +++ b/src/components/v5/common/Table/partials/TableLayout/HorizontalTableLayout.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState } from 'react'; import { useCollapseRows } from '~v5/common/Table/hooks.ts'; import { ExpandableRowWrapper } from '~v5/common/Table/partials/ExpandableRowWrapper.tsx'; @@ -23,6 +23,7 @@ export const HorizontalTableLayout = ({ isDisabled, data, table, + overrides, }: HorizontalTableLayoutProps) => { const { rows } = table.getRowModel(); const headerGroups = table.getHeaderGroups(); @@ -31,7 +32,17 @@ export const HorizontalTableLayout = ({ const hasNarrowBorders = borders?.type === 'narrow'; const hasWideBorders = borders?.type === 'wide'; const hasMoreActions = !!moreActions; + const { loadMoreProps } = overrides || {}; useCollapseRows(rows, table.getIsSomeRowsExpanded()); + const [showedActions, setShowedActions] = useState( + loadMoreProps?.itemsPerPage, + ); + + const rowsToShow = loadMoreProps ? rows.slice(0, showedActions) : rows; + const handleLoadMore = () => { + setShowedActions((showedActions ?? 0) + (loadMoreProps?.itemsPerPage ?? 0)); + }; + const canLoadMore = rows.length > (showedActions ?? 0); const getTableCellStyle = (index: number) => !showTableHead @@ -58,7 +69,7 @@ export const HorizontalTableLayout = ({ emptyContent, colSpan: totalColumnsCount, }) || - rows.map((row) => { + rowsToShow.map((row) => { const renderSubComponent = rowsConfig?.renderSubComponent; const showExpandableContent = row.getIsExpanded() && !!renderSubComponent; @@ -111,6 +122,16 @@ export const HorizontalTableLayout = ({ ); })} + {loadMoreProps && canLoadMore && ( + + + {loadMoreProps.renderContent(handleLoadMore)} + + + )} ); diff --git a/src/components/v5/common/Table/types.ts b/src/components/v5/common/Table/types.ts index e53f530bf46..54705acd5ab 100644 --- a/src/components/v5/common/Table/types.ts +++ b/src/components/v5/common/Table/types.ts @@ -79,6 +79,10 @@ export interface TableOptionsOverrides { getPaginationRowModel?: (table: Table) => () => RowModel; onRowSelectionChange?: OnChangeFn; getFilteredRowModel?: (table: Table) => () => RowModel; + loadMoreProps?: { + renderContent: (loadMore: () => void) => React.ReactNode; + itemsPerPage: number; + }; } export interface BaseTableOptions @@ -124,6 +128,7 @@ export type HorizontalTableLayoutProps = BaseTableLayoutProps & | 'borders' | 'isDisabled' | 'data' + | 'overrides' > & Required, 'renderCellWrapper'>>; From f72094a1dfd903b0b5bdc52e602da0d66047b9b1 Mon Sep 17 00:00:00 2001 From: strzelec Date: Wed, 29 Jan 2025 14:01:05 +0100 Subject: [PATCH 107/126] fix: table styles --- .../StreamingActionsTable/StreamingActionsTable.tsx | 2 +- .../StreamingPaymentsTable.tsx | 6 +++++- .../partials/StreamingPaymentsTable/hooks.tsx | 13 +++++++------ .../partials/UserField/UserField.tsx | 8 ++++++-- .../common/Table/partials/ExpandableRowWrapper.tsx | 2 +- src/components/v5/common/Table/utils.tsx | 2 +- 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx index 8219861c5ef..e5dd6e6030c 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/StreamingActionsTable.tsx @@ -109,7 +109,7 @@ const StreamingActionsTable: FC = ({ columns={columns} renderCellWrapper={isMobile ? undefined : renderRowLink} className={clsx( - '[&_td:first-child]:!pl-0 [&_td>a]:px-[1.125rem] [&_td>a]:py-2 [&_td>div]:px-[1.125rem] [&_td>div]:py-2 [&_td]:border-b [&_td]:border-gray-100 [&_td]:!pr-0 [&_th:not(:first-child)]:sm:text-center [&_th]:!rounded-none [&_th]:!border-b [&_th]:!border-solid [&_th]:border-gray-200 [&_tr.expanded-below_td]:border-none sm:[&_tr:hover]:bg-gray-25 [&_tr:last-child_td]:border-none', + 'rounded-none border-none [&_td:first-child]:!pl-0 [&_td>a]:px-[1.125rem] [&_td>a]:py-2 [&_td>div]:px-[1.125rem] [&_td>div]:py-2 [&_td]:border-b [&_td]:border-gray-100 [&_td]:!pr-0 [&_th:not(:first-child)]:sm:text-center [&_th]:!rounded-none [&_th]:!border-b [&_th]:!border-solid [&_th]:border-gray-200 [&_tr.expanded-below_td]:border-none sm:[&_tr:hover]:bg-gray-25 [&_tr:last-child_td]:border-none', { '[&_table]:table-auto lg:[&_table]:table-fixed [&_tbody_td]:h-[54px] [&_th:not(:first-child)]:pl-0': !isTablet, diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx index b41886849ea..3017869b189 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/StreamingPaymentsTable.tsx @@ -1,5 +1,6 @@ import { Binoculars } from '@phosphor-icons/react'; import { getPaginationRowModel } from '@tanstack/react-table'; +import clsx from 'clsx'; import React from 'react'; import EmptyContent from '~v5/common/EmptyContent/EmptyContent.tsx'; @@ -25,7 +26,10 @@ const StreamingPaymentsTable = () => { return ( - className="[&_table]:table-auto [&_table]:overflow-hidden lg:[&_table]:table-fixed [&_tbody_td]:h-[57px] [&_td:first-child]:pl-0 [&_td:last-child]:pr-0 [&_td]:border-gray-100 [&_td]:pr-0 [&_th]:border-none [&_tr.expanded-below+tr_td]:pl-0 [&_tr.expanded-below+tr_td]:pr-0 [&_tr.expanded-below>td]:border-gray-200 [&_tr.expanded-below_td]:h-[57px] [&_tr:hover_.toggler]:text-blue-400 [&_tr:not(.expanded-content):hover_td]:bg-gray-25 [&_tr:not(:last-child)_td]:border-b" + className={clsx( + 'overflow-hidden [&_table]:table-auto [&_table]:overflow-hidden lg:[&_table]:table-fixed [&_tbody_td]:h-[57px] [&_td:first-child]:pl-0 [&_td:last-child]:pr-0 [&_td]:border-gray-100 [&_td]:pr-0 [&_th]:border-none [&_tr.expanded-below+tr_td]:pl-0 [&_tr.expanded-below+tr_td]:pr-0 [&_tr.expanded-below>td]:border-gray-200 [&_tr.expanded-below_td]:h-[57px] [&_tr.expanded-item_td]:h-auto [&_tr.table-item:hover_td]:bg-gray-25 [&_tr:hover_.toggler]:text-blue-400 [&_tr:not(:last-child)_td]:border-b', + { 'pb-6': items.length > 10 }, + )} data={loading ? Array(4).fill({}) : items} columns={columns} renderCellWrapper={(_, content) => content} diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx index c243c7c22da..fb4f724faa7 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx @@ -53,13 +53,11 @@ export const useStreamingTableColumns = (loading: boolean) => { }), helper.display({ id: 'amount', - staticSize: '13rem', + staticSize: loading ? '0px' : '208px', enableSorting: false, header: () => null, cell: ({ row }) => - loading ? ( -
    - ) : ( + loading ? null : ( { }), helper.display({ id: 'expander', - staticSize: '2.25rem', + staticSize: loading ? '50%' : '2.25rem', header: () => null, enableSorting: false, cell: ({ row: { getIsExpanded, toggleExpanded } }) => loading ? ( -
    +
    +
    + +
    ) : ( +
    + + + {meatBallMenuProps && row.getIsExpanded() && ( +
    + + clsx({ '!text-gray-600': !isMenuOpen }) + } + iconSize={18} + /> +
    + )} +
    ); }, cellContentWrapperClassName: 'pl-0', }), ]; - }, []); + }, [getMenuProps]); }; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/StreamingActionMobileItem.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/StreamingActionMobileItem.tsx index 7943530d291..a919c0f913b 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/StreamingActionMobileItem.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/StreamingActionMobileItem.tsx @@ -7,16 +7,11 @@ import { type StreamingActionTableFieldModel } from '~frame/v5/pages/StreamingPa import Numeral from '~shared/Numeral/Numeral.tsx'; import { formatText } from '~utils/intl.ts'; import StreamingPaymentStatusPill from '~v5/common/ActionSidebar/partials/StreamingPaymentStatusPill/StreamingPaymentStatusPill.tsx'; -import MeatBallMenu from '~v5/shared/MeatBallMenu/MeatBallMenu.tsx'; -import { type MeatBallMenuProps } from '~v5/shared/MeatBallMenu/types.ts'; import TeamField from '../TeamField/TeamField.tsx'; interface StreamingActionMobileItemProps { actionRow: Row; - getMenuProps: ( - row: Row, - ) => MeatBallMenuProps | undefined; } const displayName = @@ -43,14 +38,11 @@ const MSG = defineMessages({ const StreamingActionMobileItem: FC = ({ actionRow, - getMenuProps, }) => { const { original: { amount, nativeDomainId, token, status }, } = actionRow; - const meatBallMenuProps = getMenuProps(actionRow); - const textClassName = 'font-normal text-sm'; const renderLabel = (chunks: string[]) => (

    {chunks}

    @@ -100,16 +92,6 @@ const StreamingActionMobileItem: FC = ({ })}
    - {meatBallMenuProps && ( - - clsx({ '!text-gray-600': !isMenuOpen }) - } - iconSize={18} - /> - )}
    ); }; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/hooks.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/hooks.tsx index 8a5b8af316b..5ced40effcf 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/hooks.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/partials/StreamingActionMobileItem/hooks.tsx @@ -2,19 +2,12 @@ import { type Row } from '@tanstack/react-table'; import React from 'react'; import { type StreamingActionTableFieldModel } from '~frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/types.ts'; -import { type MeatBallMenuProps } from '~v5/shared/MeatBallMenu/types.ts'; import StreamingActionMobileItem from './StreamingActionMobileItem.tsx'; -const useRenderSubComponent = ({ - getMenuProps, -}: { - getMenuProps: ( - row: Row, - ) => MeatBallMenuProps | undefined; -}) => { +const useRenderSubComponent = () => { return ({ row }: { row: Row }) => ( - + ); }; diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/utils.ts b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/utils.ts index a4aef72058c..fb7600a21a9 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/utils.ts +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingActionsTable/utils.ts @@ -1,11 +1,15 @@ import { type SortingState } from '@tanstack/react-table'; import { orderBy } from 'lodash'; +import { type ColonyFragment } from '~gql'; +import { findDomainByNativeId } from '~utils/domains.ts'; + import { type StreamingActionTableFieldModel } from '../StreamingPaymentsTable/types.ts'; export const orderActions = ( actions: StreamingActionTableFieldModel[], sorting: SortingState, + colony: ColonyFragment, ) => { const { id, desc } = sorting[0]; @@ -16,8 +20,8 @@ export const orderActions = ( const diff = BigInt(a.totalStreamedAmount) - BigInt(b.totalStreamedAmount); - if (diff > 0n) return desc ? -1 : 1; - if (diff < 0n) return desc ? 1 : -1; + if (diff > 0n) return desc ? 1 : -1; + if (diff < 0n) return desc ? -1 : 1; return 0; }) : []; @@ -28,7 +32,15 @@ export const orderActions = ( desc && ['desc'], ); case 'team': - return orderBy(actions, ['nativeDomainId'], desc && ['desc']); + return [...actions].sort((a, b) => { + const nameA = + findDomainByNativeId(a.nativeDomainId, colony)?.metadata?.name || ''; + const nameB = + findDomainByNativeId(b.nativeDomainId, colony)?.metadata?.name || ''; + + return desc ? nameA.localeCompare(nameB) : nameB.localeCompare(nameA); + }); + default: return actions; } diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx index 09ab6d7bf5b..8f6ca89c8f5 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/hooks.tsx @@ -54,7 +54,7 @@ export const useStreamingTableColumns = (loading: boolean) => { }), helper.display({ id: 'amount', - staticSize: loading ? '0px' : '208px', + staticSize: loading ? '0rem' : '13rem', enableSorting: false, header: () => null, cell: ({ row }) => diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserField/UserField.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserField/UserField.tsx index a13d063ac0c..e9edfcdd5e7 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserField/UserField.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserField/UserField.tsx @@ -31,7 +31,7 @@ const UserField: FC = ({ ) : ( diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/NoExtensionBanner/NoExtensionBanner.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/NoExtensionBanner/NoExtensionBanner.tsx index a4da280ced9..aee44299e6b 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/NoExtensionBanner/NoExtensionBanner.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/NoExtensionBanner/NoExtensionBanner.tsx @@ -26,15 +26,13 @@ const NoExtensionBanner = () => { const { extensionUrl } = useExtensionItem(Extension.StreamingPayments); return ( -
    - {formatMessage(MSG.link)}} - > - {formatMessage(MSG.bannerInfo)} - -
    + {formatMessage(MSG.link)}} + > + {formatMessage(MSG.bannerInfo)} + ); }; diff --git a/src/components/v5/common/ActionSidebar/partials/hooks.ts b/src/components/v5/common/ActionSidebar/partials/hooks.ts index 997c8d8bf09..f2aca18154b 100644 --- a/src/components/v5/common/ActionSidebar/partials/hooks.ts +++ b/src/components/v5/common/ActionSidebar/partials/hooks.ts @@ -18,6 +18,8 @@ import { type FinalizeSuccessCallback, } from '../types.ts'; +import { getNeededExtension } from './utils.ts'; + const SUBMIT_BUTTON_TEXT_MAP: Partial> = { [Action.PaymentBuilder]: 'button.createPayment', [Action.SimplePayment]: 'button.createPayment', From ee0c7da56cdbeeb03e79b490ca4bf5f0042b076d Mon Sep 17 00:00:00 2001 From: strzelec Date: Fri, 7 Feb 2025 18:21:27 +0100 Subject: [PATCH 120/126] fix: rebase fixes --- .../helpers/mapItemToMessageFormat.tsx | 12 +- .../common/Extensions/ExtensionItem/hooks.ts | 3 +- .../frame/Extensions/layouts/consts.ts | 185 --------- .../frame/Extensions/layouts/hooks.tsx | 360 ------------------ .../v5/common/ActionSidebar/ActionSidebar.tsx | 32 +- .../hooks/useGetActionFormData.ts | 21 - .../ActionSidebarLayout.tsx | 33 +- .../partials/ActionSidebarLayout/types.ts | 8 +- .../v5/tmpDebug/TmpStreamingPayments.tsx | 16 +- src/constants/extensions.ts | 8 +- .../fragments/streamingPayment.graphql | 19 - .../expenditures/cancelStreamingPayment.ts | 15 +- .../expenditures/claimStreamingPayment.ts | 8 +- .../expenditures/createStreamingPayment.ts | 108 +----- .../editStreamingPaymentMotion.ts | 11 +- 15 files changed, 72 insertions(+), 767 deletions(-) delete mode 100644 src/components/frame/Extensions/layouts/consts.ts delete mode 100644 src/components/frame/Extensions/layouts/hooks.tsx diff --git a/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx b/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx index 173d0441d67..64e54db67ca 100644 --- a/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx +++ b/src/components/common/ColonyActions/helpers/mapItemToMessageFormat.tsx @@ -309,12 +309,16 @@ export const useMapColonyActionToExpectedFormat = ({ , ActionTitleMessageKeys.Amount, notMaybe( diff --git a/src/components/common/Extensions/ExtensionItem/hooks.ts b/src/components/common/Extensions/ExtensionItem/hooks.ts index 8d0c01a32b3..8c155b9cf96 100644 --- a/src/components/common/Extensions/ExtensionItem/hooks.ts +++ b/src/components/common/Extensions/ExtensionItem/hooks.ts @@ -29,9 +29,8 @@ export const useExtensionItem = (extensionId: string) => { return { extensionUrl, isExtensionInstalled, - isExtensionDataLoading: loading, + isExtensionDataLoading: extensionDataLoading, status, handleNavigateToExtensionDetails, - extensionDataLoading, }; }; diff --git a/src/components/frame/Extensions/layouts/consts.ts b/src/components/frame/Extensions/layouts/consts.ts deleted file mode 100644 index 53d87bff5e5..00000000000 --- a/src/components/frame/Extensions/layouts/consts.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { - ArrowDownRight, - ChartBar, - ChatsCircle, - HandHeart, - Layout, - PresentationChart, - PuzzlePiece, - UsersFour, - UsersThree, - Signature, - // @BETA: Disabled for now - // SealCheck, - // ChartPieSlice, - // ListChecks, - ChartLine, - // Intersect, - // Briefcase, - // BookOpenText, -} from '@phosphor-icons/react'; - -import { - COLONY_ACTIVITY_ROUTE, - COLONY_AGREEMENTS_ROUTE, - COLONY_BALANCES_ROUTE, - COLONY_MEMBERS_ROUTE, - COLONY_EXTENSIONS_ROUTE, - COLONY_INCOMING_ROUTE, - COLONY_FOLLOWERS_ROUTE, - // @BETA: Disabled for now - // COLONY_INCORPORATION_ROUTE, - // COLONY_INTEGRATIONS_ROUTE, - COLONY_PERMISSIONS_ROUTE, - // COLONY_REPUTATION_ROUTE, - COLONY_TEAMS_ROUTE, - COLONY_STREAMING_PAYMENTS_ROUTE, - // COLONY_VERIFIED_ROUTE, -} from '~routes/routeConstants.ts'; -import { formatText } from '~utils/intl.ts'; -import { type NavigationSidebarLinksListProps } from '~v5/frame/NavigationSidebar/partials/NavigationSidebarLinksList/types.ts'; - -export const membersMenu: NavigationSidebarLinksListProps['items'] = [ - { - key: '1', - label: formatText({ id: 'navigation.members.members' }), - to: COLONY_FOLLOWERS_ROUTE, - icon: UsersThree, - }, - { - key: '2', - label: formatText({ id: 'navigation.members.contributors' }) || '', - to: COLONY_MEMBERS_ROUTE, - icon: HandHeart, - }, - // @BETA: Disabled for now - // { - // key: '3', - // label: formatText({ id: 'navigation.members.verifiedMembers' }), - // to: COLONY_VERIFIED_ROUTE, - // icon: SealCheck, - // }, - { - key: '4', - label: formatText({ id: 'navigation.members.permissions' }), - to: COLONY_PERMISSIONS_ROUTE, - icon: Signature, - }, - { - key: '5', - label: formatText({ id: 'navigation.members.teams' }), - to: COLONY_TEAMS_ROUTE, - icon: UsersFour, - }, -]; - -// @todo: update routes when pages will be ready -export const financesMenu: NavigationSidebarLinksListProps['items'] = [ - // @BETA: Disabled for now - // { - // key: '1', - // label: formatText({ id: 'navigation.finances.overview' }), - // to: '/overview', - // icon: ChartPieSlice, - // tagProps: { - // text: 'New', - // mode: 'new', - // }, - // }, - { - key: '2', - label: formatText({ id: 'navigation.finances.balance' }), - to: COLONY_BALANCES_ROUTE, - icon: ChartBar, - }, - { - key: '3', - label: formatText({ id: 'navigation.finances.incomingFunds' }), - to: COLONY_INCOMING_ROUTE, - icon: ArrowDownRight, - }, - // @BETA: Disabled for now - // { - // key: '4', - // label: formatText({ id: 'navigation.finances.transactions' }), - // to: '/transactions', - // icon: ListChecks, - // disabled: true, - // tagProps: { - // text: 'Coming soon', - // }, - // }, - { - key: '5', - label: formatText({ id: 'navigation.finances.streamingPayments' }), - to: COLONY_STREAMING_PAYMENTS_ROUTE, - icon: ChartLine, - }, -]; - -// @todo: update routes when pages will be ready -export const agreementsMenu: NavigationSidebarLinksListProps['items'] = [ - { - key: '1', - label: formatText({ id: 'navigation.agreements.allAgreements' }), - to: COLONY_AGREEMENTS_ROUTE, - icon: ChatsCircle, - tagProps: { - text: formatText({ id: 'status.new' }), - mode: 'new', - }, - }, -]; - -export const adminMenu: NavigationSidebarLinksListProps['items'] = [ - // @BETA: Disabled for now - // { - // key: '2', - // label: formatText({ id: 'navigation.admin.reputation' }), - // to: COLONY_REPUTATION_ROUTE, - // icon: Star, - // }, - { - key: '3', - label: formatText({ id: 'navigation.admin.extensions' }), - to: COLONY_EXTENSIONS_ROUTE, - icon: PuzzlePiece, - }, - // @BETA: Disabled for now - // { - // key: '4', - // label: formatText({ id: 'navigation.admin.integrations' }), - // to: COLONY_INTEGRATIONS_ROUTE, - // icon: Intersect, - // }, - // { - // key: '5', - // label: formatText({ id: 'navigation.admin.incorporation' }), - // to: COLONY_INCORPORATION_ROUTE, - // icon: Briefcase, - // disabled: true, - // tagProps: { - // text: formatText({ id: 'extension.status.coming-soon' }), - // }, - // }, -]; - -// @todo: update routes when pages will be ready -export const dashboardMainMenu: NavigationSidebarLinksListProps['items'] = [ - { - key: '1', - label: formatText({ id: 'navigation.dashboard.dashboard' }), - to: '', - icon: Layout, - }, -]; - -// @todo: update routes when pages will be ready -export const dashboardMenu: NavigationSidebarLinksListProps['items'] = [ - { - key: '1', - label: formatText({ id: 'navigation.dashboard.activityFeed' }), - to: COLONY_ACTIVITY_ROUTE, - icon: PresentationChart, - }, -]; diff --git a/src/components/frame/Extensions/layouts/hooks.tsx b/src/components/frame/Extensions/layouts/hooks.tsx deleted file mode 100644 index 7c8a2331887..00000000000 --- a/src/components/frame/Extensions/layouts/hooks.tsx +++ /dev/null @@ -1,360 +0,0 @@ -import { - Bank, - FilePlus, - GearSix, - Layout, - Plus, - User, - Buildings, - Handshake, -} from '@phosphor-icons/react'; -import React, { useCallback, useMemo } from 'react'; -import { useLocation } from 'react-router-dom'; - -import { Action } from '~constants/actions.ts'; -import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; -import { useColonyContext } from '~context/ColonyContext/ColonyContext.ts'; -import useColonyContractVersion from '~hooks/useColonyContractVersion.ts'; -import { - COLONY_FOLLOWERS_ROUTE, - COLONY_MULTISIG_ROUTE, -} from '~routes/routeConstants.ts'; -import { canColonyBeUpgraded } from '~utils/checks/index.ts'; -import { formatText } from '~utils/intl.ts'; -import { ACTION_TYPE_FIELD_NAME } from '~v5/common/ActionSidebar/consts.ts'; -import { type NavigationSidebarItem } from '~v5/frame/NavigationSidebar/partials/NavigationSidebarMainMenu/types.ts'; -import { type CalamityBannerItemProps } from '~v5/shared/CalamityBanner/types.ts'; - -import { - adminMenu, - agreementsMenu, - dashboardMainMenu, - dashboardMenu, - financesMenu, - membersMenu, -} from './consts.ts'; -import DashboardContent from './partials/DashboardContent/index.ts'; -import { checkIfIsActive } from './utils.ts'; - -import type { UseCalamityBannerInfoReturnType } from './types.ts'; - -export const useCalamityBannerInfo = (): UseCalamityBannerInfoReturnType => { - const { colony } = useColonyContext(); - const { colonyContractVersion } = useColonyContractVersion(); - - const { - actionSidebarToggle: [, { toggleOn: toggleActionSidebarOn }], - } = useActionSidebarContext(); - - const handleUpgradeColony = useCallback( - () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.UpgradeColonyVersion, - }), - [toggleActionSidebarOn], - ); - - const canUpgrade = canColonyBeUpgraded(colony, colonyContractVersion); - - const calamityBannerItems: CalamityBannerItemProps[] = useMemo( - () => [ - { - key: '1', - linkProps: { - to: 'https://docs.colony.io/use/advanced-features/upgrade-colony-and-extensions', - text: formatText({ id: 'learn.more' }), - }, - buttonProps: { - onClick: handleUpgradeColony, - text: formatText({ id: 'button.upgrade' }), - }, - mode: 'info', - title: formatText({ id: 'calamityBanner.available' }), - }, - ], - [handleUpgradeColony], - ); - - return { - canUpgrade, - calamityBannerItems, - }; -}; - -export const useMainMenuItems = (hasTransactionId: boolean) => { - const { - colony: { metadata, status }, - } = useColonyContext(); - - const { - actionSidebarToggle: [ - , - { toggleOn: toggleActionSidebarOn, toggleOff: toggleActionSidebarOff }, - ], - } = useActionSidebarContext(); - const { pathname } = useLocation(); - const nestedColonyPathname = pathname.split('/').slice(2).join('/'); - const handleNewActionClick = () => { - if (hasTransactionId) { - toggleActionSidebarOff(); - setTimeout(() => { - toggleActionSidebarOn(); - }, 500); - } else { - toggleActionSidebarOn(); - } - }; - - // @todo: update menu items with correct contents and related actions - const mainMenuItems: NavigationSidebarItem[] = [ - { - key: '1', - icon: FilePlus, - label: formatText({ id: 'navigation.newAction' }), - onClick: handleNewActionClick, - hideMobile: true, - isHighlighted: true, - }, - { - key: '2', - icon: Layout, - label: formatText({ id: 'navigation.dashboard' }), - isActive: checkIfIsActive(nestedColonyPathname, [ - ...dashboardMainMenu, - ...dashboardMenu, - ]), - secondLevelMenuProps: { - title: metadata?.displayName || '', - content: , - description: metadata?.description || '', - bottomActionProps: { - text: formatText({ id: 'button.createNewAction' }), - icon: Plus, - onClick: () => toggleActionSidebarOn(), - }, - }, - }, - { - key: '3', - icon: User, - label: formatText({ id: 'navigation.members' }), - isActive: - checkIfIsActive(nestedColonyPathname, [ - ...membersMenu, - { - key: '7', - label: 'MultiSig', - to: COLONY_MULTISIG_ROUTE, - icon: Buildings, - }, - ]) || nestedColonyPathname === COLONY_FOLLOWERS_ROUTE, - secondLevelMenuProps: { - title: formatText({ id: 'navigation.members.title' }), - content: membersMenu, - description: formatText({ id: 'navigation.members.description' }), - }, - relatedActionsProps: { - title: formatText({ id: 'navigation.relatedActions' }), - items: [ - { - key: '1', - label: formatText({ id: 'actions.managePermissions' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.ManagePermissions, - }), - }, - // @BETA: Disabled for now - // { - // key: '2', - // label: formatText({ id: 'actions.manageReputation' }), - // // @todo: update action type when manage reputation is implemented - // onClick: () => {}, - // }, - { - key: '3', - label: formatText({ id: 'actions.editExistingTeam' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.EditExistingTeam, - }), - }, - { - key: '4', - label: formatText({ id: 'actions.createNewTeam' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.CreateNewTeam, - }), - }, - ], - }, - }, - { - key: '4', - icon: Bank, - label: formatText({ id: 'navigation.finances' }), - isActive: checkIfIsActive(nestedColonyPathname, financesMenu), - secondLevelMenuProps: { - title: formatText({ id: 'navigation.finances.title' }), - content: financesMenu, - description: formatText({ id: 'navigation.finances.description' }), - }, - relatedActionsProps: { - title: formatText({ id: 'navigation.relatedActions' }), - items: [ - { - key: '1', - label: formatText({ id: 'actions.simplePayment' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.SimplePayment, - }), - }, - { - key: '2', - label: formatText({ id: 'actions.paymentBuilder' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.PaymentBuilder, - }), - }, - { - key: '3', - label: formatText({ id: 'actions.splitPayment' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.SplitPayment, - }), - }, - { - key: '4', - label: formatText({ id: 'actions.streamingPayment' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.StreamingPayment, - }), - }, - { - key: '6', - label: formatText({ id: 'actions.stagedPayment' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.StagedPayment, - }), - }, - { - key: '7', - label: formatText({ id: 'actions.transferFunds' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.TransferFunds, - }), - }, - { - key: '8', - label: formatText({ id: 'actions.manageTokens' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.ManageTokens, - }), - }, - ], - }, - }, - { - key: '5', - icon: Handshake, - label: formatText({ id: 'navigation.agreements' }), - isActive: checkIfIsActive(nestedColonyPathname, agreementsMenu), - secondLevelMenuProps: { - title: formatText({ id: 'navigation.agreements.title' }), - content: agreementsMenu, - description: formatText({ id: 'navigation.agreements.description' }), - }, - relatedActionsProps: { - title: formatText({ id: 'navigation.relatedActions' }), - items: [ - { - key: '1', - label: formatText({ id: 'actions.createAgreement' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.CreateDecision, - }), - }, - // { - // key: '2', - // label: formatText({ id: 'actions.simpleDiscussion' }), - // onClick: () => - // toggleActionSidebarOn({ - // [ACTION_TYPE_FIELD_NAME]: Action.SimpleDiscussion, - // }), - // }, - ], - }, - }, - { - key: '6', - icon: GearSix, - label: formatText({ id: 'navigation.admin' }), - isActive: checkIfIsActive(nestedColonyPathname, adminMenu), - secondLevelMenuProps: { - title: formatText({ id: 'navigation.admin.title' }), - content: adminMenu, - description: formatText({ id: 'navigation.admin.description' }), - }, - relatedActionsProps: { - title: formatText({ id: 'navigation.relatedActions' }), - items: [ - { - key: '1', - label: formatText({ id: 'actions.editColonyDetails' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.EditColonyDetails, - }), - }, - { - key: '2', - label: formatText({ id: 'actions.upgradeColonyVersion' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.UpgradeColonyVersion, - }), - }, - // @BETA: Disabled for now - // { - // key: '3', - // label: formatText({ id: 'actions.enterRecoveryMode' }), - // onClick: () => - // toggleActionSidebarOn({ - // [ACTION_TYPE_FIELD_NAME]: Action.EnterRecoveryMode, - // }), - // }, - { - key: '4', - label: formatText({ id: 'actions.unlockToken' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.UnlockToken, - }), - }, - ], - }, - }, - ]; - - if (status?.nativeToken?.mintable) { - mainMenuItems[3].relatedActionsProps?.items?.push({ - key: '9', - label: formatText({ id: 'actions.mintTokens' }), - onClick: () => - toggleActionSidebarOn({ - [ACTION_TYPE_FIELD_NAME]: Action.MintTokens, - }), - }); - } - - return mainMenuItems; -}; diff --git a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx index a154ec02072..6e1b7da4da6 100644 --- a/src/components/v5/common/ActionSidebar/ActionSidebar.tsx +++ b/src/components/v5/common/ActionSidebar/ActionSidebar.tsx @@ -7,32 +7,24 @@ import React, { useRef, } from 'react'; -import { isFullScreen } from '~constants/index.ts'; import { useActionContext } from '~context/ActionContext/ActionContext.ts'; import { useActionSidebarContext } from '~context/ActionSidebarContext/ActionSidebarContext.ts'; import ActionStatusContextProvider from '~context/ActionStatusContext/ActionStatusContextProvider.tsx'; -import useCopyToClipboard from '~hooks/useCopyToClipboard.ts'; import useDisableBodyScroll from '~hooks/useDisableBodyScroll/index.ts'; import { useDraftAgreement } from '~hooks/useDraftAgreement.ts'; -import useToggle from '~hooks/useToggle/index.ts'; -import Tooltip from '~shared/Extensions/Tooltip/Tooltip.tsx'; import { formatText } from '~utils/intl.ts'; import Modal from '~v5/shared/Modal/index.ts'; import CompletedAction from '../CompletedAction/index.ts'; -import FourOFourMessage from '../FourOFourMessage/index.ts'; -import PillsBase from '../Pills/PillsBase.tsx'; -import { ACTION_TYPE_FIELD_NAME, actionSidebarAnimation } from './consts.ts'; +import { ACTION_TYPE_FIELD_NAME } from './consts.ts'; import useCloseSidebarClick from './hooks/useCloseSidebarClick.ts'; import useGetGroupedActionComponent from './hooks/useGetGroupedActionComponent.tsx'; import { ActionNotFound } from './partials/ActionNotFound.tsx'; import ActionSidebarContent from './partials/ActionSidebarContent/ActionSidebarContent.tsx'; import ActionSidebarLayout from './partials/ActionSidebarLayout/ActionSidebarLayout.tsx'; import ActionSidebarStatusPill from './partials/ActionSidebarStatusPill/ActionSidebarStatusPill.tsx'; -import ExpenditureActionStatusBadge from './partials/ExpenditureActionStatusBadge/ExpenditureActionStatusBadge.tsx'; import { GoBackButton } from './partials/GoBackButton/GoBackButton.tsx'; -import MotionOutcomeBadge from './partials/MotionOutcomeBadge/index.ts'; import { type ActionSidebarProps } from './types.ts'; import { getActionGroup, mapActionTypeToAction } from './utils.ts'; @@ -40,6 +32,7 @@ const displayName = 'v5.common.ActionSidebar'; const ActionSidebar: FC> = ({ children, + transactionId, className, }) => { const { @@ -91,8 +84,6 @@ const ActionSidebar: FC> = ({ formContextOverride: formRef.current, }); - const { isCopied, handleClipboardCopy } = useCopyToClipboard(); - useDisableBodyScroll(isActionSidebarOpen); const isLoading = !!transactionHash && (loadingAction || loadingExpenditure); @@ -141,16 +132,6 @@ const ActionSidebar: FC> = ({ }) } className={className} - shareButtonProps={ - transactionId - ? { - isOpen: isCopied, - isSuccess: isCopied, - onShareButtonClick: () => - handleClipboardCopy(window.location.href), - } - : undefined - } additionalTopContent={children} isLoading={isLoading} statusPill={ @@ -159,6 +140,15 @@ const ActionSidebar: FC> = ({ transactionId={transactionId} isMotion={isMotion} actionNotFound={!!actionNotFound} + goBackButton={ + actionGroupType ? ( + + ) : null + } + transactionHash={transactionHash} >
    { const { action, expenditure } = useGetColonyAction(transactionId); const allTokens = useGetAllTokens(); - const { - streamingPaymentData, - loadingStreamingPayment, - refetchStreamingPayment, - } = useGetStreamingPaymentData(action?.streamingPaymentId); const defaultValues = useMemo(() => { if (!action) { @@ -402,21 +396,6 @@ const useGetActionFormData = (transactionId: string | undefined) => { return { defaultValues, - isInvalidTransactionHash, - loadingAction, - isMotion: !!action?.isMotion, - isMultiSig: !!action?.isMultiSig, - networkMotionState, - motionState, - expenditure, - loadingExpenditure, - streamingPayment: { - streamingPaymentData, - loadingStreamingPayment, - refetchStreamingPayment, - }, - startPollingForAction, - stopPollingForAction, }; }; diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/ActionSidebarLayout.tsx b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/ActionSidebarLayout.tsx index cee769cb258..41c1f7e868d 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/ActionSidebarLayout.tsx +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/ActionSidebarLayout.tsx @@ -14,6 +14,7 @@ import React, { import { isFullScreen } from '~constants/index.ts'; import { useMobile } from '~hooks/index.ts'; +import useCopyToClipboard from '~hooks/useCopyToClipboard.ts'; import useToggle from '~hooks/useToggle/index.ts'; import Tooltip from '~shared/Extensions/Tooltip/Tooltip.tsx'; import { formatText } from '~utils/intl.ts'; @@ -35,16 +36,18 @@ const ActionSidebarLayout = forwardRef< children, additionalTopContent, statusPill, - shareButtonProps, isLoading, className, isMotion, transactionId, actionNotFound, + goBackButton, + transactionHash, }, ref, ) => { const isMobile = useMobile(); + const { isCopied, handleClipboardCopy } = useCopyToClipboard(); const [ isSidebarFullscreen, @@ -57,37 +60,24 @@ const ActionSidebarLayout = forwardRef< } }, [toggleOn]); - const getShareButton = () => { - if (!shareButtonProps) { - return null; - } - - const { - onShareButtonClick, - tooltipContent, - placement, - ...restShareTooltipProps - } = shareButtonProps; - - return ( + const getShareButton = () => + !!transactionHash && ( ); - }; return ( + {goBackButton && goBackButton} {isMobile ? ( getShareButton() ) : ( diff --git a/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts index 5fabe371590..52e47aab20b 100644 --- a/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts +++ b/src/components/v5/common/ActionSidebar/partials/ActionSidebarLayout/types.ts @@ -1,16 +1,12 @@ -import { type TooltipProps } from '~shared/Extensions/Tooltip/types.ts'; - export interface ActionSidebarLayoutProps { onCloseClick: () => void; additionalTopContent?: React.ReactNode; statusPill?: React.ReactNode; className?: string; - shareButtonProps?: Omit & { - tooltipContent?: React.ReactNode; - onShareButtonClick: () => void; - }; isLoading?: boolean; transactionId?: string; isMotion: boolean; actionNotFound?: boolean; + goBackButton?: React.ReactNode; + transactionHash: string | null; } diff --git a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx index df855af75d9..8add532434d 100644 --- a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx +++ b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx @@ -1,5 +1,5 @@ import { gql, useLazyQuery } from '@apollo/client'; -import { Extension, Id } from '@colony/colony-js'; +import { Id } from '@colony/colony-js'; import { BigNumber } from 'ethers'; import moveDecimal from 'move-decimal-point'; import React, { useState } from 'react'; @@ -14,7 +14,7 @@ import { import useAsyncFunction from '~hooks/useAsyncFunction.ts'; import useCurrentBlockTime from '~hooks/useCurrentBlockTime.ts'; import useEnabledExtensions from '~hooks/useEnabledExtensions.ts'; -import useExtensionData from '~hooks/useExtensionData.ts'; +import useStreamingPaymentAmountsLeft from '~hooks/useStreamingPaymentAmountsLeft.ts'; import { ActionTypes } from '~redux'; import { type ClaimStreamingPaymentPayload } from '~redux/sagas/expenditures/claimStreamingPayment.ts'; import { type CreateStreamingPaymentPayload } from '~redux/sagas/expenditures/createStreamingPayment.ts'; @@ -30,10 +30,7 @@ import { import Numeral from '~shared/Numeral/Numeral.tsx'; import { getStreamingPaymentDatabaseId } from '~utils/databaseId.ts'; import { findDomainByNativeId } from '~utils/domains.ts'; -import { - getStreamingPaymentLimit, - getStreamingPaymentAmountsLeft, -} from '~utils/streamingPayments.ts'; +import { getStreamingPaymentLimit } from '~utils/streamingPayments.ts'; import { getSelectedToken } from '~utils/tokens.ts'; import InputBase from '~v5/common/Fields/InputBase/InputBase.tsx'; import Select from '~v5/common/Fields/Select/Select.tsx'; @@ -104,8 +101,6 @@ const TmpStreamingPayments = () => { const [updateEndCondition, setUpdateEndCondition] = useState(false); const [updateLimit, setUpdateLimit] = useState(false); - const { extensionData } = useExtensionData(Extension.StreamingPayments); - const { data, refetch } = useGetStreamingPaymentQuery({ variables: { streamingPaymentId: getStreamingPaymentDatabaseId( @@ -145,7 +140,7 @@ const TmpStreamingPayments = () => { }); const { amountAvailableToClaim, amountClaimedToDate } = - getStreamingPaymentAmountsLeft( + useStreamingPaymentAmountsLeft( streamingPayment, Math.floor(blockTime ?? Date.now() / 1000), ); @@ -681,9 +676,6 @@ const TmpStreamingPayments = () => { > Refetch -
    diff --git a/src/components/v5/shared/MeatBallMenu/hooks.ts b/src/components/v5/shared/MeatBallMenu/hooks.ts index 1493b1614eb..7309d802a4d 100644 --- a/src/components/v5/shared/MeatBallMenu/hooks.ts +++ b/src/components/v5/shared/MeatBallMenu/hooks.ts @@ -24,11 +24,7 @@ export const useMobileMenuPosition = ({ let translateX = '0'; let translateY = '0'; - if (!isMobile) { - if (leftOffset < menu.clientWidth || hasLeftAlignment) { - translateX = 'calc(-100% + 1.2rem)'; - } - } else { + if (isMobile) { translateX = `calc(-100% + ${leftOffset}px - 1.2rem)`; } diff --git a/src/i18n/en-actions.ts b/src/i18n/en-actions.ts index 87612b2487f..5c76ece6fa7 100644 --- a/src/i18n/en-actions.ts +++ b/src/i18n/en-actions.ts @@ -58,7 +58,7 @@ const actionsMessageDescriptors = { ${ColonyActionType.ManageTokensMultisig} {Manage tokens by {initiator}} ${ColonyActionType.FundExpenditureMotion} {Payment to {recipientsNumber} {recipientsNumber, plural, one {recipient} other {recipients}} with {tokensNumber} {tokensNumber, plural, one {token} other {tokens}} by {initiator}} ${ColonyActionType.FinalizeExpenditureMotion} {Payment to {recipientsNumber} {recipientsNumber, plural, one {recipient} other {recipients}} with {tokensNumber} {tokensNumber, plural, one {token} other {tokens}} by {initiator}} - ${ColonyActionType.CreateStreamingPayment} {Create streaming payment} + ${ColonyActionType.CreateStreamingPayment} {Stream {amount} {tokenSymbol} / {period} to {recipient} by {initiator}} ${ColonyActionType.CreateStreamingPaymentMotion} {Create streaming payment} ${ColonyActionType.MakeArbitraryTransaction} {{arbitraryTransactionsLength, select, @@ -91,7 +91,6 @@ const actionsMessageDescriptors = { ${ExtendedColonyActionType.UpdateColonyObjectiveMultisig} {Manage objective by {initiator}} ${ExtendedColonyActionType.SplitPayment} {Split Payment of {splitAmount} {tokenSymbol} by {initiator}} ${ExtendedColonyActionType.StagedPayment} {Staged payment {tokensNumber, plural, one {of {stagedAmount} {tokenSymbol}} other {with {tokensNumber} tokens}} to {recipient} with {milestonesCount} {milestonesCount, plural, one {milestone} other {milestones}} by {initiator}} - ${ColonyActionType.CreateStreamingPayment} {Stream {amount} {tokenSymbol} / {period} to {recipient} by {initiator}} other {Generic action we don't have information about} }`, 'action.type': `{actionType, select, @@ -161,7 +160,6 @@ const actionsMessageDescriptors = { ${ExtendedColonyActionType.UpdateColonyObjectiveMotion} {Manage objective} ${ExtendedColonyActionType.UpdateColonyObjectiveMultisig} {Manage objective} ${ExtendedColonyActionType.SplitPayment} {Split payment} - ${ColonyActionType.CreateStreamingPayment} {Streaming payment} other {Generic} }`, }; From ea51c5d76036eeb6a24625ae6c4c698ea1d970ad Mon Sep 17 00:00:00 2001 From: strzelec Date: Mon, 10 Feb 2025 11:26:03 +0100 Subject: [PATCH 124/126] fix: types --- .../partials/BalanceTab/partials/StreamsInfoRow/utils.ts | 3 +-- .../StreamingPaymentsPage/StreamingPaymentsPage.tsx | 5 +++-- .../StreamingPaymentWidget/StreamingPaymentWidget.tsx | 1 + src/components/v5/payments/TmpStreamingPayments.tsx | 9 +++++---- src/components/v5/tmpDebug/TmpStreamingPayments.tsx | 1 + 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts index 06d79bd04e4..c3860940bd1 100644 --- a/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts +++ b/src/components/common/Extensions/UserHub/partials/BalanceTab/partials/StreamsInfoRow/utils.ts @@ -1,6 +1,7 @@ import Decimal from 'decimal.js'; import { type ColonyFragment, type SupportedCurrencies } from '~gql'; +import { type StreamingPaymentItems } from '~shared/StreamingPayments/types.ts'; import { StreamingPaymentStatus } from '~types/streamingPayments.ts'; import { fetchCurrentPrice } from '~utils/currency/currency.ts'; import { @@ -12,8 +13,6 @@ import { getTokenDecimalsWithFallback, } from '~utils/tokens.ts'; -import { type StreamingPaymentItems } from './types.ts'; - export const calculateToCurrency = async ({ amount, tokenAddress, diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx index 36df8c753fa..aca68031126 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/StreamingPaymentsPage.tsx @@ -51,11 +51,12 @@ const StreamingPaymentsPage = () => { nativeDomainId, }); - const { isExtensionInstalled, extensionDataLoading, status } = + const { isExtensionInstalled, isExtensionDataLoading, status } = useExtensionItem(Extension.StreamingPayments); const isExtensionDisabled = - status === 'deprecated' || (!isExtensionInstalled && !extensionDataLoading); + status === 'deprecated' || + (!isExtensionInstalled && !isExtensionDataLoading); return ( diff --git a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx index dba7ab8c267..9dea2fb840c 100644 --- a/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx +++ b/src/components/v5/common/CompletedAction/partials/StreamingPayment/partials/StreamingPaymentWidget/StreamingPaymentWidget.tsx @@ -158,6 +158,7 @@ const StreamingPaymentWidget: FC = ({ colonyAddress: colony.colonyAddress, streamingPaymentsAddress: streamingPaymentsAddress ?? '', streamingPayment: streamingPaymentData, + tokenAddress: streamingPaymentData.tokenAddress, }; await claim(claimPayload); diff --git a/src/components/v5/payments/TmpStreamingPayments.tsx b/src/components/v5/payments/TmpStreamingPayments.tsx index 7fc43b82de8..7886871edb5 100644 --- a/src/components/v5/payments/TmpStreamingPayments.tsx +++ b/src/components/v5/payments/TmpStreamingPayments.tsx @@ -84,14 +84,14 @@ const TmpStreamingPayments = () => { endCondition, interval: 86400, // One day recipientAddress: user?.walletAddress ?? '', - startTimestamp: BigNumber.from( + startTimestamp: `${BigNumber.from( (blockTime ?? Math.floor(Date.now() / 1000)) - 604800, - ), // One week ago + )}`, // One week ago tokenAddress, tokenDecimals: parseInt(decimalAmount, 10), - endTimestamp: BigNumber.from( + endTimestamp: `${BigNumber.from( (blockTime ?? Math.floor(Date.now() / 1000)) + 604800, - ), // Next week + )}`, // Next week limitAmount: limit, }; @@ -121,6 +121,7 @@ const TmpStreamingPayments = () => { colonyAddress: colony.colonyAddress, streamingPaymentsAddress: streamingPaymentsAddress ?? '', streamingPayment, + tokenAddress: streamingPayment.tokenAddress, }; await claim(claimPayload); diff --git a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx index 8add532434d..6a8d2e0349c 100644 --- a/src/components/v5/tmpDebug/TmpStreamingPayments.tsx +++ b/src/components/v5/tmpDebug/TmpStreamingPayments.tsx @@ -254,6 +254,7 @@ const TmpStreamingPayments = () => { colonyAddress: colony.colonyAddress, streamingPaymentsAddress: streamingPaymentsAddress ?? '', streamingPayment, + tokenAddress: streamingPayment.tokenAddress, }; await claim(claimPayload); From f98997750b6ebbeb481915d8b209092e94184814 Mon Sep 17 00:00:00 2001 From: strzelec Date: Tue, 11 Feb 2025 10:13:20 +0100 Subject: [PATCH 125/126] fix: rebase fixes --- .../partials/UserStreams/UserStreams.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserStreams/UserStreams.tsx b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserStreams/UserStreams.tsx index f640c31ce3a..467ba125e7d 100644 --- a/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserStreams/UserStreams.tsx +++ b/src/components/frame/v5/pages/StreamingPaymentsPage/partials/StreamingPaymentsTable/partials/UserStreams/UserStreams.tsx @@ -109,7 +109,8 @@ const UserStreams: FC = ({ const shouldShowTooltip = calculatedAmountArray.length > 0; const content = (
    - {currency} {' /month'} + + {currency} {' /month'}
    ); From 5ad592432e9ae58931bc3a1e49b48cbe9dbe4df6 Mon Sep 17 00:00:00 2001 From: strzelec Date: Thu, 20 Feb 2025 15:48:14 +0100 Subject: [PATCH 126/126] fix: advanced payment status --- .../hooks/useGetStreamingPaymentData.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts index 55b2da4d239..c8cc5b07aa1 100644 --- a/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts +++ b/src/components/v5/common/ActionSidebar/hooks/useGetStreamingPaymentData.ts @@ -1,4 +1,4 @@ -import { useEffect, useState } from 'react'; +import { useEffect } from 'react'; import { FAILED_LOADING_DURATION as POLLING_TIMEOUT } from '~frame/LoadingTemplate/index.ts'; import { useGetStreamingPaymentQuery } from '~gql'; @@ -22,15 +22,9 @@ export const useGetStreamingPaymentData = ( const streamingPayment = data?.getStreamingPayment; - const [isPolling, setIsPolling] = useState( - streamingPaymentId && !streamingPayment, - ); - useEffect(() => { const shouldPoll = streamingPaymentId && !streamingPayment; - setIsPolling(shouldPoll); - if (!shouldPoll) { return noop; } @@ -54,11 +48,9 @@ export const useGetStreamingPaymentData = ( pollInterval, ]); - const isLoading = loading || !!isPolling; - return { streamingPaymentData: streamingPayment, - loadingStreamingPayment: isLoading, + loadingStreamingPayment: loading, refetchStreamingPayment: refetch, startPolling, stopPolling,