From fcc4c4671a3c387a91ae23c1615291c8c3975d95 Mon Sep 17 00:00:00 2001 From: livingrockrises <90545960+livingrockrises@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:44:48 +0400 Subject: [PATCH] respond to PR comments --- contracts/sponsorship/BiconomySponsorshipPaymaster.sol | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/contracts/sponsorship/BiconomySponsorshipPaymaster.sol b/contracts/sponsorship/BiconomySponsorshipPaymaster.sol index b27d5e7..cda8beb 100644 --- a/contracts/sponsorship/BiconomySponsorshipPaymaster.sol +++ b/contracts/sponsorship/BiconomySponsorshipPaymaster.sol @@ -282,14 +282,12 @@ contract BiconomySponsorshipPaymaster is if (prechargedAmount > adjustedGasCost) { // If overcharged refund the excess paymasterIdBalances[paymasterId] += (prechargedAmount - adjustedGasCost); - // here adjustedGasCost does not account for gasPenalty - emit GasBalanceDeducted(paymasterId, adjustedGasCost, premium); } else { // deduct what needs to be deducted from paymasterId - paymasterIdBalances[paymasterId] -= (adjustedGasCost - prechargedAmount); - // here chargedAmount accounts for penalty with maxGasPenalty - emit GasBalanceDeducted(paymasterId, prechargedAmount, premium); + paymasterIdBalances[paymasterId] -= (adjustedGasCost - prechargedAmount); } + // here adjustedGasCost does not account for gasPenalty. prechargedAmount accounts for penalty with maxGasPenalty + emit GasBalanceDeducted(paymasterId, adjustedGasCost, premium); } }