Forum Replies Created
-
AuthorPosts
-
June 9, 2020 at 10:38 am in reply to: Static graph with fixed dimensions causing JavaScript error #8559
alexg
KeymasterHello,
The bug is now fixed in version
1.3.1
of the Exchange extension. Thanks for spotting this issue.with regards
alexg
KeymasterHello,
The Personal Data Exporter now also exports past user trades in version
1.3.1
of the Exchange extension.with regards
June 9, 2020 at 5:16 am in reply to: Static graph with fixed dimensions causing JavaScript error #8554alexg
KeymasterHello,
The correct shortcode would be
[wallets_exchange_chart template="static" market="USD_BTC" width="200" height="200"]
and yes there is a bug that I need to fix. Thank you.I will let you know here when it’s fixed.
with regards
alexg
KeymasterHello,
I logged in to your site’s faucet page but the SolveMedia CAPTCHA is not there, so I can’t test it. Can you describe what is not working? Is the shortcode still there?
I will delay the next patch release until we figure this out.
P.S. Additionally, your page loads take a very long time, sometimes more than 30 seconds. Even without caching this is not normal. You really should debug this. This is probably unrelated to the faucet, but maybe it isn’t.
alexg
KeymasterOK, this is great news. It confirms that the issue had to do with CloudFlare. Thank you for keeping me updated and for your help in debugging this issue.
I believe that a change in the
get_remote_ip
function can solve this problem, and then you can re-enable CloudFlare. This is because the captcha services want to know the CloudFlare IP, not the actual server IP. This function was built for detecting the actual server IP.In any case, I will release an update either today or tomorrow, and will notify you again here.
Also, keep the faucet page excluded from caching. It is a dynamic page and should not be cached. This is also true for the JSON API, so also exclude any requests with the
__wallets_action
GET parameter.with regards
alexg
KeymasterIn addition to the above, it is possible that the issue has something to do with CloudFlare. I’ve never used it and the code is not tested for it.
After trying all of the above, please edit the file
wp-content/plugins/wallets-faucet/includes/claim.php
. Try changing this function:private static function get_remote_ip() { if ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { return $_SERVER['HTTP_X_FORWARDED_FOR']; } elseif ( isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ) { return $_SERVER['HTTP_CF_CONNECTING_IP']; } elseif ( isset( $_SERVER['HTTP_X_FORWARDED'] ) ) { return $_SERVER['HTTP_X_FORWARDED']; } elseif ( isset( $_SERVER['HTTP_FORWARDED_FOR'] ) ) { return $_SERVER['HTTP_FORWARDED_FOR']; } elseif ( isset( $_SERVER['HTTP_FORWARDED'] ) ) { return $_SERVER['HTTP_FORWARDED']; } elseif ( isset( $_SERVER['HTTP_X_REAL_IP'] ) ) { return $_SERVER['HTTP_X_REAL_IP']; } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { return $_SERVER['HTTP_X_FORWARDED_FOR']; } return $_SERVER['REMOTE_ADDR']; }
to the following:
private static function get_remote_ip() { return $_SERVER['REMOTE_ADDR']; }
And try another claim.
This will use CloudFlare’s IP rather than the host IP in the captcha request. If this works, let me know and I will fix this in the next patch release for the faucet.
Hope this helps. Please let me know what you found.
with regards
alexg
KeymasterOK this is an improvement, since you are now seeing the error. You may need to add a cache exclusion on your faucet page.
What did you disable to make it work?
Additionally, there is now no JavaScript error. If you haven’t changed anything else, then this was caused by your minifier, improperly concatenating assets.
I logged in and tried again. I get “CAPTCHA solved incorrectly.” with the SolveMedia captcha. I noticed that you’ve removed the Google reCAPTCHA. Did you try again with reCAPTCHA? Also, can you try entering again your SolveMedia keys? Ensure that there are no leading or trailing spaces in your secret strings.
Summary: 1) does reCAPTCHA work? 2) did you check the secret keys again? 3) do the secrets have any leading/trailing spaces? 4) What did you disable? Cloudflare? Some other plugins?
Let me know what you tried and what happened and we’ll take it from there.
thanks
alexg
KeymasterOK then disable cloudflare and the script minifier that you’re using.
If unsure, disable as many plugins as possible.
Then, let me know what you found about my questions 1) and 2) above.
alexg
KeymasterHello,
I logged in and confirmed that this is the case. The problem is caused by some optimization plugin but I can’t do anything more with a user account.
I see two problems that may be related, and both must be solved:
1. There is a JavaScript error in the browser console. This occurs in minified JS code, possibly by WP Super Minify. Disable the minifier and see if the problem still occurs. I am not sure if this is causing a problem with the faucet, but it is causing an issue with the other UIs.
2. Normally the faucet will refresh and show you a result message indicating either success or failure. This will be in a div with the following classes:
wallets-faucet
,message
. I do not see such a div in the response. This is again due to some caching/optimization plugin. Try disabling your optimization plugins and try again.In general, if you are using optimization plugins, first ensure that the faucet works with all such plugins disabled. Then, enable each other plugin, one-by-one, checking if the faucet still works. You may need to add an exclusion for your
/faucet
page. How you add exclusions in each caching/optimization plugin will vary but it’s usually a simple regex that you can add in that plugin’s settings.In conclusion, try again with all such plugins disabled and let me know 1) if the JS error is still there and 2) if the faucet is working. Once we can establish that the faucet is working without optimizations, we can start to see how to re-enable the optimizers.
with regards
P.S, I have removed the credentials from your post because this forum is public.
alexg
KeymasterHello,
Yes, thank you. This can be added. I will notify you again here when it’s ready.
with regards
alexg
KeymasterHello,
Can you please describe what exactly is not working? What happens when you try to claim? Is there any error message? Please describe what you see so I can help. Thank you.
with regards
alexg
KeymasterYes, or if you really want to calculate withdrawal fees paid in any arbitrary range, you can easily pull this info from your SQL console (phpMyAdmin or mysql client command line).
Assuming that your DB prefix is
wp_
, which is the default:SELECT symbol, SUM( fee ) as fees, COUNT( 1 ) as count FROM wp_wallets_txs WHERE status = 'done' AND category = 'withdraw' AND amount < 0 AND created_time BETWEEN '2019-12-15' AND NOW() GROUP BY symbol ORDER BY symbol;
This query will sum the fees paid and transaction count for each coin, between the specified date and today. You can modify this range to fit your needs.
From these total fees, you then need to subtract the actual fee paid to the blockchain, times the transaction count.
Hope this helps. Let me know if you have any further questions.
alexg
KeymasterYes, that last formula is correct for withdrawals. Don’t forget to also count the internal transfers (moves) if you have any.
alexg
KeymasterHello,
This could be due to any number of reasons.
1. Do you have coin adapters enabled? At least two coins need to be enabled, and these two coins must be ones that the ShapeShift platform supports.
2. Do you have any JavaScript errors in your browser’s console?
Please check and let me know. You can also contact me with login credentials if you want to me to login to your site and check.
with regards
alexg
KeymasterHello,
Unfortunately the plugin does not record the actual amount that was paid in fees to the blockchain network. The plugin only records the fees that the user sees, which should be more than the actual fee. The reason is that not all wallets report back the actual fees paid and therefore the transaction DB schema and coin adapter API are not designed to hold that information.
If you know how much your wallet pays in fees in a typical transaction, you can calculate this. Go to the admin dashboard and you will see sums of fees paid and transaction counts for the last day, week, month, and year.
For example, say that there have been 10 BTC withdrawals, and the sum of fees paid was 0.00500000 using CoinPayments. We know that CoinPayments uses a fee of 0.00040000 (or 40k satoshis) per BTC withdrawal. Therefore, the fees that remain with your site are 0.00500000 – 10*0.0004 = 0.001 BTC.
On the other hand, the fees that you see paid for internal transfers is accurate, as shown in the admin dashboard. All the fees paid for internal transfers are yours since you don’t pay a network fee for those.
The same goes for full node wallets, you just need the
txfee
value that you use in your.conf
file to do the same calculation.Hope this helps. Let me know if you have any more questions about this.
with regards
-
AuthorPosts