Skip to content

Commit c133135

Browse files
authored
removes ledger flag from 'wallet:multisig:participant:create' (#5732)
there is no longer a need to "create" the participant identity from the Ledger device by importing it into the walletDB since our CLI commands now read the identity directly from the Ledger when needed removes the '--ledger' flag from the command and thereby removes the call to importParticipant Closes IFL-3168
1 parent 06d2fd7 commit c133135

File tree

1 file changed

+1
-28
lines changed
  • ironfish-cli/src/commands/wallet/multisig/participant

1 file changed

+1
-28
lines changed

ironfish-cli/src/commands/wallet/multisig/participant/create.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { RPC_ERROR_CODES, RpcRequestError } from '@ironfish/sdk'
55
import { Flags } from '@oclif/core'
66
import { IronfishCommand } from '../../../../command'
77
import { RemoteFlags } from '../../../../flags'
8-
import { LedgerMultiSigner } from '../../../../ledger'
98
import * as ui from '../../../../ui'
109

1110
export class MultisigIdentityCreate extends IronfishCommand {
@@ -17,10 +16,6 @@ export class MultisigIdentityCreate extends IronfishCommand {
1716
char: 'n',
1817
description: 'Name to associate with the identity',
1918
}),
20-
ledger: Flags.boolean({
21-
default: false,
22-
description: 'Perform operation with a ledger device',
23-
}),
2419
}
2520

2621
async start(): Promise<void> {
@@ -34,22 +29,10 @@ export class MultisigIdentityCreate extends IronfishCommand {
3429
name = await ui.inputPrompt('Enter a name for the identity', true)
3530
}
3631

37-
let identity
38-
if (flags.ledger) {
39-
identity = await this.getIdentityFromLedger()
40-
}
41-
4232
let response
4333
while (!response) {
4434
try {
45-
if (identity) {
46-
response = await client.wallet.multisig.importParticipant({
47-
name,
48-
identity: identity.toString('hex'),
49-
})
50-
} else {
51-
response = await client.wallet.multisig.createParticipant({ name })
52-
}
35+
response = await client.wallet.multisig.createParticipant({ name })
5336
} catch (e) {
5437
if (
5538
e instanceof RpcRequestError &&
@@ -68,14 +51,4 @@ export class MultisigIdentityCreate extends IronfishCommand {
6851
this.log('Identity:')
6952
this.log(response.content.identity)
7053
}
71-
72-
async getIdentityFromLedger(): Promise<Buffer> {
73-
const ledger = new LedgerMultiSigner()
74-
75-
return ui.ledger({
76-
ledger,
77-
message: 'Getting Ledger Identity',
78-
action: () => ledger.dkgGetIdentity(0),
79-
})
80-
}
8154
}

0 commit comments

Comments
 (0)