• Resolved iztalo

    (@iztalo)


    Hello folks,

    I’m using the latest version of this plugin, and I’d like to implement a bitcoin address validator in the withdraw input to avoid errors at the time of sending bitcoins to user.

    Any ideas?

    I searched and found some ways to do this with javascript but I wonder if the developer would not like to implement this function so we would avoid modifying the plugin code erroneously.

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author dashed-slug.net

    (@dashedslug)

    Hello, this is not a bad idea, but the issue here is that the validation should apply to all coins, not just Bitcoin. As you know the plugin supports a number of coin adapters. There are two possible solutions:

    • Coin adapters can provide their own validation function for the [wallets_withdraw] UI. Then I can start with Bitcoin and proceed.
    • Coin adapters can provide hookable javascript events so that users can provide their own validation function.

    I believe the best approach would be a mixture of the two: Make the withdraw UI hookable with javascript validation functions and then the Bitcoin and other adapters can provide validators.

    I will make a note of this and will implement it when time permits.

    Keep in mind that even if a user enters an invalid address, they will eventually be notified by email because the withdraw operation will fail at the wallet level and this will be propagated to the user. Admittedly a javascript-level validation can save some time but any check that you can do with javascript, the wallet will do as well.

    Thanks for your suggestion. Let me know what you think about the proposed solution.

    regards,
    Alex

    Thread Starter iztalo

    (@iztalo)

    Yes, I agree with this solution. Thanks for the answer.

    Plugin Author dashed-slug.net

    (@dashedslug)

    This has now been implemented in 2.5.0.

    Have a look at the release post for more information:

    https://www.dashed-slug.net/javascript-address-validators-menu-item-balances/

    To see an example of how to append a validator, have a look at the accompanying PDF documentation. The PDF documentation is available in the bundle download that you can get from https://dashed-slug.net/downloads.

    A Bitcoin validator is added into the built-in Bitcoin core node adapter and more validators will be added to the other coin adapters soon.

    regards,
    Alex

    Thread Starter iztalo

    (@iztalo)

    You are the best, bro! Thanks a lot!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bitcoin address validator (withdraw)’ is closed to new replies.