Skip to content

Commit

Permalink
Fix warnings for maximumOnRampAmount
Browse files Browse the repository at this point in the history
  • Loading branch information
asoong committed May 23, 2024
1 parent e742a46 commit b159064
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 37 deletions.
33 changes: 0 additions & 33 deletions client/src/contexts/common/SwapQuote/SwapQuoteProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,39 +167,6 @@ const SwapQuoteProvider = ({ children }: ProvidersProps) => {
const [lastOnRampTimestamp, setLastOnRampTimestamp] = useState<bigint | null>(null);
const [refetchLastOnRampTimestamp, setRefetchLastOnRampTimestamp] = useState<(() => void) | null>(null);

const [maxTransferSize, setMaxTransferSize] = useState<bigint | null>(null);

/*
* Miscellaneous
*/

useEffect(() => {
esl && console.log('paymentPlatform: ', paymentPlatform);

switch (paymentPlatform) {
case PaymentPlatform.VENMO:
setMaxTransferSize(venmoMaximumOnRampAmount);
break;

case PaymentPlatform.HDFC:
setMaxTransferSize(hdfcMaximumOnRampAmount);
break;

case PaymentPlatform.GARANTI:
setMaxTransferSize(garantiMaximumOnRampAmount);
break;

case PaymentPlatform.REVOLUT:
setMaxTransferSize(revolutMaximumOnRampAmount);
break;

default:
throw new Error(`Unknown payment platform: ${paymentPlatform}`);
}

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [paymentPlatform]);

/*
* Registration
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const LiquidityProvider = ({ children }: ProvidersProps) => {
error: 'No deposits available'
} as IndicativeQuote;
}
}, [depositStore]);
}, [depositStore, maximumOnRampAmount]);

/*
* Helpers
Expand Down
2 changes: 1 addition & 1 deletion client/src/contexts/hdfc/Liquidity/LiquidityProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const LiquidityProvider = ({ children }: ProvidersProps) => {
error: 'No deposits available'
} as IndicativeQuote;
}
}, [depositStore]);
}, [depositStore, maximumOnRampAmount]);

/*
* Helpers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const LiquidityProvider = ({ children }: ProvidersProps) => {
error: 'No deposits available'
} as IndicativeQuote;
}
}, [depositStore]);
}, [depositStore, maximumOnRampAmount]);

/*
* Helpers
Expand Down
2 changes: 1 addition & 1 deletion client/src/contexts/venmo/Liquidity/LiquidityProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const LiquidityProvider = ({ children }: ProvidersProps) => {
error: 'No deposits available'
} as IndicativeQuote;
}
}, [depositStore]);
}, [depositStore, maximumOnRampAmount]);

/*
* Helpers
Expand Down

0 comments on commit b159064

Please sign in to comment.