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

Bugfix/2103 stop withdrawal if amount too big #2117

Merged
merged 5 commits into from
Aug 21, 2020

Conversation

jeremyletang
Copy link
Member

Add a LockFund step to be used later which ensure we have enough funds to withdraw.
return an error if cannot or process.
closes #2103

Copy link
Member

@edd edd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The withdraw lock account seems like a good approach. I guess it'll need a timeout or something so funds don't get stuck there forever?

@jeremyletang
Copy link
Member Author

The withdraw lock account seems like a good approach. I guess it'll need a timeout or something so funds don't get stuck there forever?

Absolutely, it's mentionned in the ticket for the withdrawal of erc20 that we want to have a timeout on that. Initial version won't have this, and we'll take care of it later. I prefer to finalize the whole withdrawal before introduce the timeout mecanics.

@edd
Copy link
Member

edd commented Aug 20, 2020

@jeremyletang Great - I've put a ticket on https://github.com/orgs/vegaprotocol/projects/24#card-44024089 so we don't forget about that

@jeremyletang jeremyletang force-pushed the bugfix/2103-stop-withdrawal-if-amount-too-big branch from 7c515a6 to 85ea306 Compare August 21, 2020 09:47
@jeremyletang
Copy link
Member Author

This has been rebased + integration tests fixed and is therefore ready to merge.

@vega-ci-bot
Copy link
Collaborator

system-tests failed.

=== Test summary ===
../../grpcTesting/governance/newAssetTests.py ..F......x............x.ss [ 89%]
sss                                                                      [100%]
 testDepositBuiltInAmtGreatMaxDep 
../../grpcTesting/governance/newMarketGovTests.py .....................x [ 47%]
........................                                                 [100%]
../../grpcTesting/governance/newMarketTradesTests.py ............        [100%]
../../grpcTesting/margins/marginsTests.py x..x                           [100%]
../../grpcTesting/markets/marketsTests.py ..............                 [100%]
../../grpcTesting/orders/amendOrdersTests.py .ssssssssssssssssssssssssss [ 81%]
ssssss                                                                   [100%]
../../grpcTesting/orders/cancelOrdersTests.py .....................s.s   [100%]
../../grpcTesting/orders/generalOrdersTests.py .............             [100%]
../../grpcTesting/orders/limitOrdersTests.py ............                [100%]
../../grpcTesting/orders/marketOrdersTests.py ........                   [100%]
../../grpcTesting/orders/mixedOrdersTests.py ..................sss       [100%]
../../grpcTesting/orders/negativeOrdersTests.py ........................ [ 57%]
....x..ssssss.s...                                                       [100%]
../../grpcTesting/parallel/submitParallelOrdersTests.py ......s.         [100%]
../../grpcTesting/parties/partiesTests.py ..                             [100%]
../../grpcTesting/trading/positionsTests.py ..                           [100%]
../../grpcTesting/trading/tradesTests.py FF............                  [100%]
 testCheckFeesAggresiveSell 
 testCheckFeesAggresiveBuy 
../../grpcTesting/wallet/walletTests.py ................................ [ 91%]
.s.                                                                      [100%]
../../rest/orders/negativeOrdersTests.py .                               [100%]

@edd edd merged commit fc6aa85 into develop Aug 21, 2020
@edd edd mentioned this pull request Sep 1, 2020
10 tasks
@ashleyvega ashleyvega deleted the bugfix/2103-stop-withdrawal-if-amount-too-big branch November 5, 2020 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Withdrawing more than available asset funds zeros the account balance
4 participants