feat: Check Destination sufficiency with an optional destApi#565
feat: Check Destination sufficiency with an optional destApi#565andrew-ifrita wants to merge 16 commits into
destApi#565Conversation
d377b34 to
4263f49
Compare
If provided, make additional calls to ensure that receiving accounts will be sufficient and that no assets will be lost when accounts are reaped.
4263f49 to
da304af
Compare
Local txs still benefit from the check.
6bff899 to
941174c
Compare
Also updated .eslintignore as it was taking forever
destApi
|
I can add a few tests, but it should be good enough for review at this point. |
|
Reviewing this a few days later: I would say I'm missing
|
Had this hanging around without a commit
51332a9 to
829500b
Compare
|
Ok, discovered one more issue which is accounting for XCM execution fees being deducted along the way which can lead to a transfer being below the existential deposit and then being lost to account reaping. This is a blocker. Test case is already in place, I have yet to add foreign asset support, but that is less pressing, as it would only cause false positives on the insufficiency check which won't lead to loss of funds, unlike the false negatives if fees are not accounted for. edit: Moving to draft in the meantime |
|
Closing as this has gone stale. |
If provided use
destApito make additional calls to ensure that receiving accounts will be sufficient and that no assets will be lost when accounts are reaped.This is somewhat of a band-aid, as accidental loss of assets is still possible at the protocol level. This at least improves the user experience when it comes to transferring assets until we can investigate fixing the root of the issue at the protocol level.
General Idea
Throw and error or raise a warning if the receiving account will not be sufficient following the transaction.
Motivation
Make it harder for assets to be accidentally be burned by sending them in insufficient accounts which will be reaped.
Goal
Downsides
Questions