#260 get_son_by_account_id instead of get_son_by_account in wallet_api
This commit is contained in:
parent
0f3ea3d637
commit
eb43bc3635
1 changed files with 5 additions and 5 deletions
|
|
@ -1946,7 +1946,7 @@ public:
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
account_id_type owner_account_id = get_account_id(owner_account);
|
account_id_type owner_account_id = get_account_id(owner_account);
|
||||||
fc::optional<son_object> son = _remote_db->get_son_by_account(owner_account_id);
|
fc::optional<son_object> son = _remote_db->get_son_by_account_id(owner_account_id);
|
||||||
if (son)
|
if (son)
|
||||||
return *son;
|
return *son;
|
||||||
else
|
else
|
||||||
|
|
@ -2075,7 +2075,7 @@ public:
|
||||||
son_create_op.pay_vb = pay_vb_id;
|
son_create_op.pay_vb = pay_vb_id;
|
||||||
son_create_op.sidechain_public_keys = sidechain_public_keys;
|
son_create_op.sidechain_public_keys = sidechain_public_keys;
|
||||||
|
|
||||||
if (_remote_db->get_son_by_account(son_create_op.owner_account))
|
if (_remote_db->get_son_by_account_id(son_create_op.owner_account))
|
||||||
FC_THROW("Account ${owner_account} is already a SON", ("owner_account", owner_account));
|
FC_THROW("Account ${owner_account} is already a SON", ("owner_account", owner_account));
|
||||||
|
|
||||||
signed_transaction tx;
|
signed_transaction tx;
|
||||||
|
|
@ -2712,7 +2712,7 @@ public:
|
||||||
|
|
||||||
account_object voting_account_object = get_account(voting_account);
|
account_object voting_account_object = get_account(voting_account);
|
||||||
account_id_type son_account_id = get_account_id(son);
|
account_id_type son_account_id = get_account_id(son);
|
||||||
fc::optional<son_object> son_obj = _remote_db->get_son_by_account(son_account_id);
|
fc::optional<son_object> son_obj = _remote_db->get_son_by_account_id(son_account_id);
|
||||||
if (!son_obj)
|
if (!son_obj)
|
||||||
FC_THROW("Account ${son} is not registered as a son", ("son", son));
|
FC_THROW("Account ${son} is not registered as a son", ("son", son));
|
||||||
if (approve)
|
if (approve)
|
||||||
|
|
@ -2756,7 +2756,7 @@ public:
|
||||||
for (const std::string& son : sons_to_approve)
|
for (const std::string& son : sons_to_approve)
|
||||||
{
|
{
|
||||||
account_id_type son_owner_account_id = get_account_id(son);
|
account_id_type son_owner_account_id = get_account_id(son);
|
||||||
fc::optional<son_object> son_obj = _remote_db->get_son_by_account(son_owner_account_id);
|
fc::optional<son_object> son_obj = _remote_db->get_son_by_account_id(son_owner_account_id);
|
||||||
if (!son_obj)
|
if (!son_obj)
|
||||||
FC_THROW("Account ${son} is not registered as a SON", ("son", son));
|
FC_THROW("Account ${son} is not registered as a SON", ("son", son));
|
||||||
auto insert_result = voting_account_object.options.votes.insert(son_obj->vote_id);
|
auto insert_result = voting_account_object.options.votes.insert(son_obj->vote_id);
|
||||||
|
|
@ -2766,7 +2766,7 @@ public:
|
||||||
for (const std::string& son : sons_to_reject)
|
for (const std::string& son : sons_to_reject)
|
||||||
{
|
{
|
||||||
account_id_type son_owner_account_id = get_account_id(son);
|
account_id_type son_owner_account_id = get_account_id(son);
|
||||||
fc::optional<son_object> son_obj = _remote_db->get_son_by_account(son_owner_account_id);
|
fc::optional<son_object> son_obj = _remote_db->get_son_by_account_id(son_owner_account_id);
|
||||||
if (!son_obj)
|
if (!son_obj)
|
||||||
FC_THROW("Account ${son} is not registered as a SON", ("son", son));
|
FC_THROW("Account ${son} is not registered as a SON", ("son", son));
|
||||||
unsigned votes_removed = voting_account_object.options.votes.erase(son_obj->vote_id);
|
unsigned votes_removed = voting_account_object.options.votes.erase(son_obj->vote_id);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue