dashed-slug.net › Forums › General discussion › Manual deposit & withdrawal
Tagged: manual, manual withdraw, withdraw
- This topic has 5 replies, 2 voices, and was last updated 5 years, 10 months ago by alexg.
-
AuthorPosts
-
November 27, 2018 at 5:27 am #5138alexgKeymaster
Hi Alex,
Is there a way I could manually deposit & withdraw coins for users?
November 27, 2018 at 9:57 am #5143alexgKeymasterHello,
There is no easy way to do this, except for manual deposits for fiat coins. The fiat coin adapter will be extended in the future to include fiat withdrawals which of course will be manual. You could use the
wallets_fiat_custom_coins
to add currencies.If you want to do manual deposits & withdrawals today with coins that already have a coin adapter, you can do this manually from the database.
with regards
November 28, 2018 at 11:21 am #5149alexgKeymasterHi Alex, could I please know how I could manually deposit & withdraw user balances from the database? AFAIK, there isn’t any database table showing user balances right now.
November 29, 2018 at 9:58 am #5150alexgKeymasterAs you say there is no balances table. Balances are derived from the transactions table.
If you were to insert a row to the
wp_wallets_txs
table with category=deposit and status=done this would affect the balance. You would need to fill most of the other columns as well, most importantly give your transaction a unique ID. The columns are documented in the schema:https://github.com/dashed-slug/wallets/blob/3.9.0/includes/wallets-core.php#L293-L313
As you can understand, this is not a functionality that I want to add to the plugin as it would create a mess, but you are free to do this manually if you like.
with regards
November 29, 2018 at 1:12 pm #5151alexgKeymasterIn that case, it would be nice to have manual withdrawal available for custom currencies & fiat currencies.
I am using the fiat currency adapter to host a token which is not available on the adapter & allowing users to withdraw it is quite difficult.
In terms of changing icons for the custom added currency, could you please be kind enough to guide me? I am aware that I have to change the code on a php file somewhere but not really sure what to do or how.
November 30, 2018 at 10:46 am #5154alexgKeymasterOK I understand now.
Since you are using a custom token with the fiat coin adapter, you should know that I already am planning to implement manual withdrawals to that particular adapter. I simply haven’t got around to do this yet because I am very busy with other components. I am currently working on improvements to the Exchange extension. I will add withdrawals when I get to the next sprint for the Fiat coin adapter.
For overriding the icons, please see the manual under Frontend -> JSON API filters -> Coin icon for an example. You should add the code either to a child theme in your functions.php file, or as a new plugin.
In the future could you please start a new thread if you have a new request? This helps me and others who read the forum later.
with regards
-
AuthorPosts
- You must be logged in to reply to this topic.