Get rid of warnings when coin is blocked and its desired balance gets calculated
I have some units of a coin that I don't want to trade, so I have blocked that coin in the configuration.
However, the bot still notices the coin when it queries all the balances. Since that information is stored in $wallets, that information can be retrieved by calling getWallets() or getWalletsConsideringPendingDeposits(). So far, everything is still OK.
At some point saveSnapshot() gets executed. It will iterate over all the wallets, even the one of the blocked coin. And then:
- It calls
$exchange->getConfirmationTime( $coin ), which displays:"WARNING: Unknown confirmation time for $tradeable. Calculations may be inaccurate!" - It calls
$exchange->getSmallestOrderSize( $coin, 'BTC', 'buy' )(and its 'sell' variant). For a CCXTAdapter-based exchange this will result in a message that looks like "Notice: Undefined index: $pair in CCXTAdapter.php"
We should avoid these messages and just decide that the $desiredBalance value of a blocked coin is equal to its current balance.
Sure, I'd be open to removing any warning messages that are spammy and/or don't make sense. Do you feel like creating a PR for these? :-)