26 namespace graphene {
namespace wallet {
namespace detail {
31 : (--_builder_transactions.end())->
first + 1;
32 _builder_transactions[trx_handle] = {};
39 FC_ASSERT(_builder_transactions.count(transaction_handle) > 0);
40 _builder_transactions[transaction_handle].operations.emplace_back(op);
44 uint32_t operation_index,
const operation& new_op)
46 FC_ASSERT(_builder_transactions.count(handle) > 0);
54 FC_ASSERT(_builder_transactions.count(handle) > 0);
56 auto fee_asset_obj =
get_asset(fee_asset);
59 auto gprops =
_remote_db->get_global_properties().parameters;
60 if( fee_asset_obj.get_id() != asset_id_type() )
62 for(
auto& op : _builder_transactions[handle].operations )
63 total_fee += gprops.get_current_fees().set_fee( op, fee_asset_obj.options.core_exchange_rate );
65 FC_ASSERT((total_fee * fee_asset_obj.options.core_exchange_rate).amount <=
66 get_object(fee_asset_obj.dynamic_asset_data_id).fee_pool,
67 "Cannot pay fees in ${asset}, as this asset's fee pool is insufficiently funded.",
68 (
"asset", fee_asset_obj.symbol));
70 for(
auto& op : _builder_transactions[handle].operations )
71 total_fee += gprops.get_current_fees().set_fee( op );
79 FC_ASSERT(_builder_transactions.count(handle) > 0);
80 return _builder_transactions[handle];
84 transaction_handle,
bool broadcast )
86 FC_ASSERT(_builder_transactions.count(transaction_handle) > 0);
88 return _builder_transactions[transaction_handle] =
93 transaction_handle,
const vector<public_key_type>& signing_keys,
bool broadcast)
95 FC_ASSERT(_builder_transactions.count(transaction_handle) > 0);
97 return _builder_transactions[transaction_handle] =
98 sign_transaction2(_builder_transactions[transaction_handle], signing_keys, broadcast);
102 time_point_sec expiration, uint32_t review_period_seconds,
bool broadcast)
108 string account_name_or_id, time_point_sec expiration, uint32_t review_period_seconds,
bool broadcast )
110 FC_ASSERT(_builder_transactions.count(handle) > 0);
116 [](
const operation& op) { return op_wrapper(op); });
117 if( review_period_seconds )
120 _remote_db->get_global_properties().parameters.get_current_fees().set_fee( trx.
operations.front() );
127 _builder_transactions.erase(handle);