This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -780,8 +780,13 @@ fn command_accounts(config: &Config, token: Option<Pubkey>) -> CommandResult {
780
780
println ! ( "None" ) ;
781
781
}
782
782
783
- println ! ( "Account Token Balance" ) ;
784
- println ! ( "-------------------------------------------------------------------------------------------------" ) ;
783
+ if token. is_some ( ) {
784
+ println ! ( "Account Balance" ) ;
785
+ println ! ( "----------------------------------------------------" ) ;
786
+ } else {
787
+ println ! ( "Account Token Balance" ) ;
788
+ println ! ( "-------------------------------------------------------------------------------------------------" ) ;
789
+ }
785
790
for keyed_account in accounts {
786
791
let address = keyed_account. pubkey ;
787
792
@@ -799,13 +804,20 @@ fn command_accounts(config: &Config, token: Option<Pubkey>) -> CommandResult {
799
804
} else {
800
805
"" . to_string ( )
801
806
} ;
802
- println ! (
803
- "{:<44} {:<44} {}{}" ,
804
- address,
805
- ui_token_account. mint,
806
- ui_token_account. token_amount. ui_amount,
807
- maybe_frozen
808
- )
807
+ if token. is_some ( ) {
808
+ println ! (
809
+ "{:<44} {}{}" ,
810
+ address, ui_token_account. token_amount. ui_amount, maybe_frozen
811
+ )
812
+ } else {
813
+ println ! (
814
+ "{:<44} {:<44} {}{}" ,
815
+ address,
816
+ ui_token_account. mint,
817
+ ui_token_account. token_amount. ui_amount,
818
+ maybe_frozen
819
+ )
820
+ }
809
821
}
810
822
Ok ( _) => println ! ( "{:<44} Unsupported token account" , address) ,
811
823
Err ( err) => println ! ( "{:<44} Account parse failure: {}" , address, err) ,
You can’t perform that action at this time.
0 commit comments