@@ -396,8 +396,8 @@ namespace dns_utils {
396396// -----------------------------------------------------------------------
397397// TODO: parse the string in a less stupid way, probably with regex
398398std::string address_from_txt_record (const std::string &s) {
399- // make sure the txt record has "oa1:xmr " and find it
400- auto pos = s.find (" oa1:xmr " );
399+ // make sure the txt record has "oa1:xla " and find it
400+ auto pos = s.find (" oa1:xla " );
401401 if (pos == std::string::npos)
402402 return {};
403403 // search from there to find "recipient_address="
@@ -409,12 +409,12 @@ std::string address_from_txt_record(const std::string &s) {
409409 auto pos2 = s.find (" ;" , pos);
410410 if (pos2 != std::string::npos) {
411411 // length of address == 95, we can at least validate that much here
412- if (pos2 - pos == 95 ) {
413- return s.substr (pos, 95 );
412+ if (pos2 - pos == 97 ) {
413+ return s.substr (pos, 97 );
414414 } else if (pos2 - pos ==
415- 106 ) // length of address == 106 --> integrated address
415+ 109 ) // length of address == 106 --> integrated address
416416 {
417- return s.substr (pos, 106 );
417+ return s.substr (pos, 109 );
418418 }
419419 }
420420 return {};
@@ -481,7 +481,7 @@ std::string get_account_address_as_str_from_url(
481481 // attempt to get address from dns query
482482 auto addresses = addresses_from_url (url, dnssec_valid);
483483 if (addresses.empty ()) {
484- LOG_ERROR (" wrong address: " << url);
484+ LOG_ERROR (" wrong address for UD : " << url);
485485 return {};
486486 }
487487 return dns_confirm (url, addresses, dnssec_valid);
0 commit comments