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

cli: dev get-coin don't check account #3589

Merged
merged 1 commit into from
Jul 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cmd/starcoin/src/dev/get_coin_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ impl CommandAction for GetCoinCommand {
let state = ctx.state();
let net = ctx.state().net();
let account_client = ctx.state().account_client();
let to = ctx.state().get_account_or_default(opt.address_or_receipt)?;
let to = if let Some(account_address) = opt.address_or_receipt {
account_address
} else {
ctx.state().default_account()?.address
};

let transaction_info = if net.is_test_or_dev() {
let sender = account_config::association_address();
Expand All @@ -67,7 +71,7 @@ impl CommandAction for GetCoinCommand {
.build_and_execute_transaction(
txn_opt,
TransactionPayload::ScriptFunction(encode_transfer_script_by_token_code(
to.address,
to,
opt.amount.scaling(),
G_STC_TOKEN_CODE.clone(),
)),
Expand Down