dashed-slug.net › Forums › Full Node Multi Coin Adapter extension support › How to generate addresses for every user on new adapter
Tagged: address, deposit, deposit address, renew
- This topic has 7 replies, 2 voices, and was last updated 5 years, 11 months ago by alexg.
-
AuthorPosts
-
January 12, 2019 at 10:39 pm #5565AnonymousInactive
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 #5569alexgKeymasterHello,
Deposit addresses are normally generated in three occasions:
1. The first time a user with
has_wallets
visits 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[wallets_deposit]
UI.
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_adds
table. Please let me know if you need help with the SQL query.with regards
January 14, 2019 at 5:24 pm #5572AnonymousInactiveI’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 #5573alexgKeymasterOK 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 you
January 16, 2019 at 7:29 pm #5575AnonymousInactiveI’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 #5576alexgKeymasterThank 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.4
will be out.The command affects all users with the
has_wallets
capability. 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 thehas_wallets
capability to the other roles.with regards
January 16, 2019 at 7:47 pm #5577AnonymousInactiveThis 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 #5583alexgKeymasterThank you very much!
Version
3.9.4
is now out and includes the feature you requested.with regards
-
AuthorPosts
- You must be logged in to reply to this topic.