Skip to content

Commit

Permalink
👷🏻 🧹 Add USDC_TO_SUSDC_DECIMALS_INCREASE constant
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyrharper committed Jul 16, 2024
1 parent a5f7ccd commit 3225c4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MarginPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ contract MarginPaymaster is IPaymaster, Zap, Ownable {
uint256 public constant DEFAULT_WALLET_INDEX = 0;
uint256 public constant SIGNATURE_BYTES_OFFSET = 20;
uint256 public constant ACCOUNT_ID_OFFSET = 85;
uint256 public constant USDC_TO_SUSDC_DECIMALS_INCREASE = 1e12;

/*//////////////////////////////////////////////////////////////
STATE
Expand Down Expand Up @@ -224,7 +225,7 @@ contract MarginPaymaster is IPaymaster, Zap, Ownable {
}

uint256 sUSDToWithdrawFromMargin = (costOfGasInUSDC -
availableUSDCInWallet) * 1e12;
availableUSDCInWallet) * USDC_TO_SUSDC_DECIMALS_INCREASE;
uint256 withdrawn = withdrawFromMargin(
sender,
sUSDToWithdrawFromMargin,
Expand Down

0 comments on commit 3225c4c

Please sign in to comment.