mirror of
https://github.com/aljazceru/ark.git
synced 2026-01-31 09:04:46 +01:00
Give expiration details only when flag is set (#116)
This commit is contained in:
committed by
GitHub
parent
936f9c5f51
commit
7c8ee7ab12
@@ -24,7 +24,7 @@ var balanceCommand = cli.Command{
|
||||
}
|
||||
|
||||
func balanceAction(ctx *cli.Context) error {
|
||||
expiryDetails := ctx.Bool("expiry-details")
|
||||
withExpiryDetails := ctx.Bool("expiry-details")
|
||||
|
||||
client, cancel, err := getClientFromState(ctx)
|
||||
if err != nil {
|
||||
@@ -44,7 +44,9 @@ func balanceAction(ctx *cli.Context) error {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
explorer := NewExplorer()
|
||||
balance, amountByExpiration, err := getOffchainBalance(ctx, explorer, client, offchainAddr, true)
|
||||
balance, amountByExpiration, err := getOffchainBalance(
|
||||
ctx, explorer, client, offchainAddr, withExpiryDetails,
|
||||
)
|
||||
if err != nil {
|
||||
chRes <- balanceRes{0, 0, nil, err}
|
||||
return
|
||||
@@ -134,7 +136,7 @@ func balanceAction(ctx *cli.Context) error {
|
||||
offchainBalanceJSON["next_expiration"] = fancyTimeExpiration
|
||||
}
|
||||
|
||||
if expiryDetails {
|
||||
if withExpiryDetails {
|
||||
offchainBalanceJSON["details"] = details
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user