Skip to content

Commit

Permalink
Merge pull request #2752 from build-5/bugfix/sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
adamunchained authored Jan 12, 2024
2 parents fa4cb62 + a8fd75e commit cd9dd5c
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions packages/sdk/src/https/datasets/Dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { AwardParticpateSubset } from './award/AwardParticipantSubset';
import { CollectionStatsSubset } from './collection/CollectionStatsSubset';
import { SubsetType } from './common';
import { MilestoneTransactionSubset } from './milestone/MilestoneTransactionSubset';
import { ProposalMemberSubset } from './proposal/ProposalMemberSubset';
import { SpaceBlockedMemberSubset } from './space/SpaceBlockedMemberSubset';
import { SpaceGuardianSubset } from './space/SpaceGuardianSubset';
import { SpaceKnockingMemberSubset } from './space/SpaceKnockingMemberSubset';
Expand Down Expand Up @@ -211,13 +212,25 @@ export class ExactDataSet<D extends Dataset, T> extends BaseSet<T> {
throw Error('invalid subset name');
}
case Subset.MEMBERS:
return new SpaceMemberSubset(
this.origin,
this.apiKey,
this.dataset,
this.setId,
Subset.MEMBERS,
) as SubsetType<D, S>;
if (this.dataset === Dataset.PROPOSAL) {
return new ProposalMemberSubset(
this.origin,
this.apiKey,
this.dataset,
this.setId,
Subset.MEMBERS,
) as SubsetType<D, S>;
}
if (this.dataset === Dataset.SPACE) {
return new SpaceMemberSubset(
this.origin,
this.apiKey,
this.dataset,
this.setId,
Subset.MEMBERS,
) as SubsetType<D, S>;
}
throw Error('invalid subset name');
case Subset.GUARDIANS:
return new SpaceGuardianSubset(
this.origin,
Expand Down

0 comments on commit cd9dd5c

Please sign in to comment.