Forum Replies Created
-
AuthorPosts
-
alexgKeymaster
In Bitcoin and Altcoin Wallets
6.0.0
it is possible to filter transactions, including by pending withdrawals (status + type filter).alexgKeymasterThis is now implemented in Bitcoin and Altcoin Wallets
6.0.0
.alexgKeymasterHello,
All the text is passed through WordPress filters. You can add hooks into your theme or child theme and change the texts.
For example, to change the text for the “Fiat Currency” label, you would do this:
add_filter( 'wallets_ui_text_fiat_currency', function( $text ) { return 'Your text here'; } );
Alternatively, if you want to make bigger changes to the UIs, you can copy the template files into your theme or child theme and edit them. But if you only want to change the texts, there is no need to do this, just use the provided filters.
Both of these approaches are explained in the frontend documentation.
Let me know if you have more questions on this.
alexgKeymasterI have uploaded a fix for this with version
6.0.0-RC3
.Before the free plan would allow 750 calls per month, so it was ok to contact the API every hour.
Now the free plan allows 100 requests per month, so I’ve set the fiat rates to update every 8 hours.
This should be ok, since fiat currencies have low volatility, compared to cryptos.
Again thank you for your help. Let me know if you encounter more difficulties.
with regards
alexgKeymasterHello,
Thanks for providing a view of your logs. Your API key is masked in the logs with
?
characters intentionally. This is so that if the logs get stolen, any sensitive information is not in there.You can view your api key with wp-cli:
wp option get wallets_fiat_fixerio_key
I have signed up for a new apilayer key and I gοt the same result as you. Turns out that the old fixer.io keys are handled differently to the new apilayer keys.
I will upload a fix shortly.
Thank you for finding this issue, I never would have found it because I was using my old key and hadn’t realized that things have changed since then.
alexgKeymasterHello,
First, it’s great to hear that the CP currencies are being created without issues for you!
The shortcodes do not display only the online currencies, but all the currencies defined on your system. If you don’t want a currency listed, you should disable/unselect it in CoinPayments, and delete it from the Currencies list. The cron task only creates the currencies that it sees selected in your CoinPayments account.
This was a feature request. People were asking me if it was possible to do internal transactions with offline wallets. Now the shortcodes list all currencies, even if their wallets are offline, or even if they are not attached to wallets. (Obviously, a currency without an online wallet will not be able to perform deposits/withdrawals, but everything else should work.)
The
[wallets_balance]
shortcode never displayed only the currencies with a balance. It previously displayed only online currencies. Now it displays all currencies.Hope this helps. Please let me know if you have any more questions about the release. I am very interested in your feedback, especially regarding any defects/issues.
with regards
alexgKeymasterHello,
I have also deleted the form validation in version
6.0.0-RC2
. Thanks for the feedback, I’m really interested in your first impressions, and pitfalls.You mentioned that nothing happened after 5 hours. Normally, there should be fiat currencies being created.
1. Go to Currencies. Are there any fiat currencies there?
2. Were you using your site at all during those 5 hours? If your site doesn’t get traffic, the cron jobs won’t run. Ideally you should be triggering cron externally, as explained in Settings → Bitcoin and Altcoin Wallets → Cron tasks.
3. Ultimately the way to know what happened is to look at the logs. Can you enable verbose logging? This is in: Settings → Bitcoin and Altcoin Wallets → Verbose logging. This requires editing wp-config, as explained on-screen. Add
define( 'WP_DEBUG', true );
anddefine( 'WP_DEBUG_LOG', true );
to yourwp-config.php
, then enable verbose logging and check the logfile.If you collect the logs from a single cron run, it will be obvious what is going on.
Again thank you very much for testing. Let me know what the logs say.
alexgKeymasterHello,
Thank you for letting me know. The free plan should be sufficient.
The API keys, including the one I currently have, used to be 32 hexadecimal digits. It seems that with their switch to API layer, they now use the entire alphabet.
There is a regex validation on the API key, but it’s only applied on the frontend. The value you entered as an admin is not validated on the backend (except for SQL injections, of course).
I will patch the plugin. In the mean time, you can delete the following three lines from your code, and you will be able to enter your key:
https://github.com/dashed-slug/wallets/blob/6.0.0-RC1/admin/settings.php#L794-L796
You can find this file at
wp-content/plugins/wallets/admin/settings.php
.Thank you for providing screenshots. I have deleted the screenshot displaying your personal key from this public forum.
with regards
alexgKeymasterHmm. Hard to say what went wrong. You do not need to set a default coin, this has been deprecated.
Did you follow the instructions at the adapter’s homepage? https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin/coinpayments-adapter-extension/
You mention that you created a wallet and two currencies. But in the case of this special adapter, you should instead just let the cron jobs create the currencies (see step #29). It will create all the currencies that you have enabled in your CoinPayments account, and link them to your wallet. It will also download image logos, set gas management settings, set coingecko IDs which will let the plugin load exchange rate data, and it will set some useful descriptive tags on your currencies. If your site doesn’t have traffic, you’ll need to trigger the following url externally, every minute or so:
/wp-cron.php
.If the wallet says it’s connected, the metabox next to it should look like this:
The currencies that you have connected with the wallet should be listed right below this metabox. Each currency should have 8 decimals (CoinPayments assumes all currencies have 8 decimals), and be linked to your wallet. Do not create the currencies by yourself, just let the cron job do it for you. For example:
When you list the currencies, if everything is correct, then the hot wallet balance and block height should be shown, like so:
After checking all of this, you should be good to go. The
[wallets_balance]
shortcode should be displaying a dropdown with the two currencies.If you continue to see the “No currencies” message, then please check your browser’s console and let me know if you see any errors.
It’s possible that there is something on your system that’s preventing the WP-REST API from exposing the currencies to the frontend. If you want, I can login to your site and check. (If you want to check yourself, open the network tab in your browser, filter for XHR requests, and reload the page. You should see calls to
/wp-json/dswallets/v1/users/1/currencies
and responses in json form containing your currencies.)It’s worth a try to clear your server-side cache, although it’s unlikely that this is the problem. Pages that contain wallet UIs are not cached, because the templates contain dynamically generated JS code.
Thank you for taking the time to field-test the plugin! It sounds like you’re very close to getting it to work. Once you see currencies in the frontend, all shortcodes should work ok. Let me know if you encounter more difficulties.
alexgKeymasterTested the remaining links, fixed the Exchange 2.0.0 link as well.
alexgKeymasterHello Sage,
Oops, sorry about that! Fixed!
Thank you for testing, if you spot any defects, let me know please!
You can also let me know if the installation instructions are not clear. I want these to be good, because in the future I will base installation videos on them.
My priority is to fix any immediate issues after the release, above anything else right now.
Hope you have a positive experience with the plugin, without too much frustration 🙂
with regards
alexgKeymasterOK, now I understand your question.
It is not possible for users to add a transaction manually via the plugin. I am not aware of any security vulnerabilities in the plugin that would allow this. If you find any, please let me know.
WordPress is not very secure by default, because it’s a popular platform, and because of plugins of varying quality. You need to work hard to make it secure. Keep updates, only install a small set of reputable plugins, harden the security in other ways, etc.
If a hacker has managed to gain admin access, they can manipulate the database freely. This is why, as I have already mentioned, you must save the access logs immediately after the breach, before they are tampered with. A security analyst can check the logs (web logs and database logs) to see when someone might have inserted a row and from which IP.
As a precaution, because there is no such thing as a secure system, you must always keep a large percent of the user balances in cold storage. This way, in case of a breach, not all funds are stolen. Since even large exchanges with dedicated security teams get hacked routinely, you cannot expect your WordPress installation to be 100% secure. You must take additional precautions. I have added disclaimers about this in the plugin.
If the hacker was not very smart and did not use a relay, then you can use the time and IP you get from the logs to go to the police. I am not an expert in how this works, but this is the general idea.
Hope this helps. Best of luck.
with regards
alexgKeymasterHello,
This message is to be expected. The new plugin has different screens from the old one.
1. Where did you find the links you mentioned? These links should work.
2. What do you see when you navigate to
/wp-admin/admin.php?page=wallets_docs
? You should be able to see the documentation for all the installed extensions.3. Are you able to email me login details, so I can inspect the issue myself on your system?
Thank you
with regards
alexgKeymaster- In versions before 6.0.0
– If you want to export transactions in
.csv
form, you can go to the Wallets → Adapters screen. Below each coin adapter, there is an option to export transactions for that coin to a.csv
file. The.csv
file can be later re-imported to the plugin. The addresses and transactions are stored in the SQL tableswp_wallets_txs
andwp_wallets_adds
.– You could also export the data yourself, using
mysqldump
orphpmyadmin
. However, theaccount
column corresponds touser_ids
, and these must match theuser_ids
of the new system if you need to reimport them. When you use the built-in.csv
exporter, the user_ids are replaced with emails, and the importer changes back the emails to the new user_ids of the new system.)– If you need to export all addresses and transactions for a GDPR data request, you can use the WordPress data exporter tool (Tools → Export Personal Data). Exporting a user’s data will include also the addresses and transactions. You can inspect the code for this here: https://github.com/dashed-slug/wallets/blob/5.0.18/includes/gdpr.php
– With versions before 6.0.0, it is not really possible to add arbitrary transactions to the ledger. You would have to insert a transaction manually into the SQL tables.
– Another way would be to use the Airdrop tool, but this is cumbersome, as the airdrop tool is not built to perform transactions to one person only.
- With version 6.0.0:
– You can go to Transactions → Add New. Select the user, select
type
=move
, enter astatus
for your transaction e.g.Pending
, select the currency and click Publish. Once the transaction is published, enter the amount, change the status toDone
, and click on Update.– The data is now stored in posts, and therefore you should be able to export/import them using any tool that exports/imports WordPress posts. If you need the GDPR data exporter, it is still present. See: https://github.com/dashed-slug/wallets/blob/master/admin/gdpr.php
– If you want to add a transaction to a user using PHP code, you can look at the examples here: https://wallets-phpdoc.dashed-slug.net/wallets/classes/DSWallets-Transaction.html
Please let me know if you have any questions about this. What is your use case?
alexgKeymasterHello,
This is not related to this plugin. You should talk with CoinPayments support about this.
(Please note, if you are in Nigeria or another one of the restricted jurisdictions, you will not be able to use CoinPayments.)
with regards
-
AuthorPosts