-
Notifications
You must be signed in to change notification settings - Fork 6
fix: refresh payments status CLI output #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the payment status display command to provide a more structured and detailed view of Filecoin Pay balances, storage usage, and costs. It also adds an optional --include-rails flag to conditionally display payment rail information.
- Adds a new
formatStorageGiBfunction to calculate and display warm storage size from spend rates - Restructures the status output with separate sections for Wallet, Filecoin Pay, and WarmStorage Usage
- Introduces the
--include-railsoption to conditionally display payment rail details - Refactors
displayPaymentRailsSummaryto support nested indentation and removes daily/monthly cost calculations from rails (moved to main Filecoin Pay section)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/payments/status.ts | Adds storage size calculation, restructures status display with detailed cost breakdowns, conditionally fetches payment rails data, and refactors the rails summary display function for flexible indentation |
| src/commands/payments.ts | Adds the --include-rails option to the status command to allow users to opt-in to viewing payment rail details |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BigLep
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output generally looks good to me.
Only area want to fix is around payment rail rates so we get consistency:
We currently have:
│ Spend rate: 0.000001 USDFC/epoch
│ Daily cost: 0.0040 USDFC
│ Monthly cost: 0.1200 USDFC
All 3 of these are rates, so I think can be made consistent.
Option 1:
│ Epoch cost: 0.000001 USDFC
│ Daily cost: 0.0040 USDFC
│ Monthly cost: 0.1200 USDFC
Option 2:
│ Spend rate: 0.000001 USDFC/epoch | 0.0040 USDFC/day | 0.1200 USDFC/month
Refresh payments status CLI output
Changes
Fixes #69
Output
New payments status output
With new
--include-railsoption