-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix(gar): do not remove delegate before decreasing stake #283
Conversation
@@ -395,7 +395,6 @@ local function assertAndSanitizeInputs(msg) | |||
.. msg.Timestamp | |||
) | |||
assert(msg.From, "From is required") | |||
assert(msg.Id, "Id is required") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was blocking some dry-runs like Info
- but not others 🤔
@@ -2055,7 +2067,6 @@ function unlockGatewayDelegateVault(gateway, delegateAddress, vaultId) | |||
assert(vault, "Vault not found") | |||
|
|||
balances.increaseBalance(delegateAddress, vault.balance) | |||
gateway.delegates[delegateAddress] = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we nil out delegate in decreaseDelegateStakeAtGateway
if necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually need to change - i don't think we should be calling decreaseDelegateStakeAtGateway
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #283 +/- ##
===========================================
+ Coverage 94.42% 94.44% +0.02%
===========================================
Files 10 10
Lines 2976 2987 +11
===========================================
+ Hits 2810 2821 +11
Misses 166 166 ☔ View full report in Codecov by Sentry. |
assert(delegate, "Delegate is required") | ||
-- zero is allowed as it is a no-op | ||
assert( | ||
quantity and utils.isInteger(quantity) and quantity >= 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we could change this to be greater than the delegate.totalDelegatedStake
No description provided.