Skip to content

Commit

Permalink
Create Context subdirectories based on payment platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
asoong committed Dec 5, 2023
1 parent bff5d0c commit e70b971
Show file tree
Hide file tree
Showing 61 changed files with 34 additions and 34 deletions.
24 changes: 12 additions & 12 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ import { TopNav } from "@components/layouts/TopNav";
import { MobileLandingPage } from "@components/MobileLandingPage";
import { EnvironmentBanner } from '@components/layouts/EnvironmentBanner';

import AccountProvider from "./contexts/Account/AccountProvider";
import SmartContractsProvider from './contexts/SmartContracts/SmartContractsProvider';
import BalancesProvider from "./contexts/Balances/BalancesProvider";
import RampProvider from './contexts/Ramp/RampProvider';
import RegistrationProvider from './contexts/Registration/RegistrationProvider';
import DepositsProvider from './contexts/Deposits/DepositsProvider';
import PermissionsProvider from './contexts/Permissions/PermissionsProvider';
import PlatformSettings from './contexts/PlatformSettings/PlatformSettingsProvider';
import OnRamperIntentsProvider from './contexts/OnRamperIntents/OnRamperIntentsProvider';
import LiquidityProvider from './contexts/Liquidity/LiquidityProvider';
import ProofGenSettingsProvider from "./contexts/ProofGenSettings/ProofGenSettingsProvider";
import GoogleAuthProvider from './contexts/GoogleAuth/GoogleAuthProvider';
import AccountProvider from "./contexts/common/Account/AccountProvider";
import SmartContractsProvider from './contexts/common/SmartContracts/SmartContractsProvider';
import BalancesProvider from "./contexts/common/Balances/BalancesProvider";
import RampProvider from './contexts/venmo/Ramp/RampProvider';
import RegistrationProvider from './contexts/venmo/Registration/RegistrationProvider';
import DepositsProvider from './contexts/venmo/Deposits/DepositsProvider';
import PermissionsProvider from './contexts/venmo/Permissions/PermissionsProvider';
import PlatformSettings from './contexts/common/PlatformSettings/PlatformSettingsProvider';
import OnRamperIntentsProvider from './contexts/venmo/OnRamperIntents/OnRamperIntentsProvider';
import LiquidityProvider from './contexts/common/Liquidity/LiquidityProvider';
import ProofGenSettingsProvider from "./contexts/common/ProofGenSettings/ProofGenSettingsProvider";
import GoogleAuthProvider from './contexts/common/GoogleAuth/GoogleAuthProvider';

import "./App.css";
import "./styles.css";
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Deposit/OffRamperIntentTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ThemedText } from '../../theme/text'
import { IntentRow, IntentRowData } from "./OffRamperIntentRow";
import { toUsdString, toUsdcString } from '@helpers/units'
import { SECONDS_IN_DAY } from '@helpers/constants'
import { DepositIntent } from "../../contexts/Deposits/types";
import { DepositIntent } from "../../contexts/venmo/Deposits/types";
import useDeposits from '@hooks/useDeposits';
import useLiquidity from '@hooks/useLiquidity';

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Deposit/PositionTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { Button } from '../Button';
import { RowBetween } from '../layouts/Row';
import { ThemedText } from '../../theme/text';
import { DepositWithAvailableLiquidity } from "../../contexts/Deposits/types";
import { DepositWithAvailableLiquidity } from "../../contexts/venmo/Deposits/types";
import { PositionRow } from "./PositionRow";
import { CustomConnectButton } from "../common/ConnectButton";
import { toUsdcString, conversionRateToString } from '@helpers/units';
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Liquidity/DepositsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styled, { css } from 'styled-components/macro'
import { RowBetween } from '../layouts/Row'
import { ThemedText } from '../../theme/text'
import { Button } from "../Button";
import { DepositWithAvailableLiquidity } from "../../contexts/Deposits/types";
import { DepositWithAvailableLiquidity } from "../../contexts/venmo/Deposits/types";
import { DepositsRow } from "./DepositsRow";
import { toUsdcString, conversionRateToString } from '@helpers/units'
import useLiquidity from '@hooks/useLiquidity';
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { AutoColumn } from '@components/layouts/Column';
import { Button } from '@components/Button';
import { CustomConnectButton } from "@components/common/ConnectButton";
import { ThemedText } from '../../theme/text';
import { IndicativeQuote } from '../../contexts/Deposits/types';
import { IndicativeQuote } from '../../contexts/venmo/Deposits/types';
import { InstructionDrawer } from '@components/Swap/InstructionDrawer';
import { SettingsDropdown } from './SettingsDropdown';
import {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/modals/PlatformSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Link from '@mui/material/Link';
import { ThemedText } from '../../theme/text'
import { Overlay } from '@components/modals/Overlay';
import { PlatformRow } from '@components/modals/PlatformRow';
import { paymentPlatforms, paymentPlatformInfo, PaymentPlatformType } from '../../contexts/PlatformSettings/types';
import { paymentPlatforms, paymentPlatformInfo, PaymentPlatformType } from '../../contexts/common/PlatformSettings/types';
import { useOnClickOutside } from '@hooks/useOnClickOutside';
import { ZKP2P_SURVEY_FORM_LINK } from "../../helpers/docUrls";
import usePlatformSettings from "@hooks/usePlatformSettings";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
DepositWithAvailableLiquidity,
IndicativeQuote,
StoredDeposit
} from '../Deposits/types'
} from '../../venmo/Deposits/types'

import {
calculateUsdFromRequestedUSDC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
DepositWithAvailableLiquidity,
IndicativeQuote,
StoredDeposit
} from '../Deposits/types'
} from '../../venmo/Deposits/types'
import {
calculateUsdFromRequestedUSDC,
createDepositsStore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
DepositWithAvailableLiquidity,
IndicativeQuote,
StoredDeposit
} from "../Deposits/types";
} from "../../venmo/Deposits/types";
import { PENNY_IN_USDC_UNITS, PRECISION } from "@helpers/constants";
import { toBigInt, toUsdString } from "@helpers/units";

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import americaFlagSvg from '../../assets/images/america-flag.svg';
import indiaFlagSvg from '../../assets/images/india-flag.svg';
import americaFlagSvg from '../../../assets/images/america-flag.svg';
import indiaFlagSvg from '../../../assets/images/india-flag.svg';


export const PaymentPlatform = {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion client/src/hooks/useAccount.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { AccountContext } from '../contexts/Account'
import { AccountContext } from '../contexts/common/Account'

const useAccount = () => {
return { ...useContext(AccountContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useBalance.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { BalancesContext } from '../contexts/Balances'
import { BalancesContext } from '../contexts/common/Balances'

const useBalances = () => {
return { ...useContext(BalancesContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useDeposits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { DepositsContext } from '../contexts/Deposits'
import { DepositsContext } from '../contexts/venmo/Deposits'

const useDeposits = () => {
return { ...useContext(DepositsContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useGoogleAuth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { GoogleAuthContext } from '../contexts/GoogleAuth'
import { GoogleAuthContext } from '../contexts/common/GoogleAuth'

const useGoogleAuth = () => {
return { ...useContext(GoogleAuthContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useLiquidity.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { LiquidityContext } from '../contexts/Liquidity'
import { LiquidityContext } from '../contexts/common/Liquidity'

const useLiquidity = () => {
return { ...useContext(LiquidityContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useOnRamperIntents.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { OnRamperIntentsContext } from '../contexts/OnRamperIntents'
import { OnRamperIntentsContext } from '../contexts/venmo/OnRamperIntents'

const useOnRamperIntents = () => {
return { ...useContext(OnRamperIntentsContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/usePermissions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { PermissionsContext } from '../contexts/Permissions'
import { PermissionsContext } from '../contexts/venmo/Permissions'

const usePermissions = () => {
return { ...useContext(PermissionsContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/usePlatformSettings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { PlatformSettingsContext } from '../contexts/PlatformSettings'
import { PlatformSettingsContext } from '../contexts/common/PlatformSettings'

const usePlatformSettings = () => {
return { ...useContext(PlatformSettingsContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useProofGenSettings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { ProofGenSettingsContext } from '../contexts/ProofGenSettings'
import { ProofGenSettingsContext } from '../contexts/common/ProofGenSettings'

const useProofGenSettings = () => {
return { ...useContext(ProofGenSettingsContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useRampState.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { RampContext } from '../contexts/Ramp'
import { RampContext } from '../contexts/venmo/Ramp'

const useRampState = () => {
return { ...useContext(RampContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useRegistration.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { RegistrationContext } from '../contexts/Registration'
import { RegistrationContext } from '../contexts/venmo/Registration'

const useRegistration = () => {
return { ...useContext(RegistrationContext) }
Expand Down
2 changes: 1 addition & 1 deletion client/src/hooks/useSmartContracts.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext } from 'react'

import { SmartContractsContext } from '../contexts/SmartContracts'
import { SmartContractsContext } from '../contexts/common/SmartContracts'

const useSmartContracts = () => {
return { ...useContext(SmartContractsContext) }
Expand Down

0 comments on commit e70b971

Please sign in to comment.