Skip to content

Commit

Permalink
Add unlock check to update_account cli command steemit#184
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Vandeberg committed Jul 20, 2016
1 parent 9e14ae1 commit dfbe0bf
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions libraries/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1302,21 +1302,27 @@ annotated_signed_transaction wallet_api::update_account(
public_key_type posting,
public_key_type memo,
bool broadcast )const
{ try {
account_update_operation op;
op.account = account_name;
op.owner = authority( 1, owner, 1 );
op.active = authority( 1, active, 1);
op.posting = authority( 1, posting, 1);
op.memo_key = memo;
op.json_metadata = json_meta;
{
try
{
FC_ASSERT( !is_locked() );

signed_transaction tx;
tx.operations.push_back(op);
tx.validate();
account_update_operation op;
op.account = account_name;
op.owner = authority( 1, owner, 1 );
op.active = authority( 1, active, 1);
op.posting = authority( 1, posting, 1);
op.memo_key = memo;
op.json_metadata = json_meta;

return my->sign_transaction( tx, broadcast );
} FC_CAPTURE_AND_RETHROW( (account_name)(json_meta)(owner)(active)(memo)(broadcast) ) }
signed_transaction tx;
tx.operations.push_back(op);
tx.validate();

return my->sign_transaction( tx, broadcast );
}
FC_CAPTURE_AND_RETHROW( (account_name)(json_meta)(owner)(active)(memo)(broadcast) )
}

annotated_signed_transaction wallet_api::update_account_auth_key( string account_name, authority_type type, public_key_type key, weight_type weight, bool broadcast )
{
Expand Down

0 comments on commit dfbe0bf

Please sign in to comment.