Skip to content

Commit

Permalink
Searching for plugin address in pluginMembers
Browse files Browse the repository at this point in the history
  • Loading branch information
nigeon committed Nov 15, 2023
1 parent c41f472 commit 07ce120
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/js-client/src/internal/graphql-queries/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { gql } from 'graphql-request';

export const QueryPluginMembers = gql`
query PluginMembers($address: String!, $block: Block_height) {
pluginMembers(block: $block, where: { address: $address }) {
pluginMembers(block: $block, where: { pluginAddress: $address }) {
id
address
balance
Expand Down
1 change: 1 addition & 0 deletions packages/subgraph/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ type PluginMember @entity {
address: String # address as string to facilitate filtering by address on the UI
balance: BigInt!
plugin: Plugin!
pluginAddress: String! # address as string to facilitate filtering by address on the UI
proposals: [PluginProposalMember!]! @derivedFrom(field: "approver")
delegatee: PluginMember
votingPower: BigInt
Expand Down
2 changes: 1 addition & 1 deletion packages/subgraph/src/plugin/governance-erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function getOrCreateMember(user: Address, pluginId: string): PluginMember {
member.address = user.toHexString();
member.balance = BigInt.zero();
member.plugin = pluginId;

member.pluginAddress = dataSource.address().toHexString();
member.delegatee = null;
member.votingPower = BigInt.zero();
}
Expand Down

0 comments on commit 07ce120

Please sign in to comment.