Forum Replies Created
-
AuthorPosts
-
alexg
KeymasterOK thanks for reporting this.
The adapter is still in beta. This error is something I did not anticipate.
Did you get an email with an error trace? If so, please email it to me.
Also, is there anything in your PHP error log? If so, please also email that to me.
Thank you.
with regards
alexg
KeymasterI have replied to your email.
alexg
KeymasterHello,
How far have you got with the installation instructions?
What problem are you encountering?
alexg
KeymasterMy email address is here: https://www.dashed-slug.net/contact/
Please provide me an account where there will be some balance that I can try to transfer to some other user. (also provide a name or email of another user).
It doesn’t have to be a real cryptocurrency, any balance will do.
alexg
KeymasterHello,
The required capabilities are:
–has_wallets
–send_funds_to_user
If the button doesn’t do anything, there could be a JavaScript error in the console tab, or the WP-REST API request may not have completed, which should be visible in the network tab.
If you want, email me some login credentials to your site, and I can investigate what’s going on.
with regards
alexg
KeymasterHello,
No, unfortunately I cannot. These videos take too much time to produce, and I am way too busy.
However, I have taken great care to include very detailed step-by-step installation instructions. The instructions are available on the LND Wallet adapter’s homepage, and are also bundled in the plugin.
Follow the instructions, and if you hit any problems, please let me know. I am available to answer any questions.
with regards
alexg
KeymasterHello @cima,
The LND wallet adapter connects to the lnd daemon, which can be run on several platforms, but mostly Linux.
The installation instructions are available here (and are also bundled in the plugin):
What’s important is that you set it up on a server, not your home machine. Do not attempt to install it without basic system administration skills. The installation is not easy, but not too hard either. I have provided full step-by-step instructions.
Unlike other full node wallets, the litd bundle (which includes lnd), does not require much disk space or CPU. This means you will be able to run it even on a shared host, which will be more economical.
If you have any more questions about this, please let me know, but please don’t post here in the general discussion. The support forum for the lnd Wallet adapter is here:
Or you can email me with any questions.
with regards
alexg
KeymasterThank you very much for taking the time to post this info.
Hopefully it will be useful to others.
alexg
KeymasterFor future reference, not that this has been implemented in version 6.0.0 of the plugin.
https://github.com/dashed-slug/wallets/blob/6.0.0/adapters/abstract-wallet-adapter.php#L247-L307
alexg
KeymasterHello,
1. The “amount+fee” field is simply the withdrawal amount requested by the user, plus the withdrawal fee that will be charged to the user.
In this case, the user will receive 1 BNB to the address they provide, and 1.001 BNB will be subtracted from their balance. The 0.001 BNB will be used by CoinPayments to cover the miner fee, plus any remaining fees that they keep for their platform.
You cannot directly control “amount+fee”. Instead the user sets the amount, and the admin sets the fee. You can find the withdrawal fee when you go to the admin page for the BNB Currency:
“Currencies” -> “BNB Coin (BSC Chain)” -> Edit -> “Fees” -> “Withdrawal fee”.
In the case of the CoinPayments adapter, if you set the withdrawal fee too low, it will be set to the minimum allowed by CoinPayments, in this case 0.001.
For example, if you were to set the withdrawal fee to 0.0005, it would be reset to 0.001 by the adapter’s cron job.
On the other hand, if you were to set the withdrawal fee to 0.002, then CoinPayments will still charge your hot wallet balance 0.001 for the withdrawal, but your user balance would be charged 0.002 for the withdrawal. The remaining 0.001 would stay in your hot wallet but would not be counted towards the user’s balance, so it would be effectively yours. Note that the hot wallet balance is an asset to you in accounting terms, while the user balance is a liability to you.
2. Gas management with CoinPayments is a very unfortunate development. I have tried to make this as easy as possible, but it’s still clunky. Let me explain.
There are currencies that are native to their blockchain (Bitcoin, Ethereum, BNB, Tron, etc) and tokens, which are usually implemented on top of blockchains as smart contracts (ERC-20, BRC-20, etc).
At first CoinPayments was useful for easily providing multiple currencies to the plugin, such as Litecoin, Dogecoin, etc. Then tokens became popular and things changed.
When a user deposits a token to CoinPayments, the CoinPayments platform creates a new address (account in Ethereum lingo). The token is added to that account, and the plugin is notified to update its local balance.
When CoinPayments is asked to withdraw a token from that address, gas must be paid. Gas can only be paid from the blockchain’s native currency (e.g. Ethereum), not from other tokens. For example, if you request to withdraw some USDT.ERC20, some ethereum must exist to convert to gas. The CoinPayments platform requires that at least 0.02 ETH exist on that specific address, not just in your CP account, for the withdrawal to proceed. This is because when this was programmed, 0.02 ETH was a reasonable fee to pay for transferring a token (today it’s about 32 USD which is too much). The CoinPayments platform requires this whether you request a withdrawal via the API, or directly via their admin pages. Go ahead and try it, you will receive a message to that effect.
Once this happened, I implemented the following solution:
For each token, the admin provides the contract address. The admin can also provide an etherscan and bnbscan API key to read the main currency balance for each address. If an address does not have enough of the native currency to allow for withdrawal of its tokens, then the wallet adapter’s cron job will transfer some of that currency to that address. This way, withdrawals can proceed. You can monitor the status of each deposit address when you go and edit an address via the admin screens.
For example, let’s say you deposit 20 USDT.ERC20 to address 0xABCD. The plugin will use the etherscan API key you provided, to check the Ethereum balance of that address, and see that it is 0. It will then transfer 0.02 ETH to that address. Then, if the user requests a withdrawal of some USDT.ERC20, that withdrawal can proceed. Today, a token transfer will cost a lot less than 0.02 ETH, so most of the ETH will remain on that address, and will still be in your account. As an admin, you can go edit the deposit address 0xABCD and at the bottom of the page, you will see in a metabox, whether any funds on that address are ready to be withdrawn or not. The plugin will show you the balance of the native currency available on that address, and whether there’s anything stopping the user from requesting a withdrawal of the token on this address.
Of course, this process is clunky and cumbersome. But I can’t think of any other solution given the situation. This is why I strongly recommend that the plugin is useful mostly for connecting to full node wallets (Bitcoin, Litecoin, Dogecoin, Monero, Bitcoin Lightning, etc). The CoinPayments adapter is less useful because of this CoinPayments limitation.
In any case, if you set things up correctly, it should work OK for Ethereum and BSC. Gas management on Tron and other chains is not supported.
If you want to learn more about gas management, you can check the CoinPayments adapter’s documentation, at:
- “Wallets Admin Docs” -> “wallets-cp” -> “Installation instructions” -> “Configuring gas management”
- “Wallets Admin Docs” -> “wallets-cp” -> “Troubleshooting” -> “Troubleshooting common issues” -> “Cannot withdraw any tokens (gas management issues)”
To answer your question, if the token’s withdrawal fee is set as $0.3 under the Currency entry (it would not be set in dollars but in the native currency), and the actual gas fee was $0.1 (again, this would not be in dollars), then the remaining $0.02 would stay with your site. Since the hot wallet balance would decrease by only 0.1 but the user balance (a liability to you) would decrease by $0.3, that’s $0.2 that your site gains.
If you are unsure about the difference between the hot wallet balance and the user balances, check the glossary section of the documentation or ask me. The hot wallet balance is the online funds, while the user balances are the funds that your site owes to the users.
Hope this has answered your questions, please let me know if not, or if you have more questions.
with regards,
Alexalexg
KeymasterHello,
Unfortunately assets on Tron network are not supported by this wallet adapter.
The reason is that it would be very hard to implement gas management and there is not enough interest. (Incidentally, this is likely the reason why CP requires a deposit of 1 TRX on each deposit address.)
Sorry to disappoint you.
alexg
KeymasterHello,
It sounds like you edited the plugin’s CSS files directly. It’s not a good practice to do that, for the reason you just described.
There are two ways to add CSS rules and have them stay there. Which one you choose is up to you:
1. Create a child theme for your theme. If you google “child theme”, there are multiple guides on how to do this. It’s super easy. Once you have a child theme, you can add all sorts of things on it that are specific to your site, including CSS rules and any random PHP functions that are only useful on your site.
2. Use the Customizer. Go to Appearance -> Customize -> Additional CSS. Add your CSS rules there and hit “Publish”.
When you add rules, make sure to observe rule specificity. You want your own rules to override the rules of the plugin, so your rules need to be more specific. Again, there’s multiple guides on the web on the topic. The one I usually recommend is this one: https://css-tricks.com/specifics-on-css-specificity/
Hope this helps. Again, please open a new thread if you have other questions.
with regards
alexg
KeymasterHello,
It looks like these are two unrelated errors:
1. The first error is due to faulty HTML somewhere. Without looking at the page’s HTML, it’s impossible to say what. Did you edit the templates by any chance? If you want me to check the HTML, email me with a link to the page (and also let me know if you edited any php files).
2. This is due to a transfer to, or from, a user who does not have the
has_wallets
capability. You should assign thehas_wallets
capability to the user role or roles that correspond with your users. See:Settings -> Bitcoin & Altcoin Wallets -> Capabilities – > General Capabilities
For a discussion about capabilities, please read the documentation. You can find the documentation in the plugin, or at:
– https://github.com/dashed-slug/wallets/blob/6.1.8/docs/settings.md#capabilities-caps
– https://github.com/dashed-slug/wallets/blob/6.1.8/docs/frontend.md#uis-overviewHope this helps. Let me know if you have any more questions about any of this.
P.S. In the future, can you please try to open a new thread for each new issue you encounter? These guidelines are for the benefit of others reading this forum. Thank you.
alexg
KeymasterI also tried to enter an exclusion in the “Public REST APIs” box:
wp-json/wp/dswallets/v1/transactions/validate/<id>
But it didn’t work. Perhaps you can ask them how to exclude a public GET endpoint such as:
https://www.example.com/wp-json/dswallets/v1/transactions/validate/tKTENjpMfzZCtjaJ
Then you wouldn’t have to turn the “Private REST APIs” setting off.
alexg
KeymasterHello,
I got a chance to install BuddyBoss and try this out.
The problem you encountered occurs when the following setting is turned on:
BuddyBoss -> Settings -> Privacy -> Private REST APIs
If you turn this off, then validation links will work again.
The response you got appears to me as if it’s canned. I am not sure if they checked their code. Did you explain to them everything I posted here, including the fact that the REST API of other plugins (Event Tickets and Registration) is affected? The plugin is actively disrupting access of other plugins to the WP REST API. If it’s a security feature then maybe it works as intended, but it seems a little strange to me.
In any case, you can turn off this setting and use both plugins together.
Hope this helps.
with regards
-
AuthorPosts