Merge branch 'bug/530-eth-deposit_address' into 'develop'
#530 - fix ETH deposit_address See merge request PBSA/peerplays!222
This commit is contained in:
commit
3e1f38d972
2 changed files with 12 additions and 2 deletions
|
|
@ -36,6 +36,15 @@ namespace graphene { namespace chain {
|
|||
deposit_address(""),
|
||||
withdraw_public_key(""),
|
||||
withdraw_address("") {}
|
||||
|
||||
inline string get_deposit_address() const {
|
||||
if(sidechain_type::ethereum != sidechain)
|
||||
return deposit_address;
|
||||
|
||||
auto deposit_address_lower = deposit_address;
|
||||
std::transform(deposit_address_lower.begin(), deposit_address_lower.end(), deposit_address_lower.begin(), ::tolower);
|
||||
return deposit_address_lower;
|
||||
}
|
||||
};
|
||||
|
||||
struct by_account;
|
||||
|
|
@ -76,7 +85,7 @@ namespace graphene { namespace chain {
|
|||
ordered_non_unique< tag<by_sidechain_and_deposit_address_and_expires>,
|
||||
composite_key<sidechain_address_object,
|
||||
member<sidechain_address_object, sidechain_type, &sidechain_address_object::sidechain>,
|
||||
member<sidechain_address_object, string, &sidechain_address_object::deposit_address>,
|
||||
const_mem_fun<sidechain_address_object, string, &sidechain_address_object::get_deposit_address>,
|
||||
member<sidechain_address_object, time_point_sec, &sidechain_address_object::expires>
|
||||
>
|
||||
>
|
||||
|
|
|
|||
|
|
@ -914,8 +914,9 @@ void sidechain_net_handler_ethereum::handle_event(const std::string &block_numbe
|
|||
const boost::property_tree::ptree tx = tx_child.second;
|
||||
tx_idx = tx_idx + 1;
|
||||
|
||||
const std::string from = tx.get<std::string>("from");
|
||||
const std::string to = tx.get<std::string>("to");
|
||||
std::string from = tx.get<std::string>("from");
|
||||
std::transform(from.begin(), from.end(), from.begin(), ::tolower);
|
||||
|
||||
std::string cmp_to = to;
|
||||
std::transform(cmp_to.begin(), cmp_to.end(), cmp_to.begin(), ::toupper);
|
||||
|
|
|
|||
Loading…
Reference in a new issue