`kraken`: ignore mismatched zero-ed pps (for now)
See more details in the GH comment: https://github.com/pikers/piker/issues/373#issuecomment-1380988581 More or less we need to pull and include the transfer fees for withdrawals in our ledger tracking but this serves as a sloppy workaround for the moment.misc_brokerd_backend_repairs
parent
73379d3627
commit
94290c7d8b
|
@ -534,6 +534,21 @@ async def trades_dialogue(
|
||||||
):
|
):
|
||||||
return pp
|
return pp
|
||||||
|
|
||||||
|
elif (
|
||||||
|
size == 0
|
||||||
|
and pp.size
|
||||||
|
):
|
||||||
|
log.warning(
|
||||||
|
f'`kraken` account says you have a ZERO '
|
||||||
|
f'balance for {bsuid}:{pair}\n'
|
||||||
|
f'but piker seems to think `{pp.size}`\n'
|
||||||
|
'This is likely a discrepancy in piker '
|
||||||
|
'accounting if the above number is'
|
||||||
|
"large,' though it's likely to due lack"
|
||||||
|
"f tracking xfers fees.."
|
||||||
|
)
|
||||||
|
return pp
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
pos = has_pp(dst, size)
|
pos = has_pp(dst, size)
|
||||||
|
@ -590,7 +605,7 @@ async def trades_dialogue(
|
||||||
f'{pformat(updated)}'
|
f'{pformat(updated)}'
|
||||||
)
|
)
|
||||||
|
|
||||||
if not has_pp(dst, size):
|
if has_pp(dst, size):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'Could not reproduce balance:\n'
|
'Could not reproduce balance:\n'
|
||||||
f'dst: {dst}, {size}\n'
|
f'dst: {dst}, {size}\n'
|
||||||
|
|
Loading…
Reference in New Issue