Skip to content

Commit

Permalink
new fields
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabib committed Nov 22, 2024
1 parent 459e7a3 commit 614ed40
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
14 changes: 13 additions & 1 deletion frontend/src/lib/components/header/ExportNeuronsButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -50,7 +52,9 @@
const creationDate = secondsToDate(Number(neuron.createdTimestampSeconds));
return {
controllerId,
neuronId,
neuronAccountId,
stake: formatTokenV2({
value: stake,
detailed: true,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/types/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 614ed40

Please sign in to comment.