From bc25288d08089f6f2d6800c1e824d83b2b6d63eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Stuczy=C5=84ski?= Date: Tue, 29 Nov 2022 16:18:21 +0000 Subject: [PATCH] Using updated pledge cap in the vesting contract --- .../vesting/src/vesting/account/mixnode_bonding_account.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/vesting/src/vesting/account/mixnode_bonding_account.rs b/contracts/vesting/src/vesting/account/mixnode_bonding_account.rs index 08041cabbd..74917a16c7 100644 --- a/contracts/vesting/src/vesting/account/mixnode_bonding_account.rs +++ b/contracts/vesting/src/vesting/account/mixnode_bonding_account.rs @@ -94,7 +94,7 @@ impl MixnodeBondingAccount for Account { let current_balance = self.load_balance(storage)?; let total_pledged_after = self.total_pledged_locked(storage, env)? + additional_pledge.amount; - let locked_pledge_cap = locked_pledge_cap(storage); + let locked_pledge_cap = self.absolute_pledge_cap()?; if locked_pledge_cap < total_pledged_after { return Err(ContractError::LockedPledgeCapReached {