diff --git a/app/components/set-default-account-modal/set-default-account-modal.tsx b/app/components/set-default-account-modal/set-default-account-modal.tsx index ca3acfc31..bda4f3e36 100644 --- a/app/components/set-default-account-modal/set-default-account-modal.tsx +++ b/app/components/set-default-account-modal/set-default-account-modal.tsx @@ -10,7 +10,10 @@ import { useBreez } from "@app/hooks" import { useApolloClient } from "@apollo/client" import { useI18nContext } from "@app/i18n/i18n-react" import { useNavigation } from "@react-navigation/native" -import { useSetDefaultAccountModalQuery } from "@app/graphql/generated" +import { + useAccountUpdateDefaultWalletIdMutation, + useSetDefaultAccountModalQuery, +} from "@app/graphql/generated" import { usePersistentStateContext } from "@app/store/persistent-state" // utils @@ -34,17 +37,23 @@ export const SetDefaultAccountModal = ({ isVisible, toggleModal }: Props) => { const { LL } = useI18nContext() const { btcWallet } = useBreez() const { updateState } = usePersistentStateContext() + const [updateDefaultWalletId] = useAccountUpdateDefaultWalletIdMutation() const { data } = useSetDefaultAccountModalQuery({ fetchPolicy: "cache-only", }) const usdWallet = getUsdWallet(data?.me?.defaultAccount?.wallets) - const onPressHandler = (currency: string) => { + const onPressHandler = async (currency: string) => { let defaultWallet = usdWallet if (currency === "BTC") { defaultWallet = btcWallet } + if (defaultWallet?.id) { + await updateDefaultWalletId({ + variables: { input: { walletId: defaultWallet.id } }, + }) + } updateState((state: any) => { if (state) return { diff --git a/app/contexts/BreezContext.tsx b/app/contexts/BreezContext.tsx index a7b2e34e6..2e4dd6a0c 100644 --- a/app/contexts/BreezContext.tsx +++ b/app/contexts/BreezContext.tsx @@ -1,30 +1,47 @@ import React, { createContext, useEffect, useRef, useState } from "react" -import { WalletCurrency } from "@app/graphql/generated" +import { useUpdateExternalWalletMutation, WalletCurrency } from "@app/graphql/generated" import { usePersistentStateContext } from "@app/store/persistent-state" import { Alert, Platform } from "react-native" import { v4 as uuidv4 } from "uuid" -import { initializeBreezSDK, getInfo, handleSparkMigration } from "@app/utils/breez-sdk" +import { + initializeBreezSDK, + getInfo, + handleSparkMigration, + registerLightningAddress, + getLightningAddress, +} from "@app/utils/breez-sdk" +import { useAppConfig } from "@app/hooks/use-app-config" +import { useAddressScreenQuery } from "@app/graphql/generated" +import { useIsAuthed } from "@app/graphql/is-authed-context" import SparkMigrationModal from "@app/components/spark-migration-modal" type BtcWallet = { id: string walletCurrency: WalletCurrency balance: number + isExternal: boolean } interface BreezInterface { refreshBreez: () => void + retryExternalWalletRegistration: () => Promise loading: boolean + externalWalletLoading: boolean + externalWalletError?: string btcWallet: BtcWallet } export const BreezContext = createContext({ refreshBreez: () => {}, + retryExternalWalletRegistration: async () => {}, loading: false, + externalWalletLoading: false, + externalWalletError: undefined, btcWallet: { id: "", walletCurrency: "BTC", balance: 0, + isExternal: true, }, }) @@ -34,17 +51,30 @@ type Props = { export const BreezProvider = ({ children }: Props) => { const { persistentState, updateState } = usePersistentStateContext() + const { appConfig } = useAppConfig() + const isAuthed = useIsAuthed() + const { data: meData } = useAddressScreenQuery({ + fetchPolicy: "cache-first", + skip: !isAuthed, + }) + const [updateExternalWallet] = useUpdateExternalWalletMutation() + const [loading, setLoading] = useState(false) const [btcWallet, setBtcWallet] = useState({ id: "", walletCurrency: "BTC", balance: persistentState.breezBalance || 0, + isExternal: true, }) const initializingRef = useRef(false) const updatingBalanceRef = useRef(false) + const registeringExternalWalletRef = useRef(false) const [migrating, setMigrating] = useState(false) const [migrationModal, setMigrationModal] = useState(false) const [migrationErr, setMigrationErr] = useState() + const [externalWalletLoading, setExternalWalletLoading] = useState(false) + const [externalWalletError, setExternalWalletError] = useState() + const [breezReady, setBreezReady] = useState(false) const onMigrate = async () => { setMigrating(true) @@ -85,7 +115,9 @@ export const BreezProvider = ({ children }: Props) => { id: "", walletCurrency: "BTC", balance: 0, + isExternal: true, }) + setExternalWalletError(undefined) } } }, [persistentState.isAdvanceMode]) @@ -94,17 +126,16 @@ export const BreezProvider = ({ children }: Props) => { if (updatingBalanceRef.current) return updatingBalanceRef.current = true try { - const balanceSats = await getInfo() - setBtcWallet({ - id: uuidv4(), - walletCurrency: WalletCurrency.Btc, - balance: balanceSats, - }) + const walletInfo = await getInfo() + setBtcWallet((prev) => ({ + ...prev, + balance: Number(walletInfo.balanceSats), + })) updateState((state: any) => { if (state) return { ...state, - breezBalance: balanceSats, + breezBalance: Number(walletInfo.balanceSats), } return undefined }) @@ -113,15 +144,98 @@ export const BreezProvider = ({ children }: Props) => { } } + const updateExternalWalletLnurlp = async (lnurlp: string) => { + const externalWalletRes = await updateExternalWallet({ + variables: { input: { lnurlp } }, + }) + console.log("Update External Wallet Response: ", externalWalletRes) + const errors = externalWalletRes.data?.updateExternalWallet.errors + if (errors?.length) { + throw new Error(errors.map((error) => error.message).join(", ")) + } + + const walletId = externalWalletRes.data?.updateExternalWallet.walletId + if (walletId) { + setBtcWallet((prev) => ({ + ...prev, + id: walletId, + })) + } + + return walletId + } + + const ensureLightningAddress = async () => { + const username = meData?.me?.username + if (registeringExternalWalletRef.current || btcWallet.id) return + if (!username) return + + registeringExternalWalletRef.current = true + setExternalWalletLoading(true) + setExternalWalletError(undefined) + + try { + const existing = await getLightningAddress() + console.log("BREEZ LIGHTNING ADDRESS: ", existing) + + if (existing) { + const walletId = await updateExternalWalletLnurlp(existing.lnurl.bech32) + if (!walletId) { + throw new Error("External wallet registration returned no wallet id") + } + return + } + + // Register with username as the Lightning address + const lightningAddress = username + uuidv4() + const res = await registerLightningAddress( + lightningAddress, + `Pay to ${username}@${appConfig.galoyInstance.lnAddressHostname}`, + ) + console.log("BREEZ LIGHTNING ADDRESS RES: ", res) + + if (res) { + const walletId = await updateExternalWalletLnurlp(res.lnurl.bech32) + if (!walletId) { + throw new Error("External wallet registration returned no wallet id") + } + return + } + + throw new Error("Breez lightning address registration returned no address") + } catch (err) { + const message = err instanceof Error ? err.message : String(err) + setExternalWalletError(message) + console.warn("Failed to register Lightning address:", message) + } finally { + setExternalWalletLoading(false) + registeringExternalWalletRef.current = false + } + } + + useEffect(() => { + if (Platform.OS === "ios" && Number(Platform.Version) < 13) return + if (!persistentState.isAdvanceMode) return + if (!breezReady) return + if (!meData?.me?.username) return + if (btcWallet.id) return + + ensureLightningAddress() + }, [persistentState.isAdvanceMode, breezReady, meData?.me?.username, btcWallet.id]) + const getBreezInfo = async () => { if (initializingRef.current) return initializingRef.current = true try { setLoading(true) await initializeBreezSDK() + setBreezReady(true) await updateBalance() setLoading(false) + // Register Lightning address + await ensureLightningAddress() + // Trigger migration after Spark SDK is ready if (!persistentState.sparkMigrationCompleted) { await onMigrate() @@ -141,7 +255,16 @@ export const BreezProvider = ({ children }: Props) => { } return ( - + {children} ; readonly id: Scalars['ID']['output']; + readonly isExternal: Scalars['Boolean']['output']; readonly lnurlp?: Maybe; /** An unconfirmed incoming onchain balance. */ readonly pendingIncomingBalance: Scalars['SignedAmount']['output']; @@ -299,15 +302,20 @@ export type Bank = { export type BankAccount = { readonly __typename: 'BankAccount'; - readonly accountNumber: Scalars['Int']['output']; + readonly accountName?: Maybe; + readonly accountNumber: Scalars['String']['output']; readonly accountType: Scalars['String']['output']; readonly bankBranch: Scalars['String']['output']; readonly bankName: Scalars['String']['output']; + /** Account currency (e.g. JMD, USD) */ readonly currency: Scalars['String']['output']; + /** ERPNext bank account identifier */ + readonly id?: Maybe; + readonly isDefault: Scalars['Boolean']['output']; }; export type BankAccountInput = { - readonly accountNumber: Scalars['Int']['input']; + readonly accountNumber: Scalars['AccountNumber']['input']; readonly accountType: Scalars['String']['input']; readonly bankBranch: Scalars['String']['input']; readonly bankName: Scalars['String']['input']; @@ -375,17 +383,17 @@ export type CaptchaRequestAuthCodeInput = { export type CashoutOffer = { readonly __typename: 'CashoutOffer'; /** The rate used when withdrawing to a JMD bank account */ - readonly exchangeRate: Scalars['JMDCents']['output']; + readonly exchangeRate?: Maybe; /** The time at which this offer is no longer accepted by Flash */ readonly expiresAt: Scalars['Timestamp']['output']; - /** The amount that Flash is charging for it's services */ + /** The amount that Flash is charging for its services */ readonly flashFee: Scalars['USDCents']['output']; /** ID of the offer */ readonly offerId: Scalars['ID']['output']; - /** The amount Flash owes to the user denominated in JMD as cents */ - readonly receiveJmd: Scalars['JMDCents']['output']; - /** The amount Flash owes to the user denominated in USD as cents */ - readonly receiveUsd: Scalars['USDCents']['output']; + /** The amount Flash owes to the user denominated in JMD cents (null for USD payouts) */ + readonly receiveJmd?: Maybe; + /** The amount Flash owes to the user denominated in USD cents (null for JMD payouts) */ + readonly receiveUsd?: Maybe; /** The amount the user is sending to flash */ readonly send: Scalars['USDCents']['output']; /** ID for the users USD wallet to send from */ @@ -552,7 +560,7 @@ export type InitiateCashoutInput = { export type InitiatedCashoutResponse = { readonly __typename: 'InitiatedCashoutResponse'; readonly errors: ReadonlyArray; - readonly journalId?: Maybe; + readonly id?: Maybe; }; export type InitiationVia = InitiationViaIntraLedger | InitiationViaLn | InitiationViaOnChain; @@ -935,6 +943,7 @@ export type Mutation = { * The user can review this offer and then execute the withdrawal by calling the initiateCashout mutation. */ readonly requestCashout: RequestCashoutResponse; + readonly updateExternalWallet: UpdateExternalWalletPayload; /** @deprecated will be moved to AccountContact */ readonly userContactUpdateAlias: UserContactUpdateAliasPayload; readonly userEmailDelete: UserEmailDeletePayload; @@ -1148,6 +1157,11 @@ export type MutationRequestCashoutArgs = { }; +export type MutationUpdateExternalWalletArgs = { + input: UpdateExternalWalletInput; +}; + + export type MutationUserContactUpdateAliasArgs = { input: UserContactUpdateAliasInput; }; @@ -1608,6 +1622,8 @@ export type RealtimePricePayload = { export type RequestCashoutInput = { /** Amount in USD cents. */ readonly amount: Scalars['USDCents']['input']; + /** ERPNext bank account identifier to receive the cashout. */ + readonly bankAccountId: Scalars['ID']['input']; /** ID for a USD wallet belonging to the current user. */ readonly walletId: Scalars['WalletId']['input']; }; @@ -1806,6 +1822,16 @@ export const TxStatus = { } as const; export type TxStatus = typeof TxStatus[keyof typeof TxStatus]; +export type UpdateExternalWalletInput = { + readonly lnurlp: Scalars['Lnurl']['input']; +}; + +export type UpdateExternalWalletPayload = { + readonly __typename: 'UpdateExternalWalletPayload'; + readonly errors: ReadonlyArray; + readonly walletId?: Maybe; +}; + export type UpgradePayload = { readonly __typename: 'UpgradePayload'; readonly authToken?: Maybe; @@ -1817,8 +1843,9 @@ export type UpgradePayload = { export type UsdWallet = Wallet & { readonly __typename: 'UsdWallet'; readonly accountId: Scalars['ID']['output']; - readonly balance: Scalars['FractionalCentAmount']['output']; + readonly balance?: Maybe; readonly id: Scalars['ID']['output']; + readonly isExternal: Scalars['Boolean']['output']; readonly lnurlp?: Maybe; /** An unconfirmed incoming onchain balance. */ readonly pendingIncomingBalance: Scalars['SignedAmount']['output']; @@ -1848,6 +1875,8 @@ export type UsdWalletTransactionsByAddressArgs = { export type User = { readonly __typename: 'User'; + /** Bank accounts available for cashout */ + readonly bankAccounts: ReadonlyArray; /** * Get single contact details. * Can include the transactions associated with the contact. @@ -2075,8 +2104,9 @@ export type UserUpdateUsernamePayload = { /** A generic wallet which stores value in one of our supported currencies. */ export type Wallet = { readonly accountId: Scalars['ID']['output']; - readonly balance: Scalars['FractionalCentAmount']['output']; + readonly balance?: Maybe; readonly id: Scalars['ID']['output']; + readonly isExternal: Scalars['Boolean']['output']; readonly lnurlp?: Maybe; readonly pendingIncomingBalance: Scalars['SignedAmount']['output']; /** @@ -2154,7 +2184,7 @@ export type AnalyticsQueryVariables = Exact<{ [key: string]: never; }>; export type AnalyticsQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly username?: string | null, readonly id: string } | null, readonly globals?: { readonly __typename: 'Globals', readonly network: Network } | null }; -export type MyWalletsFragment = { readonly __typename: 'ConsumerAccount', readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> }; +export type MyWalletsFragment = { readonly __typename: 'ConsumerAccount', readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> }; export type RealtimePriceQueryVariables = Exact<{ [key: string]: never; }>; @@ -2305,6 +2335,13 @@ export type IdDocumentUploadUrlGenerateMutationVariables = Exact<{ export type IdDocumentUploadUrlGenerateMutation = { readonly __typename: 'Mutation', readonly idDocumentUploadUrlGenerate: { readonly __typename: 'IdDocumentUploadUrlPayload', readonly fileKey?: string | null, readonly uploadUrl?: string | null, readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly code?: string | null, readonly message: string }> } }; +export type UpdateExternalWalletMutationVariables = Exact<{ + input: UpdateExternalWalletInput; +}>; + + +export type UpdateExternalWalletMutation = { readonly __typename: 'Mutation', readonly updateExternalWallet: { readonly __typename: 'UpdateExternalWalletPayload', readonly walletId?: string | null, readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly code?: string | null, readonly message: string }> } }; + export type AuthQueryVariables = Exact<{ [key: string]: never; }>; @@ -2313,7 +2350,7 @@ export type AuthQuery = { readonly __typename: 'Query', readonly me?: { readonly export type HomeAuthedQueryVariables = Exact<{ [key: string]: never; }>; -export type HomeAuthedQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly language: string, readonly username?: string | null, readonly phone?: string | null, readonly npub?: string | null, readonly email?: { readonly __typename: 'Email', readonly address?: string | null, readonly verified?: boolean | null } | null, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly level: AccountLevel, readonly defaultWalletId: string, readonly transactions?: { readonly __typename: 'TransactionConnection', readonly pageInfo: { readonly __typename: 'PageInfo', readonly hasNextPage: boolean, readonly hasPreviousPage: boolean, readonly startCursor?: string | null, readonly endCursor?: string | null }, readonly edges?: ReadonlyArray<{ readonly __typename: 'TransactionEdge', readonly cursor: string, readonly node: { readonly __typename: 'Transaction', readonly id: string, readonly status: TxStatus, readonly direction: TxDirection, readonly memo?: string | null, readonly createdAt: number, readonly settlementAmount: number, readonly settlementFee: number, readonly settlementDisplayFee: string, readonly settlementCurrency: WalletCurrency, readonly settlementDisplayAmount: string, readonly settlementDisplayCurrency: string, readonly settlementPrice: { readonly __typename: 'PriceOfOneSettlementMinorUnitInDisplayMinorUnit', readonly base: number, readonly offset: number, readonly currencyUnit: string, readonly formattedAmount: string }, readonly initiationVia: { readonly __typename: 'InitiationViaIntraLedger', readonly counterPartyWalletId?: string | null, readonly counterPartyUsername?: string | null } | { readonly __typename: 'InitiationViaLn', readonly paymentHash: string } | { readonly __typename: 'InitiationViaOnChain', readonly address: string }, readonly settlementVia: { readonly __typename: 'SettlementViaIntraLedger', readonly counterPartyWalletId?: string | null, readonly counterPartyUsername?: string | null } | { readonly __typename: 'SettlementViaLn', readonly paymentSecret?: string | null } | { readonly __typename: 'SettlementViaOnChain', readonly transactionHash?: string | null } } }> | null } | null, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type HomeAuthedQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly language: string, readonly username?: string | null, readonly phone?: string | null, readonly npub?: string | null, readonly email?: { readonly __typename: 'Email', readonly address?: string | null, readonly verified?: boolean | null } | null, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly level: AccountLevel, readonly defaultWalletId: string, readonly transactions?: { readonly __typename: 'TransactionConnection', readonly pageInfo: { readonly __typename: 'PageInfo', readonly hasNextPage: boolean, readonly hasPreviousPage: boolean, readonly startCursor?: string | null, readonly endCursor?: string | null }, readonly edges?: ReadonlyArray<{ readonly __typename: 'TransactionEdge', readonly cursor: string, readonly node: { readonly __typename: 'Transaction', readonly id: string, readonly status: TxStatus, readonly direction: TxDirection, readonly memo?: string | null, readonly createdAt: number, readonly settlementAmount: number, readonly settlementFee: number, readonly settlementDisplayFee: string, readonly settlementCurrency: WalletCurrency, readonly settlementDisplayAmount: string, readonly settlementDisplayCurrency: string, readonly settlementPrice: { readonly __typename: 'PriceOfOneSettlementMinorUnitInDisplayMinorUnit', readonly base: number, readonly offset: number, readonly currencyUnit: string, readonly formattedAmount: string }, readonly initiationVia: { readonly __typename: 'InitiationViaIntraLedger', readonly counterPartyWalletId?: string | null, readonly counterPartyUsername?: string | null } | { readonly __typename: 'InitiationViaLn', readonly paymentHash: string } | { readonly __typename: 'InitiationViaOnChain', readonly address: string }, readonly settlementVia: { readonly __typename: 'SettlementViaIntraLedger', readonly counterPartyWalletId?: string | null, readonly counterPartyUsername?: string | null } | { readonly __typename: 'SettlementViaLn', readonly paymentSecret?: string | null } | { readonly __typename: 'SettlementViaOnChain', readonly transactionHash?: string | null } } }> | null } | null, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type HomeUnauthedQueryVariables = Exact<{ [key: string]: never; }>; @@ -2333,17 +2370,17 @@ export type TransactionListForDefaultAccountQuery = { readonly __typename: 'Quer export type SetDefaultAccountModalQueryVariables = Exact<{ [key: string]: never; }>; -export type SetDefaultAccountModalQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type SetDefaultAccountModalQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type ConversionScreenQueryVariables = Exact<{ [key: string]: never; }>; -export type ConversionScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type ConversionScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type CashoutScreenQueryVariables = Exact<{ [key: string]: never; }>; -export type CashoutScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type CashoutScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type WalletCsvTransactionsQueryVariables = Exact<{ walletIds: ReadonlyArray | Scalars['WalletId']['input']; @@ -2355,24 +2392,24 @@ export type WalletCsvTransactionsQuery = { readonly __typename: 'Query', readonl export type WalletOverviewScreenQueryVariables = Exact<{ [key: string]: never; }>; -export type WalletOverviewScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type WalletOverviewScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type SendBitcoinDestinationQueryVariables = Exact<{ [key: string]: never; }>; -export type SendBitcoinDestinationQuery = { readonly __typename: 'Query', readonly globals?: { readonly __typename: 'Globals', readonly network: Network } | null, readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string } | { readonly __typename: 'UsdWallet', readonly id: string }> }, readonly contacts: ReadonlyArray<{ readonly __typename: 'UserContact', readonly id: string, readonly username: string }> } | null }; +export type SendBitcoinDestinationQuery = { readonly __typename: 'Query', readonly globals?: { readonly __typename: 'Globals', readonly network: Network } | null, readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly isExternal: boolean }> }, readonly contacts: ReadonlyArray<{ readonly __typename: 'UserContact', readonly id: string, readonly username: string }> } | null }; export type AccountDefaultWalletQueryVariables = Exact<{ username: Scalars['Username']['input']; }>; -export type AccountDefaultWalletQuery = { readonly __typename: 'Query', readonly accountDefaultWallet: { readonly __typename: 'PublicWallet', readonly id: string } }; +export type AccountDefaultWalletQuery = { readonly __typename: 'Query', readonly accountDefaultWallet: { readonly __typename: 'PublicWallet', readonly id: string, readonly walletCurrency: WalletCurrency } }; export type SendBitcoinDetailsScreenQueryVariables = Exact<{ [key: string]: never; }>; -export type SendBitcoinDetailsScreenQuery = { readonly __typename: 'Query', readonly globals?: { readonly __typename: 'Globals', readonly network: Network } | null, readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly walletCurrency: WalletCurrency, readonly balance: number } | { readonly __typename: 'UsdWallet', readonly id: string, readonly walletCurrency: WalletCurrency, readonly balance: number }> } } | null }; +export type SendBitcoinDetailsScreenQuery = { readonly __typename: 'Query', readonly globals?: { readonly __typename: 'Globals', readonly network: Network } | null, readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly walletCurrency: WalletCurrency, readonly balance?: number | null, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly walletCurrency: WalletCurrency, readonly balance?: number | null, readonly isExternal: boolean }> } } | null }; export type SendBitcoinWithdrawalLimitsQueryVariables = Exact<{ [key: string]: never; }>; @@ -2387,12 +2424,12 @@ export type SendBitcoinInternalLimitsQuery = { readonly __typename: 'Query', rea export type SendBitcoinConfirmationScreenQueryVariables = Exact<{ [key: string]: never; }>; -export type SendBitcoinConfirmationScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type SendBitcoinConfirmationScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type ScanningQrCodeScreenQueryVariables = Exact<{ [key: string]: never; }>; -export type ScanningQrCodeScreenQuery = { readonly __typename: 'Query', readonly globals?: { readonly __typename: 'Globals', readonly network: Network } | null, readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string } | { readonly __typename: 'UsdWallet', readonly id: string }> }, readonly contacts: ReadonlyArray<{ readonly __typename: 'UserContact', readonly id: string, readonly username: string }> } | null }; +export type ScanningQrCodeScreenQuery = { readonly __typename: 'Query', readonly globals?: { readonly __typename: 'Globals', readonly network: Network } | null, readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly isExternal: boolean }> }, readonly contacts: ReadonlyArray<{ readonly __typename: 'UserContact', readonly id: string, readonly username: string }> } | null }; export type RealtimePriceUnauthedQueryVariables = Exact<{ currency: Scalars['DisplayCurrency']['input']; @@ -2411,7 +2448,7 @@ export type NpubByUsernameQuery = { readonly __typename: 'Query', readonly npubB export type LatestAccountUpgradeRequestQueryVariables = Exact<{ [key: string]: never; }>; -export type LatestAccountUpgradeRequestQuery = { readonly __typename: 'Query', readonly latestAccountUpgradeRequest: { readonly __typename: 'AccountUpgradeRequestPayload', readonly errors?: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly code?: string | null, readonly message: string } | null> | null, readonly upgradeRequest?: { readonly __typename: 'AccountUpgradeRequest', readonly currentLevel: AccountLevel, readonly fullName: string, readonly terminalsRequested: number, readonly status: string, readonly requestedLevel: AccountLevel, readonly phoneNumber: string, readonly email?: string | null, readonly idDocument: boolean, readonly address: { readonly __typename: 'Address', readonly city: string, readonly country: string, readonly line1: string, readonly line2?: string | null, readonly postalCode?: string | null, readonly state: string, readonly title: string }, readonly bankAccount?: { readonly __typename: 'BankAccount', readonly accountNumber: number, readonly accountType: string, readonly bankBranch: string, readonly bankName: string, readonly currency: string } | null } | null } }; +export type LatestAccountUpgradeRequestQuery = { readonly __typename: 'Query', readonly latestAccountUpgradeRequest: { readonly __typename: 'AccountUpgradeRequestPayload', readonly errors?: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly code?: string | null, readonly message: string } | null> | null, readonly upgradeRequest?: { readonly __typename: 'AccountUpgradeRequest', readonly currentLevel: AccountLevel, readonly fullName: string, readonly terminalsRequested: number, readonly status: string, readonly requestedLevel: AccountLevel, readonly phoneNumber: string, readonly email?: string | null, readonly idDocument: boolean, readonly address: { readonly __typename: 'Address', readonly city: string, readonly country: string, readonly line1: string, readonly line2?: string | null, readonly postalCode?: string | null, readonly state: string, readonly title: string }, readonly bankAccount?: { readonly __typename: 'BankAccount', readonly accountNumber: string, readonly accountType: string, readonly bankBranch: string, readonly bankName: string, readonly currency: string } | null } | null } }; export type SupportedBanksQueryVariables = Exact<{ [key: string]: never; }>; @@ -2624,7 +2661,7 @@ export type MyLnUpdatesSubscription = { readonly __typename: 'Subscription', rea export type PaymentRequestQueryVariables = Exact<{ [key: string]: never; }>; -export type PaymentRequestQuery = { readonly __typename: 'Query', readonly globals?: { readonly __typename: 'Globals', readonly network: Network, readonly feesInformation: { readonly __typename: 'FeesInformation', readonly deposit: { readonly __typename: 'DepositFeesInformation', readonly minBankFee: string, readonly minBankFeeThreshold: string } } } | null, readonly me?: { readonly __typename: 'User', readonly id: string, readonly username?: string | null, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type PaymentRequestQuery = { readonly __typename: 'Query', readonly globals?: { readonly __typename: 'Globals', readonly network: Network, readonly feesInformation: { readonly __typename: 'FeesInformation', readonly deposit: { readonly __typename: 'DepositFeesInformation', readonly minBankFee: string, readonly minBankFeeThreshold: string } } } | null, readonly me?: { readonly __typename: 'User', readonly id: string, readonly username?: string | null, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type LnNoAmountInvoiceCreateMutationVariables = Exact<{ input: LnNoAmountInvoiceCreateInput; @@ -2664,7 +2701,7 @@ export type FeedbackSubmitMutation = { readonly __typename: 'Mutation', readonly export type AccountScreenQueryVariables = Exact<{ [key: string]: never; }>; -export type AccountScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly phone?: string | null, readonly totpEnabled: boolean, readonly email?: { readonly __typename: 'Email', readonly address?: string | null, readonly verified?: boolean | null } | null, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly level: AccountLevel, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type AccountScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly phone?: string | null, readonly totpEnabled: boolean, readonly email?: { readonly __typename: 'Email', readonly address?: string | null, readonly verified?: boolean | null } | null, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly level: AccountLevel, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type UserEmailDeleteMutationVariables = Exact<{ [key: string]: never; }>; @@ -2686,7 +2723,7 @@ export type UserTotpDeleteMutation = { readonly __typename: 'Mutation', readonly export type WarningSecureAccountQueryVariables = Exact<{ [key: string]: never; }>; -export type WarningSecureAccountQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly level: AccountLevel, readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type WarningSecureAccountQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly level: AccountLevel, readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type AccountUpdateDefaultWalletIdMutationVariables = Exact<{ input: AccountUpdateDefaultWalletIdInput; @@ -2698,7 +2735,7 @@ export type AccountUpdateDefaultWalletIdMutation = { readonly __typename: 'Mutat export type SetDefaultWalletScreenQueryVariables = Exact<{ [key: string]: never; }>; -export type SetDefaultWalletScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> } } | null }; +export type SetDefaultWalletScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> } } | null }; export type AccountUpdateDisplayCurrencyMutationVariables = Exact<{ input: AccountUpdateDisplayCurrencyInput; @@ -2755,7 +2792,7 @@ export type AccountDisableNotificationCategoryMutation = { readonly __typename: export type SettingsScreenQueryVariables = Exact<{ [key: string]: never; }>; -export type SettingsScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly phone?: string | null, readonly username?: string | null, readonly language: string, readonly totpEnabled: boolean, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance: number, readonly walletCurrency: WalletCurrency }> }, readonly email?: { readonly __typename: 'Email', readonly address?: string | null, readonly verified?: boolean | null } | null } | null }; +export type SettingsScreenQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly phone?: string | null, readonly username?: string | null, readonly language: string, readonly totpEnabled: boolean, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly defaultWalletId: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly id: string, readonly balance?: number | null, readonly walletCurrency: WalletCurrency, readonly isExternal: boolean }> }, readonly email?: { readonly __typename: 'Email', readonly address?: string | null, readonly verified?: boolean | null } | null } | null }; export type ExportCsvSettingQueryVariables = Exact<{ walletIds: ReadonlyArray | Scalars['WalletId']['input']; @@ -2805,7 +2842,7 @@ export type DeviceNotificationTokenCreateMutation = { readonly __typename: 'Muta export type WalletsQueryVariables = Exact<{ [key: string]: never; }>; -export type WalletsQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly walletCurrency: WalletCurrency, readonly id: string, readonly lnurlp?: string | null } | { readonly __typename: 'UsdWallet', readonly walletCurrency: WalletCurrency, readonly id: string, readonly lnurlp?: string | null }> } } | null }; +export type WalletsQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly id: string, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly walletCurrency: WalletCurrency, readonly id: string, readonly lnurlp?: string | null, readonly isExternal: boolean } | { readonly __typename: 'UsdWallet', readonly walletCurrency: WalletCurrency, readonly id: string, readonly lnurlp?: string | null, readonly isExternal: boolean }> } } | null }; export const MyWalletsFragmentDoc = gql` fragment MyWallets on ConsumerAccount { @@ -2813,6 +2850,7 @@ export const MyWalletsFragmentDoc = gql` id balance walletCurrency + isExternal } } `; @@ -3905,6 +3943,43 @@ export function useIdDocumentUploadUrlGenerateMutation(baseOptions?: Apollo.Muta export type IdDocumentUploadUrlGenerateMutationHookResult = ReturnType; export type IdDocumentUploadUrlGenerateMutationResult = Apollo.MutationResult; export type IdDocumentUploadUrlGenerateMutationOptions = Apollo.BaseMutationOptions; +export const UpdateExternalWalletDocument = gql` + mutation UpdateExternalWallet($input: UpdateExternalWalletInput!) { + updateExternalWallet(input: $input) { + errors { + code + message + } + walletId + } +} + `; +export type UpdateExternalWalletMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateExternalWalletMutation__ + * + * To run a mutation, you first call `useUpdateExternalWalletMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateExternalWalletMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateExternalWalletMutation, { data, loading, error }] = useUpdateExternalWalletMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateExternalWalletMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateExternalWalletDocument, options); + } +export type UpdateExternalWalletMutationHookResult = ReturnType; +export type UpdateExternalWalletMutationResult = Apollo.MutationResult; +export type UpdateExternalWalletMutationOptions = Apollo.BaseMutationOptions; export const AuthDocument = gql` query auth { me { @@ -3969,6 +4044,7 @@ export const HomeAuthedDocument = gql` id balance walletCurrency + isExternal } } } @@ -4097,6 +4173,7 @@ export const SetDefaultAccountModalDocument = gql` id balance walletCurrency + isExternal } } } @@ -4139,6 +4216,7 @@ export const ConversionScreenDocument = gql` id balance walletCurrency + isExternal } } } @@ -4181,6 +4259,7 @@ export const CashoutScreenDocument = gql` id balance walletCurrency + isExternal } } } @@ -4262,6 +4341,7 @@ export const WalletOverviewScreenDocument = gql` id balance walletCurrency + isExternal } } } @@ -4305,6 +4385,7 @@ export const SendBitcoinDestinationDocument = gql` id wallets { id + isExternal } } contacts { @@ -4345,6 +4426,7 @@ export const AccountDefaultWalletDocument = gql` query accountDefaultWallet($username: Username!) { accountDefaultWallet(username: $username) { id + walletCurrency } } `; @@ -4390,6 +4472,7 @@ export const SendBitcoinDetailsScreenDocument = gql` id walletCurrency balance + isExternal } } } @@ -4520,6 +4603,7 @@ export const SendBitcoinConfirmationScreenDocument = gql` id balance walletCurrency + isExternal } } } @@ -4563,6 +4647,7 @@ export const ScanningQrCodeScreenDocument = gql` id wallets { id + isExternal } } contacts { @@ -6013,6 +6098,7 @@ export const PaymentRequestDocument = gql` id balance walletCurrency + isExternal } defaultWalletId } @@ -6259,6 +6345,7 @@ export const AccountScreenDocument = gql` id balance walletCurrency + isExternal } } } @@ -6432,6 +6519,7 @@ export const WarningSecureAccountDocument = gql` id balance walletCurrency + isExternal } } } @@ -6514,6 +6602,7 @@ export const SetDefaultWalletScreenDocument = gql` id balance walletCurrency + isExternal } } } @@ -6892,6 +6981,7 @@ export const SettingsScreenDocument = gql` id balance walletCurrency + isExternal } } totpEnabled @@ -7226,6 +7316,7 @@ export const WalletsDocument = gql` walletCurrency id lnurlp + isExternal } } } diff --git a/app/graphql/wallets-utils.ts b/app/graphql/wallets-utils.ts index e8e00299f..6dff22a5c 100644 --- a/app/graphql/wallets-utils.ts +++ b/app/graphql/wallets-utils.ts @@ -1,6 +1,6 @@ import { Wallet, WalletCurrency } from "@app/graphql/generated" -type WalletBalance = Pick +type WalletBalance = Pick export const getBtcWallet = (wallets: readonly WalletBalance[] | undefined) => { if (wallets === undefined || wallets.length === 0) { @@ -28,3 +28,11 @@ export const getDefaultWallet = ( return wallets.find((wallet) => wallet.id === defaultWalletId) } + +export const getInternalWallets = (wallets: readonly WalletBalance[] | undefined) => { + if (wallets === undefined || wallets.length === 0) { + return undefined + } + + return wallets.filter((wallet) => !wallet.isExternal) +} diff --git a/app/hooks/useBreez.ts b/app/hooks/useBreez.ts index f53720154..6e9843699 100644 --- a/app/hooks/useBreez.ts +++ b/app/hooks/useBreez.ts @@ -6,12 +6,16 @@ type BtcWallet = { id: string walletCurrency: WalletCurrency balance: number + isExternal: boolean } interface ContextProps { btcWallet: BtcWallet loading: boolean + externalWalletLoading: boolean + externalWalletError?: string refreshBreez: () => void + retryExternalWalletRegistration: () => Promise } export const useBreez = () => { diff --git a/app/screens/import-wallet-screen/ImportWallet.tsx b/app/screens/import-wallet-screen/ImportWallet.tsx index bad93e14c..1ae8e7d32 100644 --- a/app/screens/import-wallet-screen/ImportWallet.tsx +++ b/app/screens/import-wallet-screen/ImportWallet.tsx @@ -16,6 +16,7 @@ import { useI18nContext } from "@app/i18n/i18n-react" import { useCreateAccount } from "@app/hooks/useCreateAccount" import { Text, useTheme, useThemeMode } from "@rneui/themed" import { usePersistentStateContext } from "@app/store/persistent-state" +import { useAppConfig } from "@app/hooks/use-app-config" // utils import { disconnectToSDK, initializeBreezSDK } from "@app/utils/breez-sdk" @@ -31,6 +32,7 @@ const ImportWallet: React.FC = ({ navigation, route }) => { const { mode } = useThemeMode() const { LL } = useI18nContext() const { updateState } = usePersistentStateContext() + const { appConfig } = useAppConfig() const { createDeviceAccountAndLogin } = useCreateAccount() const inputRef = useRef([]) diff --git a/app/screens/receive-bitcoin-screen/use-receive-bitcoin.ts b/app/screens/receive-bitcoin-screen/use-receive-bitcoin.ts index fc7a29bee..356c4f4fc 100644 --- a/app/screens/receive-bitcoin-screen/use-receive-bitcoin.ts +++ b/app/screens/receive-bitcoin-screen/use-receive-bitcoin.ts @@ -61,6 +61,7 @@ gql` id balance walletCurrency + isExternal } defaultWalletId } diff --git a/app/screens/send-bitcoin-screen/send-bitcoin-destination-screen.tsx b/app/screens/send-bitcoin-screen/send-bitcoin-destination-screen.tsx index 85bb2e246..ff4260f56 100644 --- a/app/screens/send-bitcoin-screen/send-bitcoin-destination-screen.tsx +++ b/app/screens/send-bitcoin-screen/send-bitcoin-destination-screen.tsx @@ -13,11 +13,13 @@ import { DestinationInformation } from "./destination-information" // hooks import { + AccountDefaultWalletLazyQueryHookResult, useAccountDefaultWalletLazyQuery, useLnUsdInvoiceAmountMutation, useNpubByUsernameLazyQuery, useRealtimePriceQuery, useSendBitcoinDestinationQuery, + WalletCurrency, } from "@app/graphql/generated" import { useActivityIndicator, useAppConfig } from "@app/hooks" import { useIsAuthed } from "@app/graphql/is-authed-context" @@ -25,16 +27,20 @@ import { useIsAuthed } from "@app/graphql/is-authed-context" // types import { RootStackParamList } from "@app/navigation/stack-param-lists" import { PaymentType } from "@galoymoney/client" +import { Network as NetworkGaloyClient, parsePaymentDestination } from "@flash/client" import { DestinationDirection, InvalidDestinationReason, + ParseDestinationResult, } from "./payment-destination/index.types" // utils import { LNURL_DOMAINS } from "@app/config" import { toUsdMoneyAmount } from "@app/types/amounts" import { parseDestination } from "./payment-destination" +import { createLnurlPaymentDestination } from "./payment-destination/lnurl" import { logParseDestinationResult } from "@app/utils/analytics" +import { requestPayServiceParams } from "lnurl-pay" // store import { @@ -184,13 +190,20 @@ const SendBitcoinDestinationScreen: React.FC = ({ navigation, route }) => unparsedDestination: rawInput, }, }) - const destination = await parseDestination({ - rawInput, - myWalletIds: wallets.map((wallet) => wallet.id), - bitcoinNetwork, - lnurlDomains: LNURL_DOMAINS, - accountDefaultWalletQuery, - }) + const destination = + (await maybeResolveManualUsernameToLnurl({ + rawInput, + myWalletIds: wallets.map((wallet) => wallet.id), + lnAddressHostname: lnDomain, + accountDefaultWalletQuery, + })) ?? + (await parseDestination({ + rawInput, + myWalletIds: wallets.map((wallet) => wallet.id), + bitcoinNetwork, + lnurlDomains: LNURL_DOMAINS, + accountDefaultWalletQuery, + })) if (destination.valid === false) { if (destination.invalidReason === InvalidDestinationReason.SelfPayment) { @@ -270,6 +283,7 @@ const SendBitcoinDestinationScreen: React.FC = ({ navigation, route }) => wallets, destinationState.destinationState, accountDefaultWalletQuery, + lnDomain, dispatchDestinationStateAction, navigation, ]) @@ -323,6 +337,72 @@ const SendBitcoinDestinationScreen: React.FC = ({ navigation, route }) => export default SendBitcoinDestinationScreen +const maybeResolveManualUsernameToLnurl = async ({ + rawInput, + myWalletIds, + lnAddressHostname, + accountDefaultWalletQuery, +}: { + rawInput: string + myWalletIds: string[] + lnAddressHostname: string + accountDefaultWalletQuery: AccountDefaultWalletLazyQueryHookResult[0] +}): Promise => { + const parsedDestination = parsePaymentDestination({ + destination: rawInput, + network: "mainnet" as NetworkGaloyClient, + lnAddressDomains: LNURL_DOMAINS, + }) + + if ( + parsedDestination.paymentType !== PaymentType.Intraledger || + !parsedDestination.valid + ) { + return null + } + + const { handle } = parsedDestination + const { data } = await accountDefaultWalletQuery({ variables: { username: handle } }) + const wallet = data?.accountDefaultWallet + + if (!wallet || wallet.walletCurrency !== WalletCurrency.Btc) { + return null + } + + if (myWalletIds.includes(wallet.id)) { + return { + valid: false, + invalidReason: InvalidDestinationReason.SelfPayment, + invalidPaymentDestination: parsedDestination, + } as const + } + + const lnurl = `${handle}@${lnAddressHostname}` + + try { + const lnurlParams = await requestPayServiceParams({ + lnUrlOrAddress: lnurl, + }) + + return createLnurlPaymentDestination({ + paymentType: PaymentType.Lnurl, + valid: true, + lnurl, + lnurlParams, + }) + } catch { + return { + valid: false, + invalidReason: InvalidDestinationReason.LnurlError, + invalidPaymentDestination: { + paymentType: PaymentType.Lnurl, + valid: false, + invalidReason: "unknown", + }, + } as const + } +} + const usestyles = makeStyles(({ colors }) => ({ screenStyle: { padding: 20, diff --git a/app/screens/send-bitcoin-screen/send-bitcoin-details-screen.tsx b/app/screens/send-bitcoin-screen/send-bitcoin-details-screen.tsx index 6464361b0..174865e19 100644 --- a/app/screens/send-bitcoin-screen/send-bitcoin-details-screen.tsx +++ b/app/screens/send-bitcoin-screen/send-bitcoin-details-screen.tsx @@ -23,7 +23,7 @@ import { WalletCurrency, } from "@app/graphql/generated" import { decodeInvoiceString, Network as NetworkLibGaloy } from "@galoymoney/client" -import { getUsdWallet } from "@app/graphql/wallets-utils" +import { getInternalWallets, getUsdWallet } from "@app/graphql/wallets-utils" // hooks import { useIsAuthed } from "@app/graphql/is-authed-context" @@ -382,7 +382,7 @@ const SendBitcoinDetailsScreen: React.FC = ({ navigation, route }) => { > diff --git a/app/screens/settings-screen/account-screen.tsx b/app/screens/settings-screen/account-screen.tsx index 978915aa2..917604702 100644 --- a/app/screens/settings-screen/account-screen.tsx +++ b/app/screens/settings-screen/account-screen.tsx @@ -46,6 +46,7 @@ gql` id balance walletCurrency + isExternal } } } diff --git a/app/screens/settings-screen/account/settings/delete.tsx b/app/screens/settings-screen/account/settings/delete.tsx index 1a05f3e6c..005600f8d 100644 --- a/app/screens/settings-screen/account/settings/delete.tsx +++ b/app/screens/settings-screen/account/settings/delete.tsx @@ -104,7 +104,6 @@ export const Delete = () => { if (res.data?.accountDelete?.success) { await deleteNostrData() - if (data?.me?.phone) await deleteUser(data?.me?.phone) await cleanUp(true) setAccountIsBeingDeleted(false) navigation.reset({ diff --git a/app/screens/settings-screen/account/show-warning-secure-account-hook.ts b/app/screens/settings-screen/account/show-warning-secure-account-hook.ts index 81cce1d8f..8c738ff4e 100644 --- a/app/screens/settings-screen/account/show-warning-secure-account-hook.ts +++ b/app/screens/settings-screen/account/show-warning-secure-account-hook.ts @@ -22,6 +22,7 @@ gql` id balance walletCurrency + isExternal } } } diff --git a/app/screens/settings-screen/default-wallet.tsx b/app/screens/settings-screen/default-wallet.tsx index 279bdb0d8..907f35185 100644 --- a/app/screens/settings-screen/default-wallet.tsx +++ b/app/screens/settings-screen/default-wallet.tsx @@ -1,5 +1,8 @@ import { gql } from "@apollo/client" -import { useSetDefaultWalletScreenQuery } from "@app/graphql/generated" +import { + useAccountUpdateDefaultWalletIdMutation, + useSetDefaultWalletScreenQuery, +} from "@app/graphql/generated" import { useIsAuthed } from "@app/graphql/is-authed-context" import { useI18nContext } from "@app/i18n/i18n-react" import { Text, makeStyles } from "@rneui/themed" @@ -36,6 +39,7 @@ gql` id balance walletCurrency + isExternal } } } @@ -46,7 +50,13 @@ export const DefaultWalletScreen: React.FC = () => { const { LL } = useI18nContext() const styles = useStyles() const isAuthed = useIsAuthed() - const { btcWallet } = useBreez() + const { + btcWallet, + loading: breezLoading, + externalWalletLoading, + externalWalletError, + retryExternalWalletRegistration, + } = useBreez() const { persistentState, updateState } = usePersistentStateContext() @@ -54,6 +64,7 @@ export const DefaultWalletScreen: React.FC = () => { fetchPolicy: "cache-first", skip: !isAuthed, }) + const [updateDefaultWalletId] = useAccountUpdateDefaultWalletIdMutation() const usdWallet = getUsdWallet(data?.me?.defaultAccount?.wallets) @@ -62,8 +73,20 @@ export const DefaultWalletScreen: React.FC = () => { const defaultWalletId = persistentState.defaultWallet?.id || usdWalletId - if (!usdWalletId || !btcWalletId) { - return {"missing walletIds"} + if (!usdWalletId) { + return {"Loading default account..."} + } + + if (!btcWalletId) { + if (externalWalletError) { + return {externalWalletError} + } + + if (breezLoading || externalWalletLoading) { + return {"Loading BTC account..."} + } + + return {"Tap to retry BTC account setup"} } const handleSetDefaultWallet = async (id: string) => { @@ -73,6 +96,12 @@ export const DefaultWalletScreen: React.FC = () => { defaultWallet = btcWallet } + if (defaultWallet.id) { + await updateDefaultWalletId({ + variables: { input: { walletId: defaultWallet.id } }, + }) + } + updateState((state: any) => { if (state) return { diff --git a/app/screens/settings-screen/settings-screen.tsx b/app/screens/settings-screen/settings-screen.tsx index ff569474f..2e25bcde2 100644 --- a/app/screens/settings-screen/settings-screen.tsx +++ b/app/screens/settings-screen/settings-screen.tsx @@ -48,6 +48,7 @@ gql` id balance walletCurrency + isExternal } } totpEnabled diff --git a/app/screens/settings-screen/show-warning-secure-account.tsx b/app/screens/settings-screen/show-warning-secure-account.tsx index 1812569bf..de8952dfd 100644 --- a/app/screens/settings-screen/show-warning-secure-account.tsx +++ b/app/screens/settings-screen/show-warning-secure-account.tsx @@ -22,6 +22,7 @@ gql` id balance walletCurrency + isExternal } } } diff --git a/app/types/amounts.ts b/app/types/amounts.ts index 8d3172c3d..867b75d8b 100644 --- a/app/types/amounts.ts +++ b/app/types/amounts.ts @@ -37,8 +37,8 @@ export const ZeroBtcMoneyAmount: BtcMoneyAmount = { currencyCode: "BTC", } -export const toBtcMoneyAmount = (amount: number | undefined): BtcMoneyAmount => { - if (amount === undefined) { +export const toBtcMoneyAmount = (amount: number | undefined | null): BtcMoneyAmount => { + if (amount === undefined || amount === null) { return { amount: NaN, currency: WalletCurrency.Btc, @@ -52,8 +52,8 @@ export const toBtcMoneyAmount = (amount: number | undefined): BtcMoneyAmount => } } -export const toUsdMoneyAmount = (amount: number | undefined): UsdMoneyAmount => { - if (amount === undefined) { +export const toUsdMoneyAmount = (amount: number | undefined | null): UsdMoneyAmount => { + if (amount === undefined || amount === null) { return { amount: NaN, currency: WalletCurrency.Usd, diff --git a/app/types/declaration.d.ts b/app/types/declaration.d.ts index 475131c04..457cd07b5 100644 --- a/app/types/declaration.d.ts +++ b/app/types/declaration.d.ts @@ -32,4 +32,5 @@ declare module "@env" { export const GREENLIGHT_PARTNER_KEY: string export const GOOGLE_PLACE_API_KEY: string export const MIGRATION_FEE_LNURL_W: string + export const BREEZ_LNURL_DOMAIN: string } diff --git a/app/types/transactions.ts b/app/types/transactions.ts index 9b88e49f4..50cde7643 100644 --- a/app/types/transactions.ts +++ b/app/types/transactions.ts @@ -103,7 +103,6 @@ export const getTransactionStatus = ( tx: UnifiedTransaction, ): "SUCCESS" | "PENDING" | "FAILURE" => { if (isBreezTransaction(tx)) { - // PaymentStatus: Completed = 0, Pending = 1, Failed = 2 switch (tx.payment.status) { case 0: case PaymentStatus.Completed: diff --git a/app/utils/breez-sdk/spark.ts b/app/utils/breez-sdk/spark.ts index 1561b2050..fb5a21403 100644 --- a/app/utils/breez-sdk/spark.ts +++ b/app/utils/breez-sdk/spark.ts @@ -28,11 +28,12 @@ import type { RecommendedFees, SendPaymentMethod, LnurlPayResponse, + LightningAddressInfo, Payment, Logger, LogEntry, } from "@breeztech/breez-sdk-spark-react-native" -import { API_KEY } from "@env" +import { API_KEY, BREEZ_LNURL_DOMAIN } from "@env" import { appendLog, initLogBuffer } from "./log-buffer" // Constants @@ -67,7 +68,7 @@ export const initializeBreezSDK = async (): Promise => { breezSDKInitializing = (async () => { try { - await retry(connectToSDK, 5000, 3) + await retry(() => connectToSDK(), 5000, 3) breezSDKInitialized = true return true } catch (error: unknown) { @@ -120,6 +121,7 @@ const connectToSDK = async (): Promise => { const config = defaultConfig(Network.Mainnet) config.apiKey = API_KEY + config.lnurlDomain = BREEZ_LNURL_DOMAIN config.maxDepositClaimFee = new MaxFee.NetworkRecommended({ leewaySatPerVbyte: BigInt(1), }) @@ -174,7 +176,7 @@ export const getInfo = async () => { const sdk = getSDKInstance() const info = await sdk.getInfo({ ensureSynced: true }) - return Number(info.balanceSats) + return info } // Fee Estimation @@ -624,3 +626,31 @@ export const refundDeposit = async ( return { success: false, error: message } } } + +// Lightning Address (LNURL-Pay) +export const checkLightningAddressAvailable = async ( + username: string, +): Promise => { + const sdk = getSDKInstance() + return sdk.checkLightningAddressAvailable({ username }) +} + +export const registerLightningAddress = async ( + username: string, + description?: string, +): Promise => { + const sdk = getSDKInstance() + return sdk.registerLightningAddress({ username, description }) +} + +export const getLightningAddress = async (): Promise< + LightningAddressInfo | undefined +> => { + const sdk = getSDKInstance() + return sdk.getLightningAddress() +} + +export const deleteLightningAddress = async (): Promise => { + const sdk = getSDKInstance() + await sdk.deleteLightningAddress() +} diff --git a/codegen.yml b/codegen.yml index 9574c39e8..0aa9859cd 100644 --- a/codegen.yml +++ b/codegen.yml @@ -1,5 +1,5 @@ overwrite: true -schema: "https://api.flashapp.me/graphql" +schema: "https://api.test.flashapp.me/graphql" # schema: "http://localhost:4002/graphql" # schema: "https://raw.githubusercontent.com/lnflash/flash/feature/merchant-map-suggest/src/graphql/public/schema.graphql" documents: @@ -28,6 +28,7 @@ generates: nonOptionalTypename: true scalars: AccountApiKeyLabel: "string" + AccountNumber: "string" AuthToken: "string" CentAmount: "number" ContactAlias: "string" diff --git a/e2e/utils/graphql.ts b/e2e/utils/graphql.ts index aa45455f6..70bd3e9ef 100644 --- a/e2e/utils/graphql.ts +++ b/e2e/utils/graphql.ts @@ -90,6 +90,7 @@ gql` walletCurrency id lnurlp + isExternal } } } diff --git a/ios/.xcode.env.local b/ios/.xcode.env.local index d85cff741..f1e77fe8b 100644 --- a/ios/.xcode.env.local +++ b/ios/.xcode.env.local @@ -1 +1,3 @@ -export NODE_BINARY=/usr/local/bin/node +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use +export NODE_BINARY="$(nvm which current)" diff --git a/ios/LNFlash.xcodeproj/project.pbxproj b/ios/LNFlash.xcodeproj/project.pbxproj index 0de92366f..9be536376 100644 --- a/ios/LNFlash.xcodeproj/project.pbxproj +++ b/ios/LNFlash.xcodeproj/project.pbxproj @@ -12,9 +12,9 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 3152A8AF830F40A7AB689E42 /* (null) in Resources */ = {isa = PBXBuildFile; }; - 3E3C92C2FC91412D8DFDE94D /* (null) in Resources */ = {isa = PBXBuildFile; }; - 560415592C5B4119B9F91553 /* (null) in Resources */ = {isa = PBXBuildFile; }; + 3152A8AF830F40A7AB689E42 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + 3E3C92C2FC91412D8DFDE94D /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + 560415592C5B4119B9F91553 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; 5CDD582462391BD4A7901BD8 /* libPods-LNFlash.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B660162FC198C5D612BB44A /* libPods-LNFlash.a */; }; 69B54F686F5835A64060EE6D /* libPods-LNFlash-Alt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 177D9FE829C0CBCE225C8178 /* libPods-LNFlash-Alt.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; @@ -27,18 +27,18 @@ 8647B9CB2DFD831600E2F160 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 8647B9CC2DFD831600E2F160 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 86FB60FB2BC40BBC0088C78C /* PrivacyInfo.xcprivacy */; }; 8647B9CD2DFD831600E2F160 /* coins.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 0147E0DC2BAE64B90071CDF2 /* coins.mp3 */; }; - 8647B9CE2DFD831600E2F160 /* (null) in Resources */ = {isa = PBXBuildFile; }; - 8647B9CF2DFD831600E2F160 /* (null) in Resources */ = {isa = PBXBuildFile; }; - 8647B9D02DFD831600E2F160 /* (null) in Resources */ = {isa = PBXBuildFile; }; - 8647B9D12DFD831600E2F160 /* (null) in Resources */ = {isa = PBXBuildFile; }; - 8647B9D22DFD831600E2F160 /* (null) in Resources */ = {isa = PBXBuildFile; }; - 8647B9D32DFD831600E2F160 /* (null) in Resources */ = {isa = PBXBuildFile; }; + 8647B9CE2DFD831600E2F160 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + 8647B9CF2DFD831600E2F160 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + 8647B9D02DFD831600E2F160 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + 8647B9D12DFD831600E2F160 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + 8647B9D22DFD831600E2F160 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + 8647B9D32DFD831600E2F160 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; 8647B9ED2DFEAFE500E2F160 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8647B9EC2DFEAFE500E2F160 /* GoogleService-Info.plist */; }; 8647B9EF2DFEAFF900E2F160 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8647B9EE2DFEAFF900E2F160 /* GoogleService-Info.plist */; }; 86FB60FC2BC40BBC0088C78C /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 86FB60FB2BC40BBC0088C78C /* PrivacyInfo.xcprivacy */; }; - 94D9F3C84EB547D68D41C50F /* (null) in Resources */ = {isa = PBXBuildFile; }; - BD157A9851974C298EB06CB7 /* (null) in Resources */ = {isa = PBXBuildFile; }; - C426C81D58C8450C878B6086 /* (null) in Resources */ = {isa = PBXBuildFile; }; + 94D9F3C84EB547D68D41C50F /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + BD157A9851974C298EB06CB7 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; + C426C81D58C8450C878B6086 /* BuildFile in Resources */ = {isa = PBXBuildFile; }; C61EE0AD23C530E30054100C /* AuthenticationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C61EE0AC23C530E30054100C /* AuthenticationServices.framework */; }; F1D71F3628CE5C9A00636277 /* AppDelegate.h in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FAF1A68108700A75B9A /* AppDelegate.h */; }; /* End PBXBuildFile section */ @@ -285,12 +285,12 @@ 86FB60FC2BC40BBC0088C78C /* PrivacyInfo.xcprivacy in Resources */, 0147E0DD2BAE64B90071CDF2 /* coins.mp3 in Resources */, 8647B9ED2DFEAFE500E2F160 /* GoogleService-Info.plist in Resources */, - 560415592C5B4119B9F91553 /* (null) in Resources */, - 3E3C92C2FC91412D8DFDE94D /* (null) in Resources */, - BD157A9851974C298EB06CB7 /* (null) in Resources */, - 3152A8AF830F40A7AB689E42 /* (null) in Resources */, - 94D9F3C84EB547D68D41C50F /* (null) in Resources */, - C426C81D58C8450C878B6086 /* (null) in Resources */, + 560415592C5B4119B9F91553 /* BuildFile in Resources */, + 3E3C92C2FC91412D8DFDE94D /* BuildFile in Resources */, + BD157A9851974C298EB06CB7 /* BuildFile in Resources */, + 3152A8AF830F40A7AB689E42 /* BuildFile in Resources */, + 94D9F3C84EB547D68D41C50F /* BuildFile in Resources */, + C426C81D58C8450C878B6086 /* BuildFile in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -304,12 +304,12 @@ 8647B9CC2DFD831600E2F160 /* PrivacyInfo.xcprivacy in Resources */, 8647B9CD2DFD831600E2F160 /* coins.mp3 in Resources */, 8647B9EF2DFEAFF900E2F160 /* GoogleService-Info.plist in Resources */, - 8647B9CE2DFD831600E2F160 /* (null) in Resources */, - 8647B9CF2DFD831600E2F160 /* (null) in Resources */, - 8647B9D02DFD831600E2F160 /* (null) in Resources */, - 8647B9D12DFD831600E2F160 /* (null) in Resources */, - 8647B9D22DFD831600E2F160 /* (null) in Resources */, - 8647B9D32DFD831600E2F160 /* (null) in Resources */, + 8647B9CE2DFD831600E2F160 /* BuildFile in Resources */, + 8647B9CF2DFD831600E2F160 /* BuildFile in Resources */, + 8647B9D02DFD831600E2F160 /* BuildFile in Resources */, + 8647B9D12DFD831600E2F160 /* BuildFile in Resources */, + 8647B9D22DFD831600E2F160 /* BuildFile in Resources */, + 8647B9D32DFD831600E2F160 /* BuildFile in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -339,8 +339,6 @@ "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", ); name = "[CP-User] [RNFB] Core Configuration"; - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##########################################################################\n##########################################################################\n#\n# NOTE THAT IF YOU CHANGE THIS FILE YOU MUST RUN pod install AFTERWARDS\n#\n# This file is installed as an Xcode build script in the project file\n# by cocoapods, and you will not see your changes until you pod install\n#\n##########################################################################\n##########################################################################\n\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"note: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"note: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"note: -> RNFB build script started\"\necho \"note: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"note: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"note: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n if ! _RN_ROOT_EXISTS=$(ruby -Ku -e \"require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\"); then\n echo \"error: Failed to parse firebase.json, check for syntax errors.\"\n exit 1\n fi\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"error: python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_analytics_storage\n _ANALYTICS_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_analytics_storage\")\n if [[ $_ANALYTICS_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_storage\n _ANALYTICS_AD_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_storage\")\n if [[ $_ANALYTICS_AD_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_user_data\n _ANALYTICS_AD_USER_DATA=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_user_data\")\n if [[ $_ANALYTICS_AD_USER_DATA ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_USER_DATA\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.analytics_registration_with_ad_network_enabled\n _ANALYTICS_REGISTRATION_WITH_AD_NETWORK=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_registration_with_ad_network_enabled\")\n if [[ $_ANALYTICS_REGISTRATION_WITH_AD_NETWORK ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_REGISTRATION_WITH_AD_NETWORK_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_REGISTRATION_WITH_AD_NETWORK\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"note: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"note: <- RNFB build script finished\"\n"; @@ -355,8 +353,6 @@ "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", ); name = "[CP-User] [RNFB] Crashlytics Configuration"; - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\nif [[ ${PODS_ROOT} ]]; then\n echo \"info: Exec FirebaseCrashlytics Run from Pods\"\n \"${PODS_ROOT}/FirebaseCrashlytics/run\"\nelse\n echo \"info: Exec FirebaseCrashlytics Run from framework\"\n \"${PROJECT_DIR}/FirebaseCrashlytics.framework/run\"\nfi\n"; @@ -494,8 +490,6 @@ "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", ); name = "[CP-User] [RNFB] Core Configuration"; - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##########################################################################\n##########################################################################\n#\n# NOTE THAT IF YOU CHANGE THIS FILE YOU MUST RUN pod install AFTERWARDS\n#\n# This file is installed as an Xcode build script in the project file\n# by cocoapods, and you will not see your changes until you pod install\n#\n##########################################################################\n##########################################################################\n\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"note: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"note: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"note: -> RNFB build script started\"\necho \"note: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"note: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"note: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n if ! _RN_ROOT_EXISTS=$(ruby -Ku -e \"require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\"); then\n echo \"error: Failed to parse firebase.json, check for syntax errors.\"\n exit 1\n fi\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"error: python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_analytics_storage\n _ANALYTICS_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_analytics_storage\")\n if [[ $_ANALYTICS_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_storage\n _ANALYTICS_AD_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_storage\")\n if [[ $_ANALYTICS_AD_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_user_data\n _ANALYTICS_AD_USER_DATA=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_user_data\")\n if [[ $_ANALYTICS_AD_USER_DATA ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_USER_DATA\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.analytics_registration_with_ad_network_enabled\n _ANALYTICS_REGISTRATION_WITH_AD_NETWORK=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_registration_with_ad_network_enabled\")\n if [[ $_ANALYTICS_REGISTRATION_WITH_AD_NETWORK ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_REGISTRATION_WITH_AD_NETWORK_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_REGISTRATION_WITH_AD_NETWORK\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"note: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"note: <- RNFB build script finished\"\n"; @@ -758,8 +752,6 @@ "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", ); name = "[CP-User] [RNFB] Crashlytics Configuration"; - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\nif [[ ${PODS_ROOT} ]]; then\n echo \"info: Exec FirebaseCrashlytics Run from Pods\"\n \"${PODS_ROOT}/FirebaseCrashlytics/run\"\nelse\n echo \"info: Exec FirebaseCrashlytics Run from framework\"\n \"${PROJECT_DIR}/FirebaseCrashlytics.framework/run\"\nfi\n"; diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0e39cb3a3..cd1a2e210 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -10,7 +10,7 @@ PODS: - breez_sdk_liquidFFI (0.11.13) - BreezSDKLiquid (0.11.13): - breez_sdk_liquidFFI (= 0.11.13) - - BreezSdkSparkReactNative (0.13.4): + - BreezSdkSparkReactNative (0.13.6): - DoubleConversion - glog - hermes-engine @@ -3013,7 +3013,7 @@ SPEC CHECKSUMS: breez_sdk_liquid: 5c229f9ab3bcf6b648bbf2d512f6fe1eee96d121 breez_sdk_liquidFFI: f05fadc0611126ade76d1fe6761ed8b020aabefb BreezSDKLiquid: ee6bf5a57f1b2533dc3c14c24c9773496f17b756 - BreezSdkSparkReactNative: 22459556b92935587708d1e8f875a59fad16005f + BreezSdkSparkReactNative: 11b97c67b196a0b2ac6bc03f39cad83aa59245ef BVLinearGradient: 880f91a7854faff2df62518f0281afb1c60d49a3 DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6 diff --git a/yarn.lock b/yarn.lock index a8ec0c412..fb5126830 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1296,7 +1296,20 @@ "@babel/parser" "^7.28.6" "@babel/types" "^7.28.6" -"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.21.5", "@babel/traverse@^7.25.3", "@babel/traverse@^7.26.10", "@babel/traverse@^7.27.1", "@babel/traverse@^7.28.5", "@babel/traverse@^7.28.6", "@babel/traverse@^7.29.0", "@babel/traverse@^7.7.2": +"@babel/traverse--for-generate-function-map@npm:@babel/traverse@^7.25.3": + version "7.29.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.29.0.tgz#f323d05001440253eead3c9c858adbe00b90310a" + integrity sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA== + dependencies: + "@babel/code-frame" "^7.29.0" + "@babel/generator" "^7.29.0" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.29.0" + "@babel/template" "^7.28.6" + "@babel/types" "^7.29.0" + debug "^4.3.1" + +"@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.21.5", "@babel/traverse@^7.25.3", "@babel/traverse@^7.26.10", "@babel/traverse@^7.27.1", "@babel/traverse@^7.28.5", "@babel/traverse@^7.28.6", "@babel/traverse@^7.29.0", "@babel/traverse@^7.7.2": version "7.29.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.29.0.tgz#f323d05001440253eead3c9c858adbe00b90310a" integrity sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA== @@ -1335,9 +1348,9 @@ "@noble/curves" "^1.7.0" "@breeztech/breez-sdk-spark-react-native@^0.13.4": - version "0.13.4" - resolved "https://registry.yarnpkg.com/@breeztech/breez-sdk-spark-react-native/-/breez-sdk-spark-react-native-0.13.4.tgz#7c5429a677547fcbe3aef4fcb299c159e0ff1641" - integrity sha512-wspP9tXY4GDJWVH42xI3dhe+MS5ROYX0a2mOqHKLWGcFqQc+Yuf77NaPBhZqM3FDKxVvZkDtAhCDuqDJ4vaclQ== + version "0.13.6" + resolved "https://registry.yarnpkg.com/@breeztech/breez-sdk-spark-react-native/-/breez-sdk-spark-react-native-0.13.6.tgz#5f4d9ab71826a277c406250a2aac3ad1304b4dd4" + integrity sha512-HFGN+AFuLnt02JdW+7/6LfhWZPeUB2lnEQHqm0xJCSGh/kqsUxFX+7O8OdQtFOGx9bbTAX8WK1JsUQLoxnEgww== dependencies: uniffi-bindgen-react-native "^0.29.3-1" @@ -23237,7 +23250,7 @@ string-natural-compare@^3.0.1: resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -23255,6 +23268,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" @@ -23383,7 +23405,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -23411,6 +23433,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.2.0.tgz#d22a269522836a627af8d04b5c3fd2c7fa3e32e3" @@ -25839,7 +25868,7 @@ workerpool@^6.5.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -25865,6 +25894,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"