Manual Wallet Transaction Guide
Sometimes you may want to transfer funds from a platform wallet manually(e.g. to move funds after an erroneous transaction)
To do that, you'd need to do the following:
1. Connect to a
deposit daemon container
kaigara bundle exec rails c
3. Select the currency to be used
cur = Currency.find(key)
key is the currency ID to be used(e.g.
usdt), you can check all existing ID's by running
4. Prepare transaction parameters:
tx = Peatio::Transaction.new(to_address: destination, amount: value.to_f * 0.94, currency_id: cur.id)
destination is the destination address(e.g.
value is the amount of funds to be transferred(e.g.
5. Find the Wallet ID to be used(e.g. hot Wallet of BTC)
# List all available Wallets for a given currency
wallet = Wallet.find(*desired_id*)
6. Create the WalletService:
adapter = WalletService.new(wallet).adapter
cur = Currency.find(tx.currency_id)
adapter.configure(wallet: wallet.to_wallet_api_settings, currency: cur.to_blockchain_api_settings)
7. Create and broadcast the transaction: