Skip to content

Commit

Permalink
Merge pull request #54 from l-monninger/main
Browse files Browse the repository at this point in the history
[CLI] Provides missing patch on init
  • Loading branch information
l-monninger authored Oct 2, 2023
2 parents 0c2b8dd + d0253c9 commit 64ca2d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions m1/movement/src/common/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
ConfigSearchMode, EncodingOptions, PrivateKeyInputOptions, ProfileConfig,
ProfileOptions, PromptOptions, RngArgs, DEFAULT_PROFILE,
},
utils::{fund_account, prompt_yes_with_override, read_line, wait_for_transactions},
utils::{fund_account, fund_pub_key, prompt_yes_with_override, read_line, wait_for_transactions},
},
};
use aptos_crypto::{ed25519::Ed25519PrivateKey, PrivateKey, ValidCryptoMaterialStringExt};
Expand Down Expand Up @@ -179,7 +179,7 @@ impl CliCommand<()> for InitTool {
let address = lookup_address(&client, derived_address, false).await?;

profile_config.private_key = Some(private_key);
profile_config.public_key = Some(public_key);
profile_config.public_key = Some(public_key.clone());
profile_config.account = Some(address);

// Create account if it doesn't exist (and there's a faucet)
Expand Down Expand Up @@ -229,11 +229,11 @@ impl CliCommand<()> for InitTool {
"Account {} doesn't exist, creating it and funding it with {} Octas",
address, NUM_DEFAULT_OCTAS
);
let hashes = fund_account(
let hashes = fund_pub_key(
Url::parse(faucet_url)
.map_err(|err| CliError::UnableToParse("rest_url", err.to_string()))?,
NUM_DEFAULT_OCTAS,
address,
// NUM_DEFAULT_OCTAS,
(public_key.clone()).to_string(),
)
.await?;
wait_for_transactions(&client, hashes).await?;
Expand Down

0 comments on commit 64ca2d1

Please sign in to comment.