Skip to content

Commit

Permalink
remove default includeEmptyNeurons=false from getNeuron and set test …
Browse files Browse the repository at this point in the history
…to includeEmptyNeurons: false
  • Loading branch information
coskucinkilic committed Oct 10, 2024
1 parent 9573096 commit 385a390
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/nns/src/governance.canister.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,13 +756,13 @@ describe("GovernanceCanister", () => {
const response = await governance.getNeuron({
certified: true,
neuronId,
includeEmptyNeurons: true,
includeEmptyNeurons: false,
});

expect(certifiedService.list_neurons).toBeCalledWith({
neuron_ids: new BigUint64Array([neuronId]),
include_neurons_readable_by_caller: false,
include_empty_neurons_readable_by_caller: [true],
include_empty_neurons_readable_by_caller: [false],
include_public_neurons_in_full_neurons: [],
});

Expand Down
6 changes: 2 additions & 4 deletions packages/nns/src/governance.canister.ts
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ export class GovernanceCanister {
public getNeuron = async ({
certified = true,
neuronId,
includeEmptyNeurons = false,
includeEmptyNeurons,
}: {
certified: boolean;
neuronId: NeuronId;
Expand All @@ -989,9 +989,7 @@ export class GovernanceCanister {
const [neuron]: NeuronInfo[] = await this.listNeurons({
certified,
neuronIds: [neuronId],
includeEmptyNeurons: includeEmptyNeurons
? includeEmptyNeurons
: undefined,
includeEmptyNeurons,
});

return neuron;
Expand Down

0 comments on commit 385a390

Please sign in to comment.