Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(iota): Remove extra address generation in client commands #4644

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

DaughterOfMars
Copy link
Contributor

Description of change

Removes an extra address generation in prompt_if_no_config when calling iota client new-address. This function generates a new address if none exists, but this should be done by the command. Instead, two addresses are generated. This PR fixes this by checking the command variant and skipping the extra address generation for this specific command.

Before

Config file ["/Users/thibault/.iota/iota_config/client.yaml"] doesn't exist, do you want to connect to a Iota Full node server [y/N]?y
Iota Full node server URL (Defaults to Iota Testnet if not specified) : 
Select key scheme to generate keypair (0 for ed25519, 1 for secp256k1, 2: for secp256r1):
0
Keys saved as Bech32.
Generated new keypair and alias for address with scheme "ed25519" [amazing-sunstone: 0xf6dffdc2a6af842bac816180a83d31616d9dc216b8a7882a84bdcef08e6326af]
Secret Recovery Phrase : [clutch solution favorite into excuse own divert adjust attract couple uncle exile]
Keys saved as Bech32.
[warn] Client/Server api version mismatch, client api version: 0.8.0-alpha, server api version: 0.7.3-rc
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Created new keypair and saved it to keystore.                                                     │
├────────────────┬──────────────────────────────────────────────────────────────────────────────────┤
│ alias          │ peaceful-spodumene                                                               │
│ address        │ 0x4c582c8dee21d59e3a57600e1c866c49414cbfbafad1d1c7973e91b1bc7202d5               │
│ keyScheme      │ ed25519                                                                          │
│ recoveryPhrase │ original unhappy thunder gaze marriage advice raw there vocal holiday seat drama │
╰────────────────┴──────────────────────────────────────────────────────────────────────────────────╯

After

Config file ["/Users/chloe/.iota/iota_config/client.yaml"] doesn't exist, do you want to connect to a Iota Full node server [y/N]?y
Iota Full node server URL (Defaults to Iota Testnet if not specified) : 
Keys saved as Bech32.
[warn] Client/Server api version mismatch, client api version: 0.8.0-alpha, server api version: 0.7.3-rc
╭────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Created new keypair and saved it to keystore.                                                  │
├────────────────┬───────────────────────────────────────────────────────────────────────────────┤
│ alias          │ unruffled-zircon                                                              │
│ address        │ 0x1b7242b51f96af36a4483b855092dea80be4af518c05e00995c66096aa2c828b            │
│ keyScheme      │ ed25519                                                                       │
│ recoveryPhrase │ rhythm market elephant bitter room maid ozone include snap sport sleep damage │
╰────────────────┴───────────────────────────────────────────────────────────────────────────────╯

@DaughterOfMars DaughterOfMars requested a review from a team as a code owner December 30, 2024 14:54
@iota-ci iota-ci added dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group. labels Dec 30, 2024
@thibault-martinez thibault-martinez merged commit 08c1ba5 into develop Dec 31, 2024
42 checks passed
@thibault-martinez thibault-martinez deleted the dev-tools/address-prompt branch December 31, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants