January 12, 2019 at 10:39 pm #5565
I just added a new coin adapter and I was wondering how I could generate a new wallet address for every user for the new coin. I’m seeing new addresses being generated when users are signing in, but I need to generate a masterlist of all users for the new coin and their new address.
Thanks.January 14, 2019 at 10:04 am #5569
Deposit addresses are normally generated in three occasions:
1. The first time a user with
has_walletsvisits your site while logged in.
2. Whenever a user requests a new deposit address for a coin. This is done with the button in the
3. You can refresh all the deposit addresses for a coin via the admin interface with “Wallets” -> “Adapters” -> “Renew deposit addresses”.
Older addresses are still being retained, but only the latest one is displayed.
If you wish to view a list of current deposit addresses you can do so via “Wallets” -> “Deposit addresses”, and sort by the “Coin” column.
You can also pull a table of users and deposit addresses via the MySQL console, but keep in mind that deposit addresses can change.
Deposit addresses are stored in the
wp_wallets_addstable. Please let me know if you need help with the SQL query.
with regardsJanuary 14, 2019 at 5:24 pm #5572
I’m quite familiar with all of this functionality, but none of this answers my question.
There’s no way to generate an address for every user when adding a new adapter? I have to wait until every single user logs in before an address is generated for them?January 15, 2019 at 9:26 am #5573
OK now I understand your question.
No, unfortunately right now it is not possible to populate deposit addresses for all users in one go. Of course everything is possible if you can create a script that inserts deposit addresses into the database directly. But this is not easy.
I might be able to include such a feature in the plugin’s next patch release.
If you don’t mind me asking, what’s your use case? Why do you need this?
thank youJanuary 16, 2019 at 7:29 pm #5575
I’ve built a custom airdrop module that lives outside WordPress and it pulls a list of our user’s addresses from the dB. But because the new coin adapter doesn’t retroactively generate a new address for each registered user, I can’t pull a master list of addresses for this airdrop module.
The feature I’d like to suggest is – on the list of the adapters, next to the option to “Renew Deposit Addresses”, there would be another option to “Generate Deposit Addresses” for users that don’t already have one. It would be great if it also included the option based on role. So only users with a specific role get the new address generated.January 16, 2019 at 7:42 pm #5576
Thank you for sharing these details.
Actually I have already developed this feature. I have placed it next to the existing “Renew Deposit Addresses” feature, and you will be able to use it tomorrow when version
3.9.4will be out.
The command affects all users with the
has_walletscapability. If you like, you could temporarily remove this capability from the roles that you do not want affected (see Admin -> “Wallets” -> “Capabilities” menu), then generate the deposit addresses, then finally restore the
has_walletscapability to the other roles.
with regardsJanuary 16, 2019 at 7:47 pm #5577
This is amazing. Thank you so much for your continued support. I will continue to support you and your project however I can.
Cheers!January 17, 2019 at 11:08 am #5583
Thank you very much!
3.9.4is now out and includes the feature you requested.
- You must be logged in to reply to this topic.