Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deposits less then min_collect amount never go to system wallets, even multiple when balance on deposit address is higher then minimal collection amount #2739

Open
foraone opened this issue Nov 11, 2020 · 2 comments

Comments

@foraone
Copy link

foraone commented Nov 11, 2020

Problem 1. Lets assume we have minimal collection amount is 0.1 ETH and there are 2 deposit transactions for 0.055 ETH total amount on the deposit address will be 0.11 ETH which is more then limit, but that balance is not collected.

Problem 2. When I later transfer 0.2 ETH to the same deposit address, only 0.2 ETH is collected, but not 0.31 ETH (actual balance of the wallet)

Problem 3. In Peatio sates of first 2 transactions are "collected", so neither Peatio, nor Admin user can't see that those coins/tokens never landed to hot wallet. There is no way to collect remaining balance (even with PR for 2.5 with collection in API) of deposit address to Hot/Warm/Cold wallet because in system it is marked as collected.

Tested on Peatio 2.5

@foraone foraone changed the title Deposits less then min_collect amount never go to system wallets even multiple Deposits less then min_collect amount never go to system wallets, even multiple when balance on deposit address is higher then minimal collection amount Nov 11, 2020
@mnaichuk
Copy link
Member

mnaichuk commented Nov 12, 2020

hello @foraone all logic related to spreading between wallets you can find here

def spread_between_wallets(deposit, destination_wallets)

as you can see here:

      # So we collect everything to current wallet.
      if left_amount < dw[:min_collection_amount]
        amount_for_wallet += left_amount
        left_amount = 0
      end

so it should go to the latest wallet

@zozi91
Copy link

zozi91 commented Nov 12, 2020

Hello @mnaichuk

if 'deposit amount' < 'min collect amount'. what happen with this deposit state?

it will return collected or skipped ? I have tested in peatio 2.5. it return to 'collected'

If it return to 'collected'. How can admin re-collect it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants