I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Getting withdrawal settings for a CoinPayments coin in PHP

dashed-slug.net Forums CoinPayments.net Wallet Adapter extension support Getting withdrawal settings for a CoinPayments coin in PHP

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #11420

    im curious as to where this page is saved in the DB?

    one reason is we are doing a different UI and we want to check these on the fly

    Minimum withdrawal amount
    Withdrawal fee (fixed)

    figured there was just a way to do a DB call to find that info




    I can help you find the data in the DB (but this will change in the upcoming wallets6 release).

    In the current CoinPayments adapter, every coin has its slug prefix. In wallets-cp.php, notice the code:

    foreach ( $this->coins as $symbol => &$coin ):
    	$coin_option_slug = preg_replace( '/\W/', '-', 'wallets-cp-' . strtolower( $symbol ) . '-settings' );
    	$enabled = Dashed_Slug_Wallets::get_option( "{$coin_option_slug}-general-enabled" );

    So, a coin with ticker symbol XYZ will typically have a prefix of: wallets-cp-xyz-settings. If the ticker symbol contains characters that are not letters, then these characters are replaced with a dash (-).

    The withdraw fee is in the option: wallets-cp-xyz-settings-fees-withdraw

    And the minimum withdrawal amount is in the option: wallets-cp-xyz-settings-general-minwithdraw

    You can get these values with get_option.

    It was necessary to change this in wallets6 for a few reasons:

    – Currencies and wallets will now be stored as posts.
    – The currency settings are decoupled from the wallet settings for clarity.
    – All amounts are now stored as integers to avoid floating point errors.

    So, in the upcoming release, these will be stored as meta values on the currency post. It will be very easy to retrieve a currency and check its fields. When the time comes, ask me again, if you want to adapt your UI code to wallets6. I promise it will not be hard to make the change.

    with regards


    sweet thanks…

    so will wallet 5 still work for a while , i know you mentioned it would a while back but wasn’t sure if that would remain the case.



    Yes, wallets 5.x will work forever exactly as it works now, but it will not be updated any more and will gradually become obsolete.

    And it will be up to you to update to wallets6 when you choose to do so.

    Since you will have to make some small changes in your code: You can install wallets6 on a dev/integration machine and modify your code there, then deploy to live when you decide to upgrade to wallets6.

    with regards

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.