diff --git a/frontend/src/lib/components/neuron-detail/NeuronSelectPercentage.svelte b/frontend/src/lib/components/neuron-detail/NeuronSelectPercentage.svelte
index 8aad36b5299..6ebaebf3427 100644
--- a/frontend/src/lib/components/neuron-detail/NeuronSelectPercentage.svelte
+++ b/frontend/src/lib/components/neuron-detail/NeuronSelectPercentage.svelte
@@ -6,11 +6,14 @@
import TestIdWrapper from "$lib/components/common/TestIdWrapper.svelte";
import { formatMaturity } from "$lib/utils/neuron.utils";
import { replacePlaceholders } from "$lib/utils/i18n.utils";
+ import { nonNullish } from "@dfinity/utils";
+ import Tooltip from "../ui/Tooltip.svelte";
export let availableMaturityE8s: bigint;
export let percentage: number;
export let buttonText: string;
export let disabled = false;
+ export let disabledText: string | undefined = undefined;
let selectedMaturityE8s: bigint;
$: selectedMaturityE8s = (availableMaturityE8s * BigInt(percentage)) / 100n;
@@ -59,14 +62,27 @@
-
+ {#if nonNullish(disabledText)}
+
+
+
+ {:else}
+
+ {/if}
diff --git a/frontend/src/lib/components/neuron-detail/actions/SpawnNeuronButton.svelte b/frontend/src/lib/components/neuron-detail/actions/SpawnNeuronButton.svelte
index 12181e1a53b..6cc21bbcfe4 100644
--- a/frontend/src/lib/components/neuron-detail/actions/SpawnNeuronButton.svelte
+++ b/frontend/src/lib/components/neuron-detail/actions/SpawnNeuronButton.svelte
@@ -3,7 +3,7 @@
import { E8S_PER_ICP } from "$lib/constants/icp.constants";
import {
MIN_NEURON_STAKE,
- SPAWN_VARIANCE_PERCENTAGE,
+ MATURITY_MODULATION_VARIANCE_PERCENTAGE,
} from "$lib/constants/neurons.constants";
import { i18n } from "$lib/stores/i18n";
import { formatNumber, formatPercentage } from "$lib/utils/format.utils";
@@ -49,17 +49,22 @@
$i18n.neuron_detail.spawn_neuron_disabled_tooltip,
{
$amount: formatNumber(
- MIN_NEURON_STAKE / E8S_PER_ICP / SPAWN_VARIANCE_PERCENTAGE,
+ MIN_NEURON_STAKE /
+ E8S_PER_ICP /
+ MATURITY_MODULATION_VARIANCE_PERCENTAGE,
{ minFraction: 4, maxFraction: 4 }
),
$min: formatNumber(MIN_NEURON_STAKE / E8S_PER_ICP, {
minFraction: 0,
maxFraction: 0,
}),
- $varibility: formatPercentage(SPAWN_VARIANCE_PERCENTAGE, {
- minFraction: 0,
- maxFraction: 0,
- }),
+ $variability: formatPercentage(
+ MATURITY_MODULATION_VARIANCE_PERCENTAGE,
+ {
+ minFraction: 0,
+ maxFraction: 0,
+ }
+ ),
}
)}
>
diff --git a/frontend/src/lib/components/sns-neuron-detail/actions/SnsDisburseMaturityButton.svelte b/frontend/src/lib/components/sns-neuron-detail/actions/SnsDisburseMaturityButton.svelte
index f7714fb75f1..95186711dd0 100644
--- a/frontend/src/lib/components/sns-neuron-detail/actions/SnsDisburseMaturityButton.svelte
+++ b/frontend/src/lib/components/sns-neuron-detail/actions/SnsDisburseMaturityButton.svelte
@@ -1,5 +1,8 @@