• potential solution for those using v2+ with the new 111 character master keys. Someone please verify

    open the file bwwc-bitcoin-gateway.php

    find line
    else if (!preg_match ('/^[a-f0-9]{128}$/', $this->electrum_master_public_key))

    replace with
    else if (!preg_match ('/^[0-9a-zA-Z]{111}$/', $this->electrum_master_public_key))

    open file bcmath_Utils.php

    find
    define('MAX_BASE', 128);

    replace with
    define('MAX_BASE', 111);

    https://www.ads-software.com/plugins/bitcoin-payments-for-woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • eosin, your solution worked perfectly for me.

    However…. Your solution let me use the key, but now I’m getting an error upon checkout. When I check Bitcoin as my payment, and click Place Order, the order does not go through and I get the following error at the top of the checkout page:

    “CurveCurveFp Object ( [a:protected] => 0 [b:protected] => 7 [prime:protected] => 115792089237316195423570985008687907853269984665640564039457584007908834671663 ) does not contain point ( 20139727203196486522876591193063649819462947761513549103823800141681658369 , 369049320460203173903206256216019890340108033867982827520 )”

    I don’t know if this error is related to the code changes (above) or if it is something different.

    Here is the URL: https://www.goldextradellc.com/checkout/

    Any help / suggestions you can give me would be great. Thanks

    I had the same error than 517Desing.

    The fix is here: https://bitcoin.stackexchange.com/questions/37386/error-in-checkout-while-using-bitcoin-payments-by-bitcoinway-with-woocommerce

    It is basically downgrade electrum version to get an old sized public key (version 1.9.8), use the plugin and upgrade.

    the solution gets the plugin working but just to be sure i understand – it still doesn’t let u use the new style MPK (the ones that start with “xpub”) correct?

    I wouldn’t mind being able to use the new MPK style with electrum v2.4.4 as opposed to my current way which uses the old 1.9.8 MPK style with electrum v2.4.4 which certainly works.

    Not sure what id really gain but just seems easier and i think the new MPK style is better in a few different ways and more cross-compatible.

    So is the original proposed workaround in this thread about changing length to 128 allowing anybody to successfully use the new style MPK (“xpub”)? or still using old MPK style?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Potential Fix for Electrum v2 and new 111 length Master Keys’ is closed to new replies.