Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 3 additions & 21 deletions components/Card/CardDepositInternalForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -738,15 +738,6 @@ export default function CardDepositInternalForm() {

const isWalletSourceGaslessGated =
isProduction && watchedFrom === CardDepositSource.WALLET;
const cardDepositMinimumAmount = EXPO_PUBLIC_MINIMUM_SPONSOR_AMOUNT;
const isCardDepositSponsor = isWalletSourceGaslessGated
? Number(watchedAmount || 0) >= Number(cardDepositMinimumAmount)
: true;
const isBelowMinimumDeposit =
isWalletSourceGaslessGated &&
!!watchedAmount &&
Number(watchedAmount) > 0 &&
Number(watchedAmount) < Number(cardDepositMinimumAmount);

const schema = useMemo(() => {
return z.object({
Expand Down Expand Up @@ -1393,18 +1384,9 @@ export default function CardDepositInternalForm() {

{isWalletSourceGaslessGated && (
<View className="mt-2 flex-row items-start gap-2">
<Fuel
color={isBelowMinimumDeposit ? '#EF4444' : '#A1A1A1'}
size={16}
className="mt-0.5"
/>
<Text
className="max-w-xs text-sm"
style={{ color: isBelowMinimumDeposit ? '#EF4444' : '#A1A1A1' }}
>
{isCardDepositSponsor
? 'Gasless deposit'
: `Gasless deposit - Please deposit above $${cardDepositMinimumAmount} USDC so we can cover your fees`}
<Fuel color="#A1A1A1" size={16} className="mt-0.5" />
<Text className="max-w-xs text-sm" style={{ color: '#A1A1A1' }}>
Gasless deposit
</Text>
</View>
)}
Expand Down
2 changes: 1 addition & 1 deletion hooks/useDepositFromSolidUsdc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const useDepositFromSolidUsdc = (

const isSponsor = Number(amount) >= Number(minimumAmount);

if (!isSponsor) {
if (!isCard && !isSponsor) {
throw new Error(`Minimum deposit amount is $${minimumAmount}`);
}

Expand Down
Loading