Skip to content

Commit

Permalink
refactor(pay): moving utils to lib
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhart1o1 committed May 7, 2024
1 parent 1b29b6e commit 5ef2e70
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion apps/consent/app/login/phone/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ const Login = async ({ searchParams }: { searchParams: LoginProps }) => {
const authAction = "Login"
return <PhoneAuth login_challenge={login_challenge} authAction={authAction} />
}

export default Login
2 changes: 1 addition & 1 deletion apps/pay/app/[username]/transaction/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useSession } from "next-auth/react"

import { useGetPaginatedTransactionsQuery, Transaction } from "@/lib/graphql/generated"
import LoadingComponent from "@/components/loading"
import { formatCreateAt, formatDate, formatTime } from "@/utils/date-util"
import { formatCreateAt, formatDate, formatTime } from "@/lib/utils/date-util"
import { sendDataToPosCompanion } from "@/app/print-companion-service"
import useCheckInstalledApps from "@/hooks/use-check-installed-apps"

Expand Down
2 changes: 1 addition & 1 deletion apps/pay/app/lnurlp/[username]/callback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
LnInvoiceCreateOnBehalfOfRecipientMutation,
} from "../../../../lib/graphql/generated"
import { client } from "../graphql"
import { getOriginalRequestInfo } from "../../../../utils/utils"
import { getOriginalRequestInfo } from "../../../../lib/utils"

gql`
mutation lnInvoiceCreateOnBehalfOfRecipient(
Expand Down
2 changes: 1 addition & 1 deletion apps/pay/app/lnurlp/[username]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
RealtimePriceInitialQuery,
} from "../../../lib/graphql/generated"

import { getOriginalRequestInfo } from "../../../utils/utils"
import { getOriginalRequestInfo } from "../../../lib/utils"

import { client } from "./graphql"

Expand Down
2 changes: 1 addition & 1 deletion apps/pay/components/parse-pos-payment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
getLocaleConfig,
extractSearchParams,
parseDisplayCurrency,
} from "../../utils/utils"
} from "../../lib/utils"

import { useDisplayCurrency } from "../../hooks/use-display-currency"

Expand Down
2 changes: 1 addition & 1 deletion apps/pay/components/parse-pos-payment/receive-invoice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { ACTION_TYPE } from "../../app/reducer"
import PaymentOutcome from "../payment-outcome"
import { Share } from "../share"

import { extractSearchParams, safeAmount } from "../../utils/utils"
import { extractSearchParams, safeAmount } from "../../lib/utils"

import LoadingComponent from "../loading"

Expand Down
2 changes: 1 addition & 1 deletion apps/pay/components/payment-outcome/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useLnInvoicePaymentStatusSubscription } from "../../lib/graphql/generat
import styles from "./payment-outcome.module.css"
import Receipt from "./receipt"

import { extractSearchParams } from "@/utils/utils"
import { extractSearchParams } from "@/lib/utils"
import { useInvoiceContext } from "@/context/invoice-context"
import useCheckInstalledApps from "@/hooks/use-check-installed-apps"

Expand Down
2 changes: 1 addition & 1 deletion apps/pay/components/payment-outcome/receipt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from "react"
import Image from "react-bootstrap/Image"

import { formattedDate, formattedTime } from "../../utils/date-util"
import { formattedDate, formattedTime } from "../../lib/utils/date-util"

import GaloyIcon from "./galoy-icon"
import styles from "./payment-outcome.module.css"
Expand Down
2 changes: 1 addition & 1 deletion apps/pay/hooks/use-display-currency.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { gql } from "@apollo/client"

import { useCallback, useMemo } from "react"

import { useCurrencyListQuery } from "./graphql/generated"
import { useCurrencyListQuery } from "@/lib/graphql/generated"

gql`
query currencyList {
Expand Down
2 changes: 1 addition & 1 deletion apps/pay/hooks/use-realtime-price.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ gql`
const useRealtimePrice = (
currency: string,
onSubscriptionDataCallback?: (
subscriptionData: SubscriptionResult<RealtimePriceWsSubscription, any>,
subscriptionData: SubscriptionResult<RealtimePriceWsSubscription, unknown>,
) => void,
) => {
const priceRef = React.useRef<number>(0)
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 5ef2e70

Please sign in to comment.