diff --git a/packages/apps/src/app/dca/Form.ts b/packages/apps/src/app/dca/Form.ts index 2b5c181b1b..d7dac473b4 100644 --- a/packages/apps/src/app/dca/Form.ts +++ b/packages/apps/src/app/dca/Form.ts @@ -374,21 +374,6 @@ export class DcaForm extends BaseElement { const max = this.maxFrequency; const value = this.frequency ?? max; - const valueMsec = value * 60 * 1000; - const blockTime = 12_000; - const blockCount = Math.floor(valueMsec / blockTime); - const blockHint = - blockCount > 0 - ? i18n.t('form.advanced.intervalBlocks', { - minutes: value, - blocks: blockCount, - }) - : undefined; - - const range = max - min; - const rangeInHours = Math.floor(range / HOUR_MIN); - const rangeInDays = Math.floor(range / DAY_MIN); - const minValues: Record = { min: min, hour: Math.ceil(min / HOUR_MIN), @@ -413,6 +398,18 @@ export class DcaForm extends BaseElement { this.frequencyRanges.day > 0 && 'day', ].filter((u): u is FrequencyUnit => !!u); + const valueMsec = value * 60 * 1000; + const blockTime = 12_000; + const blockCount = Math.floor(valueMsec / blockTime); + const blockHint = + blockCount > 0 + ? i18n.t('form.advanced.intervalBlocks', { + unit: i18n.t(`form.frequency.${this.frequencyUnit}`), + value: values[this.frequencyUnit], + blocks: blockCount, + }) + : undefined; + return html` {{amountIn}} {{assetIn}} for <1>{{assetOut}} every <1>~{{frequency}} with a total budget of <1>{{amountInBudget}} {{assetIn}} over the period of <1>~{{time}}",