Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Commit

Permalink
Wallet shouldn't try to vote with non-base assets
Browse files Browse the repository at this point in the history
  • Loading branch information
vikramrajkumar committed Jan 22, 2015
1 parent f101f84 commit c2bb777
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libraries/wallet/transaction_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,13 @@ transaction_builder& transaction_builder::finalize( bool pay_fee )
address deposit_address = order_key_for_account(outstanding_balance.first.first, account_name);

if( balance.amount == 0 ) continue;
else if( balance.amount > 0 ) trx.deposit(deposit_address, balance, slate_id);
else if( balance.amount > 0 )
{
if( balance.asset_id == 0 )
trx.deposit(deposit_address, balance, slate_id);
else
trx.deposit(deposit_address, balance, 0);
}
else _wimpl->withdraw_to_transaction(-balance, account_name, trx, required_signatures);
}

Expand Down

0 comments on commit c2bb777

Please sign in to comment.