Open extra topbar

Manual deposit & withdrawal

If you are new here, please see some information on how to ask for support. Thank you!

Manual deposit & withdrawal

dashed-slug.net Forums General discussion Manual deposit & withdrawal

This topic contains 5 replies, has 2 voices, and was last updated by  alexg 7 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5138

    jongydeleon1
    Participant

    Hi Alex,

    Is there a way I could manually deposit & withdraw coins for users?

    #5143

    alexg
    Keymaster

    Hello,

    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

    #5149

    jongydeleon1
    Participant

    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.

    #5150

    alexg
    Keymaster

    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_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

    #5151

    jongydeleon1
    Participant

    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.

    #5154

    alexg
    Keymaster

    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.

    with regards

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.