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!

alexg

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 2,207 total)
  • Author
    Posts
  • in reply to: Duplicate currency entries created #13750
    alexg
    Keymaster

    Hello,
    Since you are running on a local web server, you don’t have to forward any ports, you can simply trigger /wp-cron.php from your local machine.
    Let me know if you encounter any problems.

    in reply to: Duplicate currency entries created #13748
    alexg
    Keymaster

    Hello,

    Thanks for reaching out. I have moved your post its own new thread.

    The Coin Adapter extension includes a cron job that continuously attempts to re-create any currencies that you have enabled in CoinPayments. But it should be skipping any already existing currencies.

    I have seen this problem before, and it’s hard to track down / reproduce, because it’s a concurrency issue that only occurs on some installations, but fortunately there is a workaround.

    First, to make sure, please check the following:

    1. Are you running the latest versions of wallets (6.3.1) and the CoinPayments adapter (2.0.8)?
    2. Visit _Settings_ -> _Bitcoin and Altcoin Wallets_ -> _Cron tasks_. Do you should see a message telling you to add DISABLE_WP_CRON to your wp-config.php file?

    If so, please go ahead and apply this edit to wp-config.php. This will disable the default trigerring of cron tasks by WordPress.

    The message will change to notify you that WP CRON is disabled and that you need to trigger crons manually.

    You should then set up some external cron that will hit /wp-cron.php on your site, once every minute. This has an added benefit: It will also improve the site’s performance, since transaction processing will no longer happen on user HTTP requests.

    Your cron entry should look something like this:

    * * * * * curl -Lk https://example.com/wp-cron.php

    You should be able to do this either via Cpanel, or with EasyCron or from another server that you control. Let me know if you need help.

    Once you switch the cron tasks to external triggering, the problem should not occur again.

    Finally, delete any currencies that are not used, and only leave the ones that already have transactions, if any.

    Hope this helps. Please let me know if you encounter any more problems or if you have any questions.

    with regards,
    Alex

    in reply to: CP Wallet adapter not performing withdraws #13718
    alexg
    Keymaster

    Glad to hear that withdrawals are working for you!

    The currency that pays for gas (in this case BNB), must be on the address that holds the token to be withdrawn. This is a limitation of CoinPayments. The plugin tries to move BNB around to fund addresses that hold tokens, so that these tokens are withdrawable. Of course these transfers also cost BNB. When you view in the plugin an address that holds a CP token, you can see whether there is enough gas on the address to facilitate withdrawal.

    Hope this helps.

    If you encounter any more problems with the plugin, please open a new topic or email me.

    with regards

    in reply to: CP Wallet adapter not performing withdraws #13715
    alexg
    Keymaster

    Hello,

    Thank you for providing details from the logs.

    1. First of all, is the currency that you are trying to withdraw a token or a coin? ERC-20 tokens suffer from an issue regarding gas fees, which is actually a limitation of the CP platform. The plugin has a gas management system but it requires setting up. (There is some further reading in the troubleshooting section of the CP adapter documentation about gas management for tokens.)

    To test if withdrawals are working, you can use Litecoin testnet or Dogecoin or some other non-token currency.

    2. The errors from the DSWallets\Migration_Task are to be expected if you have not used versions of the plugin before 6.0.0.

    3. I’m not sure about the could_not_set error: Maybe the cron jobs are not running? Deposits can work without the cron tasks, because they rely on IPNs.

    You can see if the crons are running at: “Dashboard” – “Bitcoin and Altcoin Wallets” -> “Debug” -> “Cron jobs last ran on:”

    4. You mentioned that there were no log entries from the Withdrawals_Task. My apologies, I forgot to mention that you should also enable verbose logging from the plugin’s settings:

    “Settings” -> “Bitcoin & Altcoin Wallets” -> “Cron tasks” -> “Verbose logging”.

    Shortly after you enable verbose logging there should be log entries from Withdrawals_Task even if nothing is withdrawn.

    Please let me know if you have questions about any of this.

    with regards,

    Alex

    in reply to: CP Wallet adapter not performing withdraws #13713
    alexg
    Keymaster

    Hello,

    To investigate, you can enable logging. Here’s instructions on how to do so:

    https://github.com/dashed-slug/wallets/blob/master/docs/troubleshooting.md#something-else-is-wrong-i-would-like-to-check-the-logs-for-any-errors-that-might-give-me-clues-as-to-whats-going-on

    Note that the plugin rotates over currencies and adapters, always running the next currency with an enabled adapter and with pending withdrawals.

    Once you get some log output, look for lines from the Withdrawals_Task. There should be information there, or you can email me the logs and I can advise further.

    There should also be some withdrawal requests visible in your CoinPayments account. These will be at: https://www.coinpayments.net/acct-ipn-history

    Hope this helps, let me know if you need help with the logs.

    with regards

    alexg
    Keymaster

    Hello,

    It sounds like you are doing something wrong.

    If you have implemented the wallet adapter correctly, then you shouldn’t have to do anything else. You should be able to perform deposits and withdrawals via the plugin’s built-in UIs ([wallets_deposit] and [wallets_withdraw]). The WP-REST API is useful only if you want to add new UIs, such as functionality that doesn’t already exist in the plugin.

    Available materials

    The documentation and sample code for implementing a wallet adapter is here:

    https://github.com/dashed-slug/wallets/blob/6.3.1/docs/developer.md#developing-wallet-adapters-wallet-adapters

    You can also study the Monero Wallet adapter which is available for free download, or the build-in Bitcoin core adapter, which works for any forks of Bitcoin core with the same RPC API (Litecoin, Dogecoin, Bitcoin Cash, etc).

    I wouldrecommend that you start by following the instructions to setup the adapter and its settings. You may want to start from this template code: https://github.com/dashed-slug/my-wallet-adapter

    Withdrawals

    Implementing withdrawals is easy: just fill in the implementation for do_withdrawals(). Process the withdrawals and change their state on the withdrawal transactions afterwards. You can also set any TXID or timestamp or other data if you like. They will be saved by the plugin to the DB after the do_withdrawals() call.

    Here’s how the withdrawals are implemented for Bitcoin core:

    https://github.com/dashed-slug/wallets/blob/6.3.1/adapters/class-bitcoin-core-like-wallet-adapter.php#L429-L593

    Deposits

    Implementing deposits is a two step process:

    1. Implement the get_new_address() method which should return a new DSWallets\Address for the wallet. This is what the shortcode [wallets_deposit] displays.

    2. Implement deposit detection via polling: You would typically do this in the adapter’s cron() method which is called periodically. Once your cron code detects a new deposit, create a deposit DSWallets\Transaction object, and pass it to do_deposit() from the abstract superclass:

    https://github.com/dashed-slug/wallets/blob/6.3.1/adapters/abstract-wallet-adapter.php#L326

    The adapter’s cron() method gets called on cron runs, but not on every one. The plugin rotates between all active wallet adapters, and calls the cron() method of only one adapter each time. To see what cron tasks are run, you can enable verbose logging from the plugin’s settings.

    The withdrawals are executed by the DSWallets\Withdrawals_Task cron.

    The cron() method is executed by the DSWallets\Adapters_Task cron.

    If you end up publishing your adapter, let me know if you want me to add a link from this website to the adapter.

    Hope this helps. Please do contact me with any questions you may have about the plugin.

    with regards

    in reply to: Tip The Author Extension Deformating pages #13704
    alexg
    Keymaster

    Hello,

    I have published an updated version 3.1.0 to the extension with bbPress integration.

    You can read the release notes here:

    How to enable cryptocurrency tipping in bbPress forums

    with regards

    in reply to: Tip The Author Extension Deformating pages #13686
    alexg
    Keymaster

    Hello,

    The extension was not designed with bbpress forums in mind.

    It can attach to most custom post types as long as the post type is shown using a WordPress loop.

    I am taking a note of your request. If I can find some time, I will work on it and let you know.

    with regards

    in reply to: Suggestion: simple currency swapping UI #13644
    alexg
    Keymaster

    Yes, that is correct. There are several APIs that you can interface with. Please let me know if you have any questions.

    in reply to: Suggestion: simple currency swapping UI #13641
    alexg
    Keymaster

    Hi. This depends on your level of proficiency with PHP and JavaScript as well as the WordPress APIs.

    If you are a developer, you can start by looking at the templates, and also the plugin’s developer documentation: https://github.com/dashed-slug/wallets/blob/master/docs/developer.md

    I believe that the [[wallets_exchange_market_order]] shortcode is what you initially described.

    If you have a plan on what you want to do, let me know about any technical questions and I will try to put you in the right direction.

    with regards

    in reply to: Help with setting up the wallet and the adapters #13640
    alexg
    Keymaster

    OK, I’m not sure what you are hoping to do then?

    The plugin works with these types of technologies: https://www.dashed-slug.net/howto-choose-between-available-wallet-adapters/

    Please let me know if you have any questions about this.

    in reply to: Help with setting up the wallet and the adapters #13635
    alexg
    Keymaster

    Hello,

    Please see the video series here:

    You can also study the installation instructions to see how to connect to a full node wallet:

    Bitcoin and Altcoin Wallets WordPress plugin

    If you would rather connect to a CoinPayments adapter rather than a full node wallet, you can study the installation instructions for the CoinPayments adapter instead:

    CoinPayments.net Wallet Adapter extension

    The plugin and all its extensions come with extensive documentation under the menu item “Wallets Admin Docs”.

    Please let me know if you have any questions about anything.

    with regards

    in reply to: Suggestion: simple currency swapping UI #13634
    alexg
    Keymaster

    Hello,

    Thank you for your feedback.

    Unfortunately I am unable to implement suggestions or create new extensions.

    However, if you are using the Exchange extension, and if you can provide liquidity to a market by setting limit orders in that market, then you can use the shortcode: [wallets_exchange_market_order] with no arguments.

    The UI will determine which currency pairs are tradeable based on the availability of markets on your system, and will show a simple UI with two dropdowns.

    For more details see the relevant release notes:

    💱 Easy crypto swapping UI, plus theme-able templates for the Exchange extension

    Please let me know if you have any questions about this.

    with regards

    in reply to: php_curl error code 23 on site logs #13630
    alexg
    Keymaster

    Great to hear that you resolved the curl issue.

    This is not an error, it’s just a notice, informing you that upon plugin activation your admin user was given the manage_wallets capability:

    https://github.com/dashed-slug/wallets/blob/6.2.5/admin/capabilities.php#L310

    You should be good to go. Please let me know in a new thread if you have any more questions about the plugin.

    with regards

    in reply to: php_curl error code 23 on site logs #13622
    alexg
    Keymaster

    Hello,

    This error comes from the php_curl module. The module writes retrieved data from the web to a temporary file.

    Here the plugin is simply querying Coingecko for some exchange rates. Since in this case the data is very small in size, this should not normally be a problem.

    1. Check to see if the disk space on your web server is completely full. Only if the free space is 0 bytes this problem would arise. This could happen for example if you have left some logs running without logrotate.

    2. Check to see that the wordpress directory and its subdirectories are writeable by the webserver (apache or nginx).

    Depending on your system, you may need to do:

    chown -R www-data:www-data /path/to/wordpress

    But don’t just copy the command, check to see what the uid and gid should be, and check your system first. If you are not sure, take a full backup of your site first. This command can mess things up if you don’t know what you are doing.

    In any one of these two cases, it is a misconfiguration of your web server. It is likely that this causes problems to more plugins than just this one. If someone else is administering your host for you, contact them about this.

    Hope this helps.

    Please let me know if you have any more questions.

    with regards

Viewing 15 posts - 1 through 15 (of 2,207 total)