November 27, 2018 at 5:27 am #5138
Is there a way I could manually deposit & withdraw coins for users?November 27, 2018 at 9:57 am #5143
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_coinsto 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 regardsNovember 28, 2018 at 11:21 am #5149
Hi 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 #5150
As 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_txstable 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:
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 regardsNovember 29, 2018 at 1:12 pm #5151
In 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 #5154
OK 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.
You must be logged in to reply to this topic.