@@ -18,6 +18,7 @@ import {
1818 checkUSDFCBalance ,
1919 createProvider ,
2020 depositUSDFC ,
21+ displayCapacity ,
2122 displayDepositWarning ,
2223 displayServicePermissions ,
2324 formatFIL ,
@@ -80,7 +81,7 @@ export async function runInteractiveSetup(options: PaymentSetupOptions): Promise
8081 }
8182
8283 // Step 2: Initialize Synapse
83- const s = spinner ( )
84+ const s = spinner ( { indicator : 'timer' } )
8485 s . start ( 'Initializing connection...' )
8586
8687 const rpcUrl = options . rpcUrl || RPC_URLS . calibration . websocket
@@ -206,7 +207,7 @@ export async function runInteractiveSetup(options: PaymentSetupOptions): Promise
206207 }
207208
208209 // Step 5: Set storage allowances
209- console . log ( `\n${ pc . bold ( 'WarmStorage Service Payment Limits:' ) } ` )
210+ console . log ( `\n${ pc . bold ( 'Your Current WarmStorage Service Limits:' ) } ` )
210211
211212 // Show current allowances
212213 let currentAllowances = status . currentAllowances
@@ -223,17 +224,9 @@ export async function runInteractiveSetup(options: PaymentSetupOptions): Promise
223224 console . log ( ` Max payment: ${ formatUSDFC ( monthlyRate ) } USDFC/month` )
224225 console . log ( ` Max reserve: ${ formatUSDFC ( currentAllowances . lockupAllowance ) } USDFC (10-day lockup)` )
225226
226- if ( capacity . isDepositLimited ) {
227- console . log (
228- ` → Current capacity: ~${ capacity . actualGB . toLocaleString ( ) } GB/month ${ pc . yellow ( '(deposit-limited)' ) } `
229- )
230- console . log ( ` → Potential: ~${ capacity . potentialGB . toLocaleString ( ) } GB/month` )
231- } else {
232- console . log ( ` → Estimated capacity: ~${ capacity . actualGB . toLocaleString ( ) } GB/month` )
233- console . log ( pc . gray ( ' (varies with CDN usage and data set fees)' ) )
234- }
227+ displayCapacity ( capacity )
235228 } else {
236- console . log ( pc . gray ( ' No WarmStorage service permissions set yet' ) )
229+ console . log ( pc . gray ( ' No limits set yet' ) )
237230 }
238231
239232 // Ask about setting/updating storage limits
@@ -252,7 +245,7 @@ export async function runInteractiveSetup(options: PaymentSetupOptions): Promise
252245 console . log ( `\n${ pc . bold ( 'Storage Pricing:' ) } ` )
253246 console . log ( ` 1 GiB/month: ${ formatUSDFC ( pricePerGiBPerMonth ) } USDFC` )
254247 console . log ( ` 1 TiB/month: ${ formatUSDFC ( pricePerTiBPerMonth ) } USDFC` )
255- console . log ( pc . gray ( ' (WarmStorage service will reserve 10 days of costs as security)' ) )
248+ console . log ( pc . gray ( ' (for each upload, WarmStorage service will reserve 10 days of costs as security)' ) )
256249
257250 const allowanceStr = await text ( {
258251 message : 'Enter storage allowance' ,
@@ -299,7 +292,7 @@ export async function runInteractiveSetup(options: PaymentSetupOptions): Promise
299292
300293 // Display the new permissions with capacity info
301294 displayServicePermissions (
302- 'New WarmStorage Service Permissions :' ,
295+ 'New WarmStorage Service Limits :' ,
303296 monthlyRate ,
304297 allowances . lockupAmount ,
305298 totalDeposit ,
@@ -420,14 +413,6 @@ export async function runInteractiveSetup(options: PaymentSetupOptions): Promise
420413 const finalStatus = await getPaymentStatus ( synapse )
421414 s . stop ( `${ pc . green ( '✓' ) } Setup complete` )
422415
423- // Calculate actual vs potential capacity using existing pricePerTiBPerEpoch
424- const capacity = calculateActualCapacity (
425- finalStatus . depositedAmount ,
426- finalStatus . currentAllowances . rateAllowance ,
427- finalStatus . currentAllowances . lockupAllowance ,
428- pricePerTiBPerEpoch
429- )
430-
431416 // Final summary with three clear sections
432417 outro ( pc . bold ( '━━━ Setup Complete ━━━' ) )
433418 console . log ( `Network: ${ pc . bold ( network ) } ` )
@@ -444,21 +429,13 @@ export async function runInteractiveSetup(options: PaymentSetupOptions): Promise
444429
445430 // Section 3: WarmStorage service permissions
446431 const monthlyRate = finalStatus . currentAllowances . rateAllowance * TIME_CONSTANTS . EPOCHS_PER_MONTH
447- console . log ( `\n${ pc . bold ( 'WarmStorage Service Permissions' ) } ` )
448- console . log ( ` Max payment: ${ formatUSDFC ( monthlyRate ) } USDFC/month` )
449- console . log ( ` Max reserve: ${ formatUSDFC ( finalStatus . currentAllowances . lockupAllowance ) } USDFC (10-day lockup)` )
450-
451- if ( capacity . isDepositLimited ) {
452- console . log (
453- ` → Current capacity: ~${ capacity . actualGB . toLocaleString ( ) } GB/month ${ pc . yellow ( '(deposit-limited)' ) } `
454- )
455- console . log (
456- ` → Potential: ~${ capacity . potentialGB . toLocaleString ( ) } GB/month (deposit ${ formatUSDFC ( capacity . additionalDepositNeeded ) } more)`
457- )
458- } else {
459- console . log ( ` → Estimated capacity: ~${ capacity . actualGB . toLocaleString ( ) } GB/month` )
460- console . log ( pc . gray ( ' (varies with CDN usage and data set fees)' ) )
461- }
432+ displayServicePermissions (
433+ 'Your WarmStorage Service Limits' ,
434+ monthlyRate ,
435+ finalStatus . currentAllowances . lockupAllowance ,
436+ finalStatus . depositedAmount ,
437+ pricePerTiBPerEpoch
438+ )
462439
463440 // Show deposit warning if needed
464441 displayDepositWarning ( finalStatus . depositedAmount , finalStatus . currentAllowances . lockupUsed )
0 commit comments