Skip to content

Commit

Permalink
Skip listing transactions with 0 active confirmations
Browse files Browse the repository at this point in the history
  • Loading branch information
jtolio committed Feb 20, 2024
1 parent d24a5ce commit e2175e2
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions cmd_query_multisig_transaction_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,29 @@ func (cmd *cmdQueryMultiSigTransactionList) Execute(ctx context.Context) error {
return err
}

for i, transactionID := range transactionIDs {
needsSeparator := false

for _, transactionID := range transactionIDs {
confirmations, err := caller.GetTransactionConfirmations(ctx, transactionID)
if err != nil {
return err
}
if len(confirmations) == 0 {
continue
}

if !cmd.status {
fmt.Fprintln(clingy.Stdout(ctx), transactionID)
continue
}
if i > 0 {

if needsSeparator {
fmt.Fprintln(clingy.Stdout(ctx))
}
if err := printTransactionStatus(ctx, caller, transactionID); err != nil {
return err
}
needsSeparator = true
}
return nil
}

0 comments on commit e2175e2

Please sign in to comment.