Skip to content

Commit

Permalink
Always return array when get fungible balance
Browse files Browse the repository at this point in the history
  • Loading branch information
harrywong committed Oct 29, 2018
1 parent 1816c29 commit 82ef953
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libraries/chain/contracts/evt_contract_abi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace evt { namespace chain { namespace contracts {

static auto evt_abi_version = 3;
static auto evt_abi_minor_version = 3;
static auto evt_abi_minor_version = 4;
static auto evt_abi_patch_version = 0;

version
Expand Down
5 changes: 3 additions & 2 deletions plugins/evt_plugin/evt_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ fc::variant
read_only::get_fungible_balance(const get_fungible_balance_params& params) {
const auto& db = db_.token_db();

variants vars;
if(params.sym_id.valid()) {
fungible_def fungible;
db.read_fungible(*params.sym_id, fungible);
Expand All @@ -126,10 +127,10 @@ read_only::get_fungible_balance(const get_fungible_balance_params& params) {
asset as;
db.read_asset_no_throw(params.address, fungible.sym, as);
fc::to_variant(as, var);
return var;
vars.emplace_back(std::move(var));
return vars;
}
else {
variants vars;
db.read_all_assets(params.address, [&vars](const auto& as) {
variant var;
fc::to_variant(as, var);
Expand Down

0 comments on commit 82ef953

Please sign in to comment.