setShowExternalWalletFulfillMethods(false)} />
}
return null
diff --git a/src/components/Request/views/ExternalWalletFulfilMethods.tsx b/src/components/Request/views/ExternalWalletFulfilMethods.tsx
index a427dbb6c..93204103c 100644
--- a/src/components/Request/views/ExternalWalletFulfilMethods.tsx
+++ b/src/components/Request/views/ExternalWalletFulfilMethods.tsx
@@ -23,7 +23,7 @@ const methods: PaymentMethod[] = [
]
export default function ExternalWalletFulfilMethods({ onBack }: { onBack: () => void }) {
- const { setExternalWalletFulfilMethod } = useRequestFulfillmentFlow()
+ const { setExternalWalletFulfillMethod } = useRequestFulfillmentFlow()
return (
@@ -35,7 +35,7 @@ export default function ExternalWalletFulfilMethods({ onBack }: { onBack: () =>
key={method.id}
method={method}
onClick={() => {
- setExternalWalletFulfilMethod(method.id as ExternalWalletFulfilMethod)
+ setExternalWalletFulfillMethod(method.id as ExternalWalletFulfilMethod)
}}
/>
))}
diff --git a/src/constants/actionlist.consts.ts b/src/constants/actionlist.consts.ts
index 7ed112d8d..944a2a177 100644
--- a/src/constants/actionlist.consts.ts
+++ b/src/constants/actionlist.consts.ts
@@ -1,4 +1,4 @@
-import { MERCADO_PAGO } from '@/assets'
+import { MERCADO_PAGO, PIX } from '@/assets'
import { METAMASK_LOGO, TRUST_WALLET_SMALL_LOGO } from '@/assets/wallets'
import binanceIcon from '@/assets/exchanges/binance.svg'
@@ -29,6 +29,13 @@ export const ACTION_METHODS: PaymentMethod[] = [
icons: [MERCADO_PAGO],
soon: false,
},
+ {
+ id: 'pix',
+ title: 'Pix',
+ description: 'Instant transfers',
+ icons: [PIX],
+ soon: false,
+ },
{
id: 'exchange-or-wallet',
title: 'Exchange or Wallet',
diff --git a/src/context/ClaimBankFlowContext.tsx b/src/context/ClaimBankFlowContext.tsx
index deda0810f..f07fdaffb 100644
--- a/src/context/ClaimBankFlowContext.tsx
+++ b/src/context/ClaimBankFlowContext.tsx
@@ -44,6 +44,8 @@ interface ClaimBankFlowContextType {
setJustCompletedKyc: (status: boolean) => void
claimToMercadoPago: boolean
setClaimToMercadoPago: (claimToMercadoPago: boolean) => void
+ regionalMethodType: 'mercadopago' | 'pix'
+ setRegionalMethodType: (regionalMethodType: 'mercadopago' | 'pix') => void
}
const ClaimBankFlowContext = createContext(undefined)
@@ -63,6 +65,7 @@ export const ClaimBankFlowContextProvider: React.FC<{ children: ReactNode }> = (
const [senderKycStatus, setSenderKycStatus] = useState()
const [justCompletedKyc, setJustCompletedKyc] = useState(false)
const [claimToMercadoPago, setClaimToMercadoPago] = useState(false)
+ const [regionalMethodType, setRegionalMethodType] = useState<'mercadopago' | 'pix'>('mercadopago')
const resetFlow = useCallback(() => {
setClaimToExternalWallet(false)
@@ -79,6 +82,7 @@ export const ClaimBankFlowContextProvider: React.FC<{ children: ReactNode }> = (
setSenderKycStatus(undefined)
setJustCompletedKyc(false)
setClaimToMercadoPago(false)
+ setRegionalMethodType('mercadopago')
}, [])
const value = useMemo(
@@ -112,6 +116,8 @@ export const ClaimBankFlowContextProvider: React.FC<{ children: ReactNode }> = (
setJustCompletedKyc,
claimToMercadoPago,
setClaimToMercadoPago,
+ regionalMethodType,
+ setRegionalMethodType,
}),
[
claimToExternalWallet,
@@ -130,6 +136,7 @@ export const ClaimBankFlowContextProvider: React.FC<{ children: ReactNode }> = (
justCompletedKyc,
claimToMercadoPago,
setClaimToMercadoPago,
+ regionalMethodType,
]
)
diff --git a/src/context/RequestFulfillmentFlowContext.tsx b/src/context/RequestFulfillmentFlowContext.tsx
index 0fe808925..c324d3b31 100644
--- a/src/context/RequestFulfillmentFlowContext.tsx
+++ b/src/context/RequestFulfillmentFlowContext.tsx
@@ -16,12 +16,12 @@ export enum RequestFulfillmentBankFlowStep {
interface RequestFulfillmentFlowContextType {
resetFlow: () => void
- showExternalWalletFulfilMethods: boolean
- setShowExternalWalletFulfilMethods: (showExternalWalletFulfilMethods: boolean) => void
+ showExternalWalletFulfillMethods: boolean
+ setShowExternalWalletFulfillMethods: (showExternalWalletFulfillMethods: boolean) => void
showRequestFulfilmentBankFlowManager: boolean
setShowRequestFulfilmentBankFlowManager: (showRequestFulfilmentBankFlowManager: boolean) => void
- externalWalletFulfilMethod: ExternalWalletFulfilMethod | null
- setExternalWalletFulfilMethod: (externalWalletFulfilMethod: ExternalWalletFulfilMethod | null) => void
+ externalWalletFulfillMethod: ExternalWalletFulfilMethod | null
+ setExternalWalletFulfillMethod: (externalWalletFulfillMethod: ExternalWalletFulfilMethod | null) => void
flowStep: RequestFulfillmentBankFlowStep | null
setFlowStep: (step: RequestFulfillmentBankFlowStep | null) => void
selectedCountry: CountryData | null
@@ -34,13 +34,15 @@ interface RequestFulfillmentFlowContextType {
setRequesterDetails: (details: User | null) => void
fulfillUsingManteca: boolean
setFulfillUsingManteca: (fulfillUsingManteca: boolean) => void
+ regionalMethodType: 'mercadopago' | 'pix'
+ setRegionalMethodType: (regionalMethodType: 'mercadopago' | 'pix') => void
}
const RequestFulfillmentFlowContext = createContext(undefined)
export const RequestFulfilmentFlowContextProvider: React.FC<{ children: ReactNode }> = ({ children }) => {
- const [showExternalWalletFulfilMethods, setShowExternalWalletFulfilMethods] = useState(false)
- const [externalWalletFulfilMethod, setExternalWalletFulfilMethod] = useState(
+ const [showExternalWalletFulfillMethods, setShowExternalWalletFulfillMethods] = useState(false)
+ const [externalWalletFulfillMethod, setExternalWalletFulfillMethod] = useState(
null
)
const [showRequestFulfilmentBankFlowManager, setShowRequestFulfilmentBankFlowManager] = useState(false)
@@ -50,10 +52,11 @@ export const RequestFulfilmentFlowContextProvider: React.FC<{ children: ReactNod
const [showVerificationModal, setShowVerificationModal] = useState(false)
const [requesterDetails, setRequesterDetails] = useState(null)
const [fulfillUsingManteca, setFulfillUsingManteca] = useState(false)
+ const [regionalMethodType, setRegionalMethodType] = useState<'mercadopago' | 'pix'>('mercadopago')
const resetFlow = useCallback(() => {
- setExternalWalletFulfilMethod(null)
- setShowExternalWalletFulfilMethods(false)
+ setExternalWalletFulfillMethod(null)
+ setShowExternalWalletFulfillMethods(false)
setFlowStep(null)
setShowRequestFulfilmentBankFlowManager(false)
setSelectedCountry(null)
@@ -61,15 +64,16 @@ export const RequestFulfilmentFlowContextProvider: React.FC<{ children: ReactNod
setShowVerificationModal(false)
setRequesterDetails(null)
setFulfillUsingManteca(false)
+ setRegionalMethodType('mercadopago')
}, [])
const value = useMemo(
() => ({
resetFlow,
- externalWalletFulfilMethod,
- setExternalWalletFulfilMethod,
- showExternalWalletFulfilMethods,
- setShowExternalWalletFulfilMethods,
+ externalWalletFulfillMethod,
+ setExternalWalletFulfillMethod,
+ showExternalWalletFulfillMethods,
+ setShowExternalWalletFulfillMethods,
flowStep,
setFlowStep,
showRequestFulfilmentBankFlowManager,
@@ -84,11 +88,13 @@ export const RequestFulfilmentFlowContextProvider: React.FC<{ children: ReactNod
setRequesterDetails,
fulfillUsingManteca,
setFulfillUsingManteca,
+ regionalMethodType,
+ setRegionalMethodType,
}),
[
resetFlow,
- externalWalletFulfilMethod,
- showExternalWalletFulfilMethods,
+ externalWalletFulfillMethod,
+ showExternalWalletFulfillMethods,
flowStep,
showRequestFulfilmentBankFlowManager,
selectedCountry,
@@ -96,6 +102,7 @@ export const RequestFulfilmentFlowContextProvider: React.FC<{ children: ReactNod
showVerificationModal,
requesterDetails,
fulfillUsingManteca,
+ regionalMethodType,
]
)
diff --git a/src/hooks/useCurrency.ts b/src/hooks/useCurrency.ts
index a103fa8dd..d200d7bc4 100644
--- a/src/hooks/useCurrency.ts
+++ b/src/hooks/useCurrency.ts
@@ -22,7 +22,7 @@ export const useCurrency = (currencyCode: string | null) => {
const [code, setCode] = useState(currencyCode?.toUpperCase() ?? null)
const [symbol, setSymbol] = useState(null)
const [price, setPrice] = useState<{ buy: number; sell: number } | null>(null)
- const [isLoading, setIsLoading] = useState(false)
+ const [isLoading, setIsLoading] = useState(true)
useEffect(() => {
if (!code) {