Forum Replies Created
-
AuthorPosts
-
alexg
KeymasterHello,
I am not sure I understood your question. There are multiple points I do not understand.
1. What do you mean by “using the ipn handler page from coinpayments”? What page is that?
2. “But we need to have balances etc that your plugin uses to show up.”: Which balances are you referring to? Hot wallet balances or user balances? You don’t need communication with CoinPayments or any wallet to display user balances.
3. “i thought we could do almost a file gets to ping your ipn”: What do you mean by “ping the ipn”? The IPN is an incoming message, you cannot do polling on it. That’s the whole point of IPN (Incoming Payment Notification). You need to listen for the incoming message which arrives when the CP platform requests it.
Can you please be more clear? What are you trying to achieve? Are you trying to detect when a user performs a deposit to a user deposit address (or to another address)? Please describe what your objective is and I’ll try to help.
with regards
February 7, 2022 at 9:41 am in reply to: Getting withdrawal settings for a CoinPayments coin in PHP #11426alexg
KeymasterHello,
I can help you find the data in the DB (but this will change in the upcoming wallets6 release).
In the current CoinPayments adapter, every coin has its slug prefix. In
wallets-cp.php
, notice the code:foreach ( $this->coins as $symbol => &$coin ): $coin_option_slug = preg_replace( '/\W/', '-', 'wallets-cp-' . strtolower( $symbol ) . '-settings' ); $enabled = Dashed_Slug_Wallets::get_option( "{$coin_option_slug}-general-enabled" );
So, a coin with ticker symbol XYZ will typically have a prefix of:
wallets-cp-xyz-settings
. If the ticker symbol contains characters that are not letters, then these characters are replaced with a dash (-
).The withdraw fee is in the option:
wallets-cp-xyz-settings-fees-withdraw
And the minimum withdrawal amount is in the option:
wallets-cp-xyz-settings-general-minwithdraw
You can get these values with get_option.
It was necessary to change this in wallets6 for a few reasons:
– Currencies and wallets will now be stored as posts.
– The currency settings are decoupled from the wallet settings for clarity.
– All amounts are now stored as integers to avoid floating point errors.So, in the upcoming release, these will be stored as meta values on the currency post. It will be very easy to retrieve a currency and check its fields. When the time comes, ask me again, if you want to adapt your UI code to wallets6. I promise it will not be hard to make the change.
with regards
alexg
KeymasterWell, not sure if the plugin saw our discussion, it’s always a possibility!
But there is some code in there that heals the capabilities if they are not correct:
https://github.com/dashed-slug/wallets/blob/5.0.16/includes/caps.php#L252-L283
with regards
alexg
KeymasterWell, the people who build the Bitcoin wallet, the modern blockchains and smart contracts, are indeed heroes!
I on the other hand have decided to create the PHP glue code that will connect WordPress to these modern miracles. Less glamorous work, but I’m having fun with it nonetheless! I’m looking forward to finishing this release so I can move on to integrating Bitcoin LN and ERC-20.
alexg
KeymasterThank you.
wallets6 is a complete redesign from the ground up. It should be ready in a few months™.
Seriously, I have less than 50 dev tasks remaining in my backlog, so, prepare to be amazed before summer, probably!
I think what admins will appreciate the most will be the ability to create and edit transactions and addresses via the admin screens, and the ability to filter transactions by currency, user, tag, wallet, etc.
But there’s tons of improvements under the hood, some of which will eventually allow interoperability with the new Ethereum-like blockchains (account-based rather than UTXO-based).
with regards
alexg
KeymasterHello,
The plugin should be compatible with 5.9.
The issue with the menu not showing is most likely one that I have encountered before, but I’m not sure under what conditions it arises:
If you have installed and activated the plugin, but you still don’t see the Wallets menu (and admin warning messages), then the most likely problem is that your admin user does not have the “manage_wallets” capability.
Normally, this capability is automatically assigned to admin users and to the Administrator role, when the plugin is first activated. So, try to deactivate and re-activate the plugin.
Some times this fails. You can use any plugin that’s suitable for editing capabilities and assign “manage_wallets” to the Administrator user role. This will resolve the issue. A good plugin for this job is https://wordpress.org/plugins/user-role-editor/
Simply navigate to Users -> User Role Editor and select the “Administrator (administrator)” role. Click on “add capability” and type “manage_wallets”.
If you want to achieve the same via the wp-cli, you can issue the following command in the unix shell of your WordPress server:
wp cap add administrator manage_wallets
Hope this helps.
Please let me know if this didn’t help. If you have any other questions about the plugins please open a new thread.
with regards
alexg
KeymasterHello,
You can continue using the extensions after your membership finishes (but will not be able to download any new updates or get technical support for the premium extensions).
Apologies if this was not clear. I am currently rewriting the documentation as part of wallets6 development and will add this information in the faq.
with regards
alexg
KeymasterHello,
This is a straight-forward issue that I can investigate on your system if you like. Can you give me admin access to your WordPress system?
If so, please email me with:
1. link to your site
2. admin login credentials
3. the order_id of one order that you see on the database but not in the APIIf you do not want to give me access, then I can guide you to debug this.
Essentially what I would do, is use wp-console to first check if the PHP-API reports the order, and then the JSON-API. Tracing the execution path of the code that handles the JSON-API will make it clear whether stale transients are used, or what is going on in general.
Let me know how you want to proceed.
with regards
alexg
KeymasterHello,
The exchange only processes standard orders, as with other exchanges. Normally in large exchanges, synchronization with the globally accepted price is done by arbitrage bots.
To have an order that moves with the market, you must create an external script that places an order, then at regular intervals it cancels the order and places another one with the new price. This is what the Exchange’s JSON-API is there for. (In the upcoming wallets6 release, the JSON-API is superseded by a newer RESTful API which is easier to use, but the existing JSON-API will still exist for compatibility with existing scripts.)
Do not simply modify the price of the limit order in the database. The reason that the order must be placed via the API, is that the plugin does checks to see if you have enough available balance.
with regards
alexg
KeymasterHello and a happy new year to you too!
wallets6 is nearly ready. Last week I finished the online documentation for all components, which is about 60k words long.
I have only 50 tickets remaining, but this means nothing, because:
1. Some tickets have an estimated effort of less than a day, while a few will take me up to a week each.
2. How many days per month I can devote to work varies depending on other things in my life. Usually I manage to work about 15 to 20 days per month.
3. The effort of some development, dev testing, and integration testing tasks is hard to estimate beforehand. Testing can give rise to more tickets as issues are discovered. So it’s impossible to estimate time before actually doing the work.So I am not in a position to give out any estimates. But it shouldn’t be too many months! My advise to you is to not wait for it, and then when it’s ready you will know, because there will be a RC release on the site, and a blog post announcement, long before I push anything on wordpress.org.
With this release I have decided to not rush things but to do everything properly, as long as it takes. This means that I am way over my initial estimate of 6 months, but I think it’s worth it. Many of the technical debts will be paid all at once when wallets6 is out!
If you follow twitter you will see the announcements.
with regards
alexg
KeymasterHello,
Thank you, I have received your second email and logged in to check.
There are some JavaScript errors caused by your theme or other plugins, but luckily these do not interfere with the exchange extension.
I attempted to swap 0.0001 BTC for ETH. I entered
0.0001 BTC
and clicked the button, to get the error:Could not place order. Error: Could not enter market order: Order amount must be positive.
This is to be expected. Normally I should be able to see the amount of ETH to receive, but the plugin shows n/a.
Investigating more closely, I see that there is no liquidity on the BTC_ETH market.
This is explained in the Extension’s homepage. The plugin cannot magically import liquidity from other exchanges. There must be an active market to trade currencies.
The
[wallets_exchange_market_order]
shortcode places market orders. For a market order to execute, there must first be limit orders on the orderbook. Therefore there must be a market maker to place these limit orders around the generally agreed upon price for these currencies.Also, you should deactivate the ShapeShift extension, because it’s still loading some assets that are not needed.
Please let me know if this is not clear, or if you have any other question.
with regards
alexg
Keymaster@zhak Hello, can you check again? I did not receive any email at
info@dashed-slug.net
, and I checked my spam folder too.alexg
KeymasterHello,
I have added the ShapeShift extension to the list of decommissioned/deprecated plugins, because the platform has shifted to a dex model, and is no longer compatible with the plugin.
It sounds like you’ve done everything correctly. The issue you describe regarding the
[wallets_exchange_market_order]
shortcode could be due to any number of reasons. You didn’t mention whether there are any errors in the JavaScript console, and whether you have added sufficient liquidity to the market (i.e. limit orders). It could also be due to JSON-API market_summary requests being cached on the server side, or something else entirely.Are you able to provide me with login credentials so I can check your site myself? If so, please contact me by email. Please send me the link to the page where you use the shortcode, and a username/password so I can check. I don’t think an admin account will be required for this, just a regular user account.
Looking forward to your reply.
with regards
alexg
KeymasterHello,
I’m not sure why this is the case on your system. I did again some tests on my side and didn’t show any such issue.
Obviously you should disable your faucet, and cancel any wrong faucet transactions for bitcoin, so that your users don’t take away all your Bitcoin!
I am looking to see if there is any possibility for users to have hacked the code to claim a different coin, but I don’t see how this could be done.
1. Have you tried claiming from the faucet? Do you get BTC or XNS when you claim?
2. Did all the users who used the faucet get BTC, or did some get BTC, and others XNS?
Let me know please.
with regards
alexg
KeymasterHello,
It’s unlikely that the responses are being cached on the client side, since the correct no-cache headers are set in the JSON-API responses.
It sounds as if the JSON-API responses are being cached on the server-side. Did you check your cache or caches? You should be excluding all queries that have the GET parameters
__wallets_action
and__wallets_exchange_action
from your caching plugins. All server-side caching plugins have black lists or exclusion lists. Some “optimization” plugins also do page caching.(This issue will be resolved once and for all with the upcoming release, where the JSON-API is replaced with WP REST APIs.)
Hope you have a great 2022! Let me know if you can’t resolve this issue.
with regards
-
AuthorPosts