Skip to content

Commit

Permalink
respond to PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
livingrockrises committed Oct 22, 2024
1 parent d2d96a5 commit fcc4c46
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions contracts/sponsorship/BiconomySponsorshipPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit fcc4c46

Please sign in to comment.