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
6 changes: 4 additions & 2 deletions src/app/(mobile-ui)/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,23 @@ export default function Home() {
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)
const isStandalone = window.matchMedia('(display-mode: standalone)').matches
const hasSeenModalThisSession = sessionStorage.getItem('hasSeenIOSPWAPromptThisSession')
const redirectUrl = getFromLocalStorage('redirect')

if (
isIOS &&
!isStandalone &&
!hasSeenModalThisSession &&
!user?.hasPwaInstalled &&
!isPostSignupActionModalVisible
!isPostSignupActionModalVisible &&
!redirectUrl
) {
setShowIOSPWAInstallModal(true)
sessionStorage.setItem('hasSeenIOSPWAPromptThisSession', 'true')
} else {
setShowIOSPWAInstallModal(false)
}
}
}, [user?.hasPwaInstalled])
}, [user?.hasPwaInstalled, isPostSignupActionModalVisible])

// effect for showing balance warning modal
useEffect(() => {
Expand Down
21 changes: 11 additions & 10 deletions src/app/(mobile-ui)/withdraw/crypto/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { useRouter } from 'next/navigation'
import { useCallback, useEffect, useMemo } from 'react'
import { captureMessage } from '@sentry/nextjs'
import type { Address } from 'viem'
import { Slider } from '@/components/Slider'

export default function WithdrawCryptoPage() {
const router = useRouter()
Expand Down Expand Up @@ -361,16 +362,16 @@ export default function WithdrawCryptoPage() {
title="Is this address compatible?"
description="Only send to address that support the selected network and token. Incorrect transfers may be lost."
icon="alert"
ctas={[
{
text: 'Proceed',
onClick: handleCompatibilityProceed,
variant: 'purple',
shadowSize: '4',
className: 'h-10 text-sm',
icon: 'check-circle',
},
]}
footer={
<div className="w-full">
<Slider
onValueChange={(v: boolean) => {
if (!v) return
handleCompatibilityProceed()
}}
/>
</div>
}
/>
</div>
)
Expand Down
6 changes: 3 additions & 3 deletions src/components/Claim/Link/Initial.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import {
usdcAddressOptimism,
} from '@/components/Offramp/Offramp.consts'
import { ActionType, estimatePoints } from '@/components/utils/utils'
import * as consts from '@/constants'
import {
PEANUT_WALLET_CHAIN,
PEANUT_WALLET_TOKEN,
PINTA_WALLET_CHAIN,
PINTA_WALLET_TOKEN,
ROUTE_NOT_FOUND_ERROR,
SQUID_API_URL,
} from '@/constants'
import { TRANSACTIONS } from '@/constants/query.consts'
import { loadingStateContext, tokenSelectorContext } from '@/context'
Expand Down Expand Up @@ -380,7 +380,7 @@ export const InitialClaimLinkView = (props: IClaimScreenProps) => {

const isReward = useMemo(() => {
if (!claimLinkData.tokenAddress) return false
return areEvmAddressesEqual(claimLinkData.tokenAddress, consts.PINTA_WALLET_TOKEN)
return areEvmAddressesEqual(claimLinkData.tokenAddress, PINTA_WALLET_TOKEN)
}, [claimLinkData.tokenAddress])

const fetchRoute = useCallback(
Expand Down Expand Up @@ -410,7 +410,7 @@ export const InitialClaimLinkView = (props: IClaimScreenProps) => {
: claimLinkData.tokenAddress.toLowerCase()

const route = await getSquidRouteRaw({
squidRouterUrl: `${consts.SQUID_API_URL}/route`,
squidRouterUrl: `${SQUID_API_URL}/v2/route`,
fromChain: claimLinkData.chainId.toString(),
fromToken: fromToken,
fromAmount: tokenAmount.toString(),
Expand Down
4 changes: 2 additions & 2 deletions src/constants/general.consts.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as interfaces from '@/interfaces'
import { CHAIN_DETAILS, TOKEN_DETAILS } from '@squirrel-labs/peanut-sdk'
import { mainnet, arbitrum, arbitrumSepolia, polygon, optimism, base, bsc, scroll, baseSepolia } from 'viem/chains'
import { mainnet, arbitrum, arbitrumSepolia, polygon, optimism, base, bsc, scroll } from 'viem/chains'

export const peanutWalletIsInPreview = true

export const INFURA_API_KEY = process.env.NEXT_PUBLIC_INFURA_API_KEY
export const ALCHEMY_API_KEY = process.env.NEXT_PUBLIC_ALCHEMY_API_KEY

export const SQUID_INTEGRATOR_ID = process.env.SQUID_INTEGRATOR_ID!
export const SQUID_API_URL = process.env.SQUID_API_URL
export const SQUID_API_URL = process.env.NEXT_PUBLIC_SQUID_API_URL

const infuraUrl = (subdomain: string) => (INFURA_API_KEY ? `https://${subdomain}.infura.io/v3/${INFURA_API_KEY}` : null)
const alchemyUrl = (subdomain: string) =>
Expand Down
Loading