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,199 total)
  • Author
    Posts
  • 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

    alexg
    Keymaster

    Hello,

    The error you mentioned is unavoidable. It’s simply the plugin checking whether there needs to be a migration from the old custom SQL tables that existed in versions before 6.0.0. Nothing to worry about.

    If you enable verbose logging in the settings, you will get more detail in the wordpress debug log on how the transactions are executed.

    The available balance does not count pending transactions, while the normal user balance does.

    Transactions, including deposits and withdrawals should be initiated in a pending state by your code, then they should either transition into a done or to a fail state by the wallet adapter. Does your transaction remain in a pending state?

    I am not sure what the problem you describe is. Can you please provide screenshots of the currency page and of the transaction page screens? You can either post them here or email me, whichever you prefer.

    Looking forward to your reply.

    with regards

    alexg
    Keymaster

    Hello,

    The code you provided does not work because you are creating a class Wallets that does not exist. There is a DSWallets\Wallet class that contains an adapter object of DSWallets\Wallet_Adapter class. The wallet adapter is an object that holds the connection information to the wallet as well as the code to communicate with the wallet. You can call get_new_address on the wallet adapter to get a new address.

    Once you have a $currency object, here’s how to generate a new address:

    $new_address = $currency->wallet->adapter->get_new_address( $currency );

    (It’s necessary to pass the currency into the method because there are wallets with multiple currencies e.g. CoinPayments wallet)

    It’s best to wrap this in a try..catch, because if there is any problem with communication with the wallet, this can throw.

    So, to put it all together:

    try {

    $new_address = $currency->wallet->adapter->get_new_address( $currency );

    } catch ( \Exception $e ) {
    error_log( “Could not generate a new address for $currency because: ” . $e.getMessage() );
    }

    In general, the UIs that require JavaScript, communicate with the plugin via its RESTful API, which is here and documented here.

    If you check out the code for the various API endpoints, you can see example code for the basic operations.

    Hope this helps.

    Please let me know if you have any more questions. I want to answer all of them and help you with your project.

    with regards

    alexg
    Keymaster

    Hello,

    You can use the functions in helpers/balances.php to get the balances.

    PHPdocumentor page:

    https://wallets-phpdoc.dashed-slug.net/wallets/files/build-helpers-balances.html

    Note that these functions are all under the DSWallets namespace. So you either need to be in that namespace, or prefix the functions with the namespace. e.g. $balances = DSWallets\get_all_balances_assoc_for_user( $user_id );

    You can see this particular function in action at the plugin’s user profile page code:

    https://github.com/dashed-slug/wallets/blob/6.2.4/admin/profile.php#L97-L216

    To be clear, this is the code that displays user balances in the user profile admin screen.

    Note the difference between balances and available_balances. The links point to the glossary.

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

    with regards

    alexg
    Keymaster

    Hello,

    Unfortunately there are no UIs currently that do not require JavaScript.

    I understand the need to avoid JavaScript in cases where tor must be used.

    If you can create your own forms and PHP handlers, then it’s very straightforward to interact with the plugin from PHP using the PHP API. Please see the following link for details and sample code on how to create transactions:

    https://wallets-phpdoc.dashed-slug.net/wallets/classes/DSWallets-Transaction.html

    For example, initiating a withdrawal would require you to create a new withdrawal transaction, and save it on the DB.

    There are also other ways to communicate with the plugin, but I think this is the one that’s relevant to your use case.

    I remain available to answer any questions you may have about this.

    Hope this helps.

    with regards

    in reply to: Im getting Error trying to download 2.0 #13575
    alexg
    Keymaster

    Oops! My apologies! Download is now fixed.

    If you encounter any difficulties using the adapter, please let me know in a new thread or by email.

    with regards

    in reply to: BTC Pay Server #13559
    alexg
    Keymaster

    Hello,

    While this is a good idea, I have not developed any BTCPay wallet adapter, and it’s not possible for me to develop one at this time.

    If you are interested in developing a wallet adapter yourself, or if you plan to hire a developer, I have provided information here:

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

    Sample code (stubs) are here: https://github.com/dashed-slug/my-wallet-adapter

    I am always available to answer any questions about this.

    with regards

    alexg
    Keymaster

    Hello,

    This is certainly not normal behavior. I am attaching a screenshot of what you should be seeing in this case.

    Before completing your order, you get a dropdown, showing you how much you would pay in each available cryptocurrency. This is calculated using the exchange rates on the system.

    Can you please email me a screenshot of that dropdown?

    Also, can you please check if the exchange rates on the currencies that you made available are set correctly? You can do this in the admin screen for each currency.

    Normally the exchange rates are kept up to date with data from CoinGecko. This is only done if you have set correctly the CoinGecko ID on each currency, and if the cron jobs are running.

    Looking forward to your reply.

    with regards,
    Alex

    Attachments:
    You must be logged in to view attached files.
    in reply to: E-Mail notifications #13305
    alexg
    Keymaster

    For the record, this has now been implemented in version 2.3.1. Sorry for the long delay. 😊

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