Skip to content

Commit

Permalink
fix(gar): delete the vault, do not decrease stake
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Dec 18, 2024
1 parent 77e70d7 commit 8dc61ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,9 @@ function unlockGatewayDelegateVault(gateway, delegateAddress, vaultId)
assert(vault, "Vault not found")

balances.increaseBalance(delegateAddress, vault.balance)
decreaseDelegateStakeAtGateway(delegateAddress, gateway, vault.balance)
-- delete the delegate's vault
gateway.delegates[delegateAddress].vaults[vaultId] = nil
gar.pruneDelegateFromGatewayIfNecessary(delegateAddress, gateway)
end

--- @param gateway Gateway
Expand Down

0 comments on commit 8dc61ab

Please sign in to comment.