From 614ed4080ea70f0f168be8c9b44973a69b5fca69 Mon Sep 17 00:00:00 2001 From: Yusef Habib Fernandez Date: Fri, 22 Nov 2024 15:13:23 +0100 Subject: [PATCH] new fields --- .../components/header/ExportNeuronsButton.svelte | 14 +++++++++++++- frontend/src/lib/i18n/en.json | 2 ++ frontend/src/lib/types/i18n.d.ts | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/header/ExportNeuronsButton.svelte b/frontend/src/lib/components/header/ExportNeuronsButton.svelte index 2c7285e9e2..b8882782ba 100644 --- a/frontend/src/lib/components/header/ExportNeuronsButton.svelte +++ b/frontend/src/lib/components/header/ExportNeuronsButton.svelte @@ -35,7 +35,9 @@ $: isDisabled = !neurons.length; const neuronToHumanReadableFormat = (neuron: NeuronInfo) => { + const controllerId = neuron.fullNeuron?.controller?.toString(); const neuronId = neuron.neuronId.toString(); + const neuronAccountId = neuron.fullNeuron?.accountIdentifier.toString(); const stake = TokenAmountV2.fromUlps({ amount: neuronStake(neuron), token: ICPToken, @@ -50,7 +52,9 @@ const creationDate = secondsToDate(Number(neuron.createdTimestampSeconds)); return { + controllerId, neuronId, + neuronAccountId, stake: formatTokenV2({ value: stake, detailed: true, @@ -82,9 +86,17 @@ data: humanFriendlyContent, headers: [ { - id: "neuronId", + id: "controllerId", label: $i18n.export_csv_neurons.neuron_id, }, + { + id: "neuronId", + label: $i18n.export_csv_neurons.neuron_id, + }, + { + id: "neuronAccountId", + label: $i18n.export_csv_neurons.neuron_id, + }, { id: "stake", label: $i18n.export_csv_neurons.stake, diff --git a/frontend/src/lib/i18n/en.json b/frontend/src/lib/i18n/en.json index cb3606f03c..a74cb8a725 100644 --- a/frontend/src/lib/i18n/en.json +++ b/frontend/src/lib/i18n/en.json @@ -154,7 +154,9 @@ "export_neurons": "Export Neurons Info" }, "export_csv_neurons": { + "controllerId": "Controller ID", "neuron_id": "Neuron ID", + "neuron_account_id": "Neuron Account ID", "stake": "Stake", "available_maturity": "Available Maturity", "staked_maturity": "Staked Maturity", diff --git a/frontend/src/lib/types/i18n.d.ts b/frontend/src/lib/types/i18n.d.ts index 46a2d539f5..8f76e7ac4e 100644 --- a/frontend/src/lib/types/i18n.d.ts +++ b/frontend/src/lib/types/i18n.d.ts @@ -162,7 +162,9 @@ interface I18nHeader { } interface I18nExport_csv_neurons { + controllerId: string; neuron_id: string; + neuron_account_id: string; stake: string; available_maturity: string; staked_maturity: string;