fix address validation

This commit is contained in:
wowario 2021-05-13 13:15:08 +03:00
parent b9e5fcc96e
commit 8122cdf8ef
No known key found for this signature in database
GPG key ID: 24DCBE762DE9C111

View file

@ -115,7 +115,7 @@ class Monero_Gateway extends WC_Payment_Gateway
public function validate_monero_address_field($key,$address)
{
if($this->settings['confirm_type'] == 'viewkey') {
if (strlen($address) == 95 && substr($address, 0, 1) == '4')
if (strlen($address) == 97)
if(self::$cryptonote->verify_checksum($address))
return $address;
self::$_errors[] = 'Wownero address is invalid';