Skip to content

Commit 645f063

Browse files
committed
fix max check
1 parent cbe3858 commit 645f063

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cadence/contracts/connectors/evm/ERC4626SwapConnectors.cdc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ access(all) contract ERC4626SwapConnectors {
106106
}
107107
let uintForDesired = FlowEVMBridgeUtils.convertCadenceAmountToERC20Amount(forDesired, erc20Address: self.vault)
108108
if let uintRequired = ERC4626Utils.previewMint(vault: self.vault, shares: uintForDesired) {
109-
if uintRequired > UInt256(UFix64.max) {
109+
let uintMaxAllowed = FlowEVMBridgeUtils.convertCadenceAmountToERC20Amount(UFix64.max, erc20Address: self.vault)
110+
111+
if uintRequired > uintMaxAllowed {
110112
return SwapConnectors.BasicQuote(
111113
inType: self.asset,
112114
outType: self.vaultType,

0 commit comments

Comments
 (0)