File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed
ironfish-cli/src/commands/wallet/multisig/account Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,29 @@ export class MultisigAccountParticipants extends IronfishCommand {
2323 const client = await this . connectRpc ( )
2424 await ui . checkWalletUnlocked ( client )
2525
26- const response = await client . wallet . multisig . getAccountIdentities ( {
27- account : flags . account ,
28- } )
26+ const accountIdentities = (
27+ await client . wallet . multisig . getAccountIdentities ( {
28+ account : flags . account ,
29+ } )
30+ ) . content . identities
2931
30- for ( const identity of response . content . identities ) {
32+ const participants = ( await client . wallet . multisig . getIdentities ( ) ) . content . identities
33+
34+ const matchingIdentities = participants . filter ( ( identity ) =>
35+ accountIdentities . includes ( identity . identity ) ,
36+ )
37+
38+ let participant : string | undefined
39+ if ( matchingIdentities . length === 1 ) {
40+ participant = matchingIdentities [ 0 ] . identity
41+ this . log ( `Your identity:\n${ participant } ` )
42+ this . log ( '\nOther participating identities:' )
43+ }
44+
45+ for ( const identity of accountIdentities ) {
46+ if ( participant && participant === identity ) {
47+ continue
48+ }
3149 this . log ( identity )
3250 }
3351 }
You can’t perform that action at this time.
0 commit comments