From 7162ecf6edcd0945d6079f053e18a2728bc5b57b Mon Sep 17 00:00:00 2001 From: Cosku Cinkilic Date: Thu, 10 Oct 2024 22:56:06 +0200 Subject: [PATCH] Pass includeEmptyNeurons to use the new service --- packages/nns/src/governance.canister.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/nns/src/governance.canister.ts b/packages/nns/src/governance.canister.ts index 00350c09..4abb1c98 100644 --- a/packages/nns/src/governance.canister.ts +++ b/packages/nns/src/governance.canister.ts @@ -976,16 +976,22 @@ export class GovernanceCanister { public getNeuron = async ({ certified = true, neuronId, + includeEmptyNeurons = false, }: { certified: boolean; neuronId: NeuronId; + includeEmptyNeurons?: boolean; }): Promise => { // The governance canister exposes two functions "get_neuron_info" and "get_full_neuron" that could probably be used to fetch the neuron details too. // However historically this function has been resolved with a single call "list_neurons". + //Visibility is not provided by old oldListNeuronsCertifiedService, and we pass include empty neurons to get correct visibility const [neuron]: NeuronInfo[] = await this.listNeurons({ certified, neuronIds: [neuronId], + includeEmptyNeurons: includeEmptyNeurons + ? includeEmptyNeurons + : undefined, }); return neuron;