Forum Replies Created
-
AuthorPosts
-
alexg
KeymasterHello,
Please see the video series here:
You can also study the installation instructions to see how to connect to a full node wallet:
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:
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
alexg
KeymasterHello,
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
alexg
KeymasterGreat 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
alexg
KeymasterHello,
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
April 12, 2024 at 6:42 am in reply to: Use of the plugin’s front end without the need for JavaScript #13612alexg
KeymasterHello,
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 adone
or to afail
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
April 11, 2024 at 4:36 am in reply to: Use of the plugin’s front end without the need for JavaScript #13608alexg
KeymasterHello,
The code you provided does not work because you are creating a class
Wallets
that does not exist. There is aDSWallets\Wallet
class that contains an adapter object ofDSWallets\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
April 10, 2024 at 6:33 am in reply to: Use of the plugin’s front end without the need for JavaScript #13605alexg
KeymasterHello,
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
April 9, 2024 at 7:16 am in reply to: Use of the plugin’s front end without the need for JavaScript #13599alexg
KeymasterHello,
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
alexg
KeymasterOops! 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
alexg
KeymasterHello,
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:
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
February 19, 2024 at 6:08 am in reply to: I’m able to proceed through checkout with no funds in my wallet. #13523alexg
KeymasterHello,
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,
AlexAttachments:
You must be logged in to view attached files.alexg
KeymasterFor the record, this has now been implemented in version
2.3.1
. Sorry for the long delay. 😊alexg
KeymasterFor the record, this has now been implemented in version
2.3.1
. Sorry for the long delay. 😊alexg
KeymasterEven if you have disabled your firewall, the hosting provider has their own firewall to protect their systems. You must contact them and ask them to add a specific exception for incoming TCP ports to your RPC port on your host’s IP.
Bottom line, the plugin must be able to contact the wallet. No other way around it.
alexg
KeymasterHello,
1. Ensure that rpcallowip is set to the IP of your WordPress installation in CIDR notation.
2. Ensure that rpcbind is set to the public-facing IP of your wallet node. This tells the wallet to listen on the correct NIC.
3. If your wallet node is on a hosting provider, contact your hosting provider, and ask them to open their firewall for your server and for incoming TCP connections to your RCP port.Hope this helps. Please let me know if you continue to face problems.
with regards
-
AuthorPosts