Skip to content

Commit

Permalink
feat: add new deep links
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleSamtoshi committed Apr 18, 2024
1 parent 9feb221 commit 7707e59
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/components/actions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { UpgradeAccountModal } from "../upgrade-account-modal"

export const Action = {
SetLnAddress: "SetLnAddress",
SetDefaultWallet: "SetDefaultWallet",
SetDefaultAccount: "SetDefaultAccount",
UpgradeAccount: "UpgradeAccount",
} as const

Expand Down Expand Up @@ -41,7 +41,7 @@ export const ActionModals: React.FC = () => {
toggleModal={closeModal}
/>
<SetDefaultAccountModal
isVisible={activeAction === Action.SetDefaultWallet}
isVisible={activeAction === Action.SetDefaultAccount}
toggleModal={closeModal}
/>
<UpgradeAccountModal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import {
} from "@app/graphql/generated"
import { getBtcWallet, getUsdWallet } from "@app/graphql/wallets-utils"
import { useI18nContext } from "@app/i18n/i18n-react"
import { RootStackParamList } from "@app/navigation/stack-param-lists"
import crashlytics from "@react-native-firebase/crashlytics"
import { useNavigation } from "@react-navigation/native"
import { StackNavigationProp } from "@react-navigation/stack"
import { makeStyles, Text, useTheme } from "@rneui/themed"

import { GaloyCurrencyBubble } from "../atomic/galoy-currency-bubble"
Expand Down Expand Up @@ -53,7 +50,7 @@ export const SetDefaultAccountModal = ({
const [accountUpdateDefaultWallet] = useAccountUpdateDefaultWalletIdMutation()

const { data } = useSetDefaultAccountModalQuery({
fetchPolicy: "cache-first",
fetchPolicy: "cache-only",
})

const client = useApolloClient()
Expand Down
16 changes: 13 additions & 3 deletions app/navigation/navigation-container-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const processLinkForAction = (url: string): Action | null => {
switch ((action || "").toLocaleLowerCase()) {
case "set-ln-address":
return Action.SetLnAddress
case "set-default-wallet":
return Action.SetDefaultWallet
case "set-default-account":
return Action.SetDefaultAccount
case "upgrade-account":
return Action.UpgradeAccount
}
Expand Down Expand Up @@ -119,8 +119,18 @@ export const NavigationContainerWrapper: React.FC<React.PropsWithChildren> = ({
receiveBitcoin: "receive",
conversionDetails: "convert",
scanningQRCode: "scan-qr",
chatbot: "chat",
totpRegistrationInitiate: "settings/2fa",
currency: "settings/display-currency",
defaultWallet: "settings/default-account",
language: "settings/language",
theme: "settings/theme",
security: "settings/security",
accountScreen: "settings/account",
transactionLimitsScreen: "settings/tx-limits",
notificationSettingsScreen: "settings/notifications",
emailRegistrationInitiate: "settings/email",
settings: "settings",
emailRegistrationInitiate: "email/register",
transactionDetail: {
path: "transaction/:txid",
},
Expand Down

0 comments on commit 7707e59

Please sign in to comment.