Forum Replies Created
-
AuthorPosts
-
October 4, 2021 at 8:14 am in reply to: Error cron “The wp_cron tasks have not run in the past 4 hours…” #11077alexgKeymaster
Hello,
Are you seeing this error continuously, or did you only see it once and then it disappeared?
If your site is not getting any traffic, the cron jobs would not run. This is to be expected.
If you continue to see this error immediately after visiting the site, let me know. You may need to trigger cron manually. One way to ensure cron jobs are running, is to trigger the cron URL with a curl command on cPanel’s cron.
If you want, show me a screenshot of your cPanel cron settings and I’ll let you know if I see any problems.
Just a warning: the marketplace functionality is going to be removed in wallets6 because it is buggy. Sorry about this. If you want to use the existing buggy implementation, you must keep wallets 5.x, but soon there will not be support for it. You have been warned.
with regards
alexgKeymasterHello,
Users would NOT have to sign up again. All users with the
has_wallets
capability can hold balances and use the plugin.The user transactions (and therefore balances) will be migrated when you install wallets6 by a cron task. This means that the MySQL rows will be copied into the new custom post types (
wallets_tx
andwallets_address
post types). Users will not be able to use the plugin until the data migration finishes. How long this takes will depend on how much data must be migrated. This is very safe, even if anything goes wrong, you can always go back to using wallets5, since the migration process only copies and does not delete data. Once data migration is successfully completed, you can backup and delete the two custom MySQL tables (wp_wallets_txs
andwp_wallets_adds
) at your own time, to save space. All of this will be explained in detail in the release notes.Using a subdomain is possible, but it is likely to cause more problems than it solves. If you can avoid it, it’s better to use a single-site installation.
with regards
alexgKeymasterHello and thanks for your feedback,
No, unfortunately I do not plan to develop any integration with buddypress.
The current integration with buddypress will be removed in wallets6. Currently users can receive notifications via email or buddypress, but this is clumsy and unnecessary. It does not help users to transact with each other. Users can transact with each other via the
[wallets_move]
shortcode and associated UI.This does not mean that you cannot develop your social site. There is no reason why you cannot use wallets6 and buddypress together. The site that you describe is certainly possible.
with regards
alexgKeymaster@mkudev Glad to hear you got it working.
For the record:
1. You should not normally have to supply an IPN endpoint to the CoinPayments platform settings. The default one should work. If it’s working now, don’t change it.
2. The complete howto article for debugging these issues is: https://www.dashed-slug.net/howto-debug-an-incoming-deposit-coinpayments-adapter/
3. If you experience any more issues with the plugins, please open a new thread.
with regards
alexgKeymasterHello,
This is likely my fault too, sorry about that!
Unfortunately the full node adapter still requires you to edit a PHP file.In the upcoming wallets6 release, new coins can be defined from the admin, so this problem will not exist in the future.
You likely have a syntax error in that file. This could be something small, like even a semicolon missing. Or you tried to define the same function twice to define two coins. If you email me the code you used I can let you know what’s wrong.
If you remove all the code you entered, and the wallets plugins, then the site should be up again.
To know what’s wrong, you have to look at the PHP logs. The error will be explained there.
Alternatively, you can enable debugging in WordPress: https://wordpress.org/support/article/debugging-in-wordpress/
If you add the following to your
wp-config.php
:define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Then any PHP errors will be written out to the file
wp-content/plugins/debug.log
. Once you visit your site and it crashes, the error will be written out there.Please let me know if you are having any trouble with any of this. If you see an error you don’t understand, show me.
with regards
September 13, 2021 at 7:50 am in reply to: Deposit notification not working for Bitcoin wallet #11009alexgKeymasterHello,
Good to hear that you got everything working now. You should also test with a live deposit to ensure that the notification mechanism is correctly setup.
The plugin does try to retroactively query user deposit addresses for incoming transactions. However this only works if the cron jobs are running on your system. Since you accomplished an internal transfer, they should be running. But it’s worth checking. See Dashboard -> Bitcoin and Altcoin Wallets -> Debug -> “Cron jobs last ran on” and “Cron jobs last runtime”. Last ran on should be recent (a few minutes ago) and last runtime should be less than your max PHP execution time.
Unfortunately I don’t have a demo for the exchange at the moment. I may set up one after I finish with wallets6 and the ERC-20 adapter. Some users have set up exchanges, you may find some here: https://www.dashed-slug.net/forums/topic/live-sites-powered-by-the-bitcoin-and-altcoin-wallets-wordpress-plugin/
with regards
September 10, 2021 at 10:47 am in reply to: Deposit notification not working for Bitcoin wallet #10998alexgKeymasterHello,
OK, sounds like you’re already half way there.
You should now check to see if the walletnotify command works:
Let’s say user 1 has BTC address
1SOMEADDRESS
. And let’s say also you have sent a deposit to that address, with a TXID of0123456789ABCDEF
. Finally, let’s say your site’s hostname isexample.com
.You can check to see if the transaction is known by your wallet, by issuing the following shell command in the machine where the wallet is running:
bitcoin-cli gettransaction 01234567890ABCDEF
You should see the transaction data in JSON form. If not, then the wallet may not be fully synced yet.
To notify the plugin about this transaction, the notification URL would be:
https://www.example.com/wallets/api3/notify/BTC/wallet/01234567890ABCDEF
When you visit this URL in your browser, the plugin should now go ask the wallet about that transaction. If the transaction is found, the plugin will create a deposit for this user. The deposit will be shown in the admin screens in “Wallets” -> “Transactions”. You will get a
{"result":"success"}
even if the transaction is not found.Once you determine that the transaction is known by the wallet, and that the above notify URL creates the deposit in the plugin, then it’s time to check the automation of the above:
You should be able to achieve the same effect by issuing the following curl command:
curl -k https://www.example.com/wallets/api3/notify/BTC/wallet/01234567890ABCDEF
If you get
command not found
, you must install curl. If you get some other error, let me know.Once you determine that this works, finally it’s time to set the walletnotify argument in your
bitcoin.conf
file:walletnotify=curl -sk https://www.example.com/wallets/api3/notify/BTC/wallet/%s >/dev/null
(The
%s
part is replaced with the TXID by the bitcoin wallet).Check the above and let me know how far you got.
with regards
September 10, 2021 at 8:11 am in reply to: Deposit notification not working for Bitcoin wallet #10996alexgKeymasterHello and welcome!
First, understand that there is no 1-to-1 correlation between wallet addresses and users. The user balances are the sum of user transactions. Each user is assigned a deposit address. When you send funds to that address, the plugin must first detect this deposit and create a corresponding deposit entry into the plugin’s ledger. For Bitcoin-like wallets this is done via the
walletnotify
wallet argument.Having said this, please tell me the following:
1. When you go to Wallets -> Adapters, do you see the correct hot wallet balance? (i.e. the balance of the wallet backing the site’s funds)
2. When you go to Wallets -> Addresses, do you see BTC addresses assigned to users? There should be addresses for all users who have already logged in after you installed the plugin.
3. When you go to Wallets -> Transactions, do you see any deposits? This is the critical part. If this is not working, it’s possible that you haven’t set up walletnotify correctly.
If the problem is with walletnotify, please check this guide: https://www.dashed-slug.net/howto-debug-an-incoming-deposit-full-node-wallet/ Everything is explained there.
If possible, show me what you found in steps 5 and 6 of the HOWTO guide, so I can help.
with regards
September 8, 2021 at 5:36 am in reply to: Question about pegging price of coin and use-specific coin #10989alexgKeymasterHello,
First understand that when you set the exchange rate between two currencies in the plugin, this only affects the display price in equivalent fiat currency (USD) and also it affects the prices in the WooCommerce extension.
To set the exchange rate manually to a fixed value, you must now introduce a filter hook in PHP, like so: https://gist.github.com/alex-georgiou/492196184f206002c864225180ca8fbb
Please let me know if you have any questions about how to modify the example code and activate it in your WordPress setup.
In the upcoming wallets6 release it will be possible to set exchange rates via the admin interface.
Unfortunately there is no possibility of controlling which currencies can purchase which products.
with regards
P.S. I have moved your question here as it was not related to the other question.
September 8, 2021 at 5:31 am in reply to: proof of stake coins and capability to stake hot wallets (carefully) #10988alexgKeymasterHello and welcome,
There is no support for POS rewards currently or in the future.
If you wish to offer rewards/interest/etc you can do so using the Airdrop extension. You can set up a recurring airdrop that approximately matches the rate of return of your PoS rewards. The PoS rewards are to your PoS wallet, while the Airdrop debits the user balances. This is necessary since one wallet holds all the balances, and there is no 1-1 correspondence between blockchain addresses and user balances. Let me know if you have any questions on this.
The current codebase is obsolete. In a few months I will be releasing the new codebase (wallets6) which is essentially a complete rewrite of the plugin and all its extensions. So, not much point in pushing features on git right now. See here for details: https://www.dashed-slug.net/upcoming-bitcoin-and-altcoin-wallets-6/
with regards
P.S. I have moved your other question here as it was not related to all this.
alexgKeymasterHello,
If the cron jobs are not running, then that means that withdrawals and internal transactions don’t get processed.
If transactions are being processed, then there is probably no problem.
If you really want to check and see what’s going on, you can do the following:
1. Enable logging in
wp-config.php
(See https://wordpress.org/support/article/debugging-in-wordpress/)2. Enable verbose logging in the cron settings:
“Wallets” -> “Cron job” -> “Verbose log output (debug)”
Now every time the cron jobs run, logs are written out to
wp-content/debug.log
.A cron job run starts with a line such as the following:
[01-Sep-2021 07:54:00 UTC] Bitcoin and Altcoin Wallets cron jobs STARTED. Elapsed: 0 sec, Mem delta: 0 bytes, Mem peak: 19963328 bytes, PHP / WP mem limits: 128 MB / 40 MB
and ends with a line such as the following:
[01-Sep-2021 07:57:32 UTC] Bitcoin and Altcoin Wallets cron jobs FINISHED. Elapsed: 4 sec, Mem delta: 19376 bytes, Mem peak: 19392432 bytes, PHP / WP mem limits: 256 MB / 40 MB
If you see both these lines, this means that cron jobs are starting and completing normally.
Hope this helps! Let me know if you spot any problems.
with regards
alexgKeymasterHello,
Thank you for your interest in the plugin and its extensions.
I don’t know why your card is not accepted.
If your card is not accepted for whatever reason, you could also pay via cryptocurrencies. If you wish to do so, please do the following:
1. Select the membership plan that you want from https://www.dashed-slug.net/dashed-slug/membership-plans/
2. Send the equivalent of the USD amount to one of the following addresses:
Bitcoin Address: 1DaShEDyeAwEc4snWq14hz5EBQXeHrVBxy
DOGE Address: DASHEDj9RrTzQoJvP3WC48cFzUerKcYxHc
LTC Address: LdaShEdER2UuhMPvv33ttDPu89mVgu4Arf
USDT on BEP2 address: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23 memo: 1054039023. Email me again with your selection of membership plan, the TXID and the email you used to sign up.
I will then activate your membership manually.
with regards,
AlexP.S. I have moved your post to a new thread, as it was not related to the other thread.
alexgKeymasterHello,
I understand.
Unfortunately there’s no filter to control the deposits. Moreover I am not accepting feature requests for the plugins at this time due to the upcoming release. I only fix bugs.
The deposit is created at the IPN handler, function
action_parse_request
, and the fee set is the one reported by the IPN handler:if ( 'deposit' == $_POST['ipn_type'] ) {
…
$txrow->fee = sprintf( '%01.8F', $_POST['fee'] );
alexgKeymasterHello,
There is no setting for the minimum withdrawal amount for custom coins, since these coins cannot normally be withdrawn (or deposited). If you have developed your own mechanism for withdrawing/depositing such coins, then this is where you should be checking the withdrawal amount against any limits you want to place.
Moreover, the available balance is not related to this. Available balance is the part of the user’s balance that is not currently locked in pending transactions or in market orders on the Exchange extension. This is not a feature that you can control; rather, user balance is split into “available” and “unavailable” to guard against double-spends.
with regards
alexgKeymasterHello,
OK I understand. Here’s how you can hack the code to do this:
1. Before changing the plugin code, read and understand the FAQ section “I want to do changes to the plugin’s code.”.
2. To change the validation code, check out the file:
wp-content/plugins/wallets-fiat/assets/scripts/wallets-fiat.js
. You want to remove the validation extenders.For example, where you see:
self.fiatWithdrawRoutingNum = ko.observable( '' ).extend( { validation: [ { validator: function( val ) { if ( 'undefined' == typeof( val ) ) { // do not show error while initializing the form return true; } if ( self.fiatWithdrawMethod() != 'routing' ) { // do not validate this field if not used return true; } return val.match( /^\s*\d{9}\s*$/ ); }, message: wallets_fiat_i18n.routingnum_invalid } ] } );
The above would become:
self.fiatWithdrawRoutingNum = ko.observable( '' );
Ensure that you remove the
.extend()
parts only, from all observables.If you edit the JS file, you must also remove the minified version of the file (
wallets-fiat-0.6.3-beta.min.js
), so that the plugin will choose to load the unminified version. Alternatively, you can minify the edited version yourself.3. The withdraw template is in
wp-content/plugins/wallets-fiat/templates/withdraw.php
. You can edit the file yourself, or copy it, or better yet, you can modify the labels using the provided filters, like so:add_filter( 'wallets_fiat_ui_text_iban', function( $label ) { return 'YOUR OWN LABEL TEXT GOES HERE'; } );
I think that’s it. Just keep in mind that all of this will soon change and become much easier.
with regards
-
AuthorPosts