Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
988e4b1
Implemented the Personal Information screen for the business account …
Nodirbek75 Apr 25, 2025
99ae190
Created reusable InputField and PhoneNumber components, and implement…
Nodirbek75 Apr 25, 2025
78e8b2d
created reusable DropDownField and PhotoUploadField components
Nodirbek75 Apr 25, 2025
04f3ad0
implemented Bank Information screen
Nodirbek75 Apr 25, 2025
b6ca4ac
added bank account flow screens in root navigation
Nodirbek75 Apr 25, 2025
426611b
implemented businessAccountSlice to handle business account states gl…
Nodirbek75 Apr 25, 2025
309ae88
rename business-account-flow to account-upgrade-flow
Nodirbek75 Apr 25, 2025
2207af5
Reusable AddressField component is added to auto complete entered add…
Nodirbek75 Apr 26, 2025
66515dd
update InputField and PhoneNumber components to change border color w…
Nodirbek75 Apr 26, 2025
3ebdd23
implement AccountType screen and update upgradeAccountSlice
Nodirbek75 Apr 26, 2025
10f4f9f
Use address auto complete in BusinessInformation screen
Nodirbek75 Apr 26, 2025
8991c3b
change text to in Quick start section
Nodirbek75 Apr 26, 2025
4a81d44
update QuickStart section to navigate to Account Upgrade flow
Nodirbek75 Apr 26, 2025
8cf54cd
Account Upgrade Validation screen is added to validate phone number
Nodirbek75 Apr 29, 2025
9f0fcd9
Account Upgrade Success screen is implemented and added in root navig…
Nodirbek75 Apr 29, 2025
6a3e6c8
update InputField, AddressField, DropDownField and PhoneNumber compon…
Nodirbek75 Apr 29, 2025
63fa0ac
Implemented logic and UI for taking a photo and selecting one from th…
Nodirbek75 Apr 29, 2025
cb4bcb2
Added logic to display the 'Personal' account type in the AccountType…
Nodirbek75 Apr 29, 2025
5d8fd7c
Added logic to validate full name and phone number, and send a verifi…
Nodirbek75 Apr 29, 2025
11290d3
add a validation and navigation logic in BusinessInformation screen
Nodirbek75 Apr 29, 2025
5a4a549
improve validation check logic in BusinessInformation and PersonalInf…
Nodirbek75 Apr 30, 2025
8fc50e1
add a loading spinner in validation screen api request
Nodirbek75 Apr 30, 2025
bdf1872
add a input validation in BankInformation screen
Nodirbek75 Apr 30, 2025
a339fff
fix PhoneNumber component UI and update accountUpgradeSlice
Nodirbek75 Apr 30, 2025
8036d5b
Add modal to show searched addresses in AddressField component
Nodirbek75 May 5, 2025
117b92d
add validation check for photo upload and add a logic to upload photo…
Nodirbek75 May 5, 2025
d149bd7
update BankInformation screen
Nodirbek75 May 5, 2025
07d50ca
install @supabase/supabase-js package
Nodirbek75 May 5, 2025
cda5725
Google place api key, supabase url and supabase key are added in .env…
Nodirbek75 May 5, 2025
46e3297
update BusinessInformation screen
Nodirbek75 May 5, 2025
d0845b8
add a logic to set up supabase client and upload file to supabase sto…
Nodirbek75 May 5, 2025
d77d4ca
Implement a logic to save user data to supabase database in validatio…
Nodirbek75 May 6, 2025
8ae04e1
Add a logic to fetch user data from supabase database and pre-populat…
Nodirbek75 May 6, 2025
da5fe3c
disable phone input field in PersonalInformation screen if user is al…
Nodirbek75 May 6, 2025
d3b544a
add a id in accountUpgradeSlice
Nodirbek75 May 6, 2025
b5eddf6
save the business address latitude and longitude as well when select …
Nodirbek75 May 7, 2025
7822358
supabase integration in BusinessInformation screen: insert or update …
Nodirbek75 May 7, 2025
b8b2ad2
show loading spinner when saving user data to supabase in Validation …
Nodirbek75 May 7, 2025
abcc3a2
update insertUser and updateUser functions in supabase/index.ts
Nodirbek75 May 7, 2025
e42040e
implemented useAccountUpgrade hook to submit the account upgrade data…
Nodirbek75 May 7, 2025
6efd802
use useAccountUpgrade hook in AccountType, Validation and BusinessInf…
Nodirbek75 May 7, 2025
64b7eac
fix app crash when PersonalInformation screen unmounts
Nodirbek75 May 8, 2025
95a1311
implement supabase integration in BankInformation screen
Nodirbek75 May 8, 2025
0982ef1
update supabase/index.ts
Nodirbek75 May 8, 2025
658d941
add a information text in success screen for merchant
Nodirbek75 May 8, 2025
b360496
TestTransaction screen is implemented and added in root navigation
Nodirbek75 May 8, 2025
2435727
add upgradeCompleted in accountUpgradeSlice
Nodirbek75 May 8, 2025
4668b99
add a logic to show pending status in QuickStart section for upgrade …
Nodirbek75 May 8, 2025
12e7891
ProgressStep component is implemented for account upgrade flow
Nodirbek75 May 12, 2025
5092a38
ProgressSteps added in AccountType screen and implemented logic to ca…
Nodirbek75 May 12, 2025
9ffced3
ProgressSteps used in PersonalInformation, Validation, BusinessInform…
Nodirbek75 May 12, 2025
fa17b99
update Check icons in ProgressSteps component
Nodirbek75 May 13, 2025
1f4661a
Terminal request check box is added in BusinessInformation screen
Nodirbek75 May 13, 2025
9fce9e2
react-native-walkthrough-tooltip package is added
Nodirbek75 May 13, 2025
d3eb830
CheckBoxField component is implemented with help mark tooltip and use…
Nodirbek75 May 13, 2025
8e985aa
account upgrade flow texts are added in i18n internationalization
Nodirbek75 May 13, 2025
95f6642
use i18n internationalization texts in AccountType, PersonalInformati…
Nodirbek75 May 13, 2025
dcc30be
use i18n internationalization texts in TestTransaction screen
Nodirbek75 May 13, 2025
27d8d53
label changes
islandbitcoin May 14, 2025
b4ed2b9
hide x button for pending quick start
Nodirbek75 May 17, 2025
6c924d3
add redux-persist package
Nodirbek75 May 18, 2025
1d012fc
Implemented logic to save account upgrade flow data to AsyncStorage a…
Nodirbek75 May 18, 2025
773bcc6
update fetchAccountUpgrade method in useAccountUpgrade hook and use i…
Nodirbek75 May 19, 2025
6fdb937
set phone number and country code in useRequestPhoneCodeLogin hook wi…
Nodirbek75 May 19, 2025
0ec5c5e
add a logic to delete supabase user data in delete.tsx
Nodirbek75 May 19, 2025
e5290e0
adjust numOfSteps for business acount type
Nodirbek75 Jun 18, 2025
ea37660
navigate to BankInformation screen even account type is business
Nodirbek75 Jun 18, 2025
f8f52c0
make bank informations optional for business account type
Nodirbek75 Jun 18, 2025
53157a0
conversion from supabase to erpnext
islandbitcoin Oct 16, 2025
3c5029d
Merge remote-tracking branch 'origin' into feat/business-account
Nodirbek75 Jan 6, 2026
912b004
remove unused packages
Nodirbek75 Jan 7, 2026
8165a17
remove supabase logic
Nodirbek75 Jan 7, 2026
f19ce66
fix QuickStart component
Nodirbek75 Jan 7, 2026
2d3ffe1
improve ui/ux on the account upgrade flow
Nodirbek75 Jan 8, 2026
11840ae
revert back AddressField component to use google places api
Nodirbek75 Jan 8, 2026
9ead806
add an logic to upload id document to digital ocean s3 bucket using p…
Nodirbek75 Jan 15, 2026
a64656e
show proper error message on the BankInformation screen if it fails a…
Nodirbek75 Jan 15, 2026
93900d9
update upgrade-trial-account component to use new account upgrade flow
Nodirbek75 Jan 23, 2026
ad047d5
use updated mutation to generate pre-signed url to upload the id docu…
Nodirbek75 Jan 23, 2026
bc06104
remove TestTransaction screen and clean up the flow
Nodirbek75 Jan 27, 2026
6f09e10
use AccountUpgradeRequest query on the useAccountUpgrade hook to fetc…
Nodirbek75 Jan 27, 2026
c733d6b
make email and id document required for PRO upgrade level request
Nodirbek75 Jan 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { FeatureFlagContextProvider } from "./config/feature-flags-context"
import "./utils/logs"
import { GestureHandlerRootView } from "react-native-gesture-handler"
import { Provider } from "react-redux"
import { store } from "./store/redux"
import { persistor, store } from "./store/redux"
import PolyfillCrypto from "react-native-webview-crypto"
import { ActivityIndicatorProvider } from "./contexts/ActivityIndicatorContext"
import { BreezProvider } from "./contexts/BreezContext"
Expand All @@ -45,6 +45,7 @@ import { NotificationsProvider } from "./components/notification"
import { SafeAreaProvider } from "react-native-safe-area-context"
import { FlashcardProvider } from "./contexts/Flashcard"
import { NostrGroupChatProvider } from "./screens/chat/GroupChat/GroupChatProvider"
import { PersistGate } from "redux-persist/integration/react"

// FIXME should we only load the currently used local?
// this would help to make the app load faster
Expand All @@ -67,14 +68,15 @@ export const App = () => (
<GestureHandlerRootView style={{ flex: 1 }}>
<PolyfillCrypto />
<Provider store={store}>
<PersistentStateProvider>
<ChatContextProvider>
<NostrGroupChatProvider
groupId={"A9lScksyYAOWNxqR"}
relayUrls={["wss://groups.0xchat.com"]}
adminPubkeys={[]}
>
<ActivityIndicatorProvider>
<PersistGate loading={null} persistor={persistor}>
<PersistentStateProvider>
<ChatContextProvider>
<NostrGroupChatProvider
groupId={"A9lScksyYAOWNxqR"}
relayUrls={["wss://groups.0xchat.com"]}
adminPubkeys={[]}
>
<ActivityIndicatorProvider>
<TypesafeI18n locale={detectDefaultLocale()}>
<ThemeProvider theme={theme}>
<GaloyClient>
Expand All @@ -101,10 +103,11 @@ export const App = () => (
</GaloyClient>
</ThemeProvider>
</TypesafeI18n>
</ActivityIndicatorProvider>
</NostrGroupChatProvider>
</ChatContextProvider>
</PersistentStateProvider>
</ActivityIndicatorProvider>
</NostrGroupChatProvider>
</ChatContextProvider>
</PersistentStateProvider>
</PersistGate>
</Provider>
</GestureHandlerRootView>
</SafeAreaProvider>
Expand Down
136 changes: 136 additions & 0 deletions app/components/account-upgrade-flow/AddressField.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
import React, { useEffect, useRef, useState } from "react"
import { Modal, Platform, TouchableOpacity, View } from "react-native"
import { makeStyles, Text, useTheme } from "@rneui/themed"
import {
GooglePlacesAutocomplete,
GooglePlacesAutocompleteRef,
} from "react-native-google-places-autocomplete"

// components
import { PrimaryBtn } from "../buttons"

// env
import { GOOGLE_PLACE_API_KEY } from "@env"

type Props = {
label: string
placeholder: string
value?: string
errorMsg?: string
onAddressSelect: (address: string, lat?: number, lng?: number) => void
}

const AddressField: React.FC<Props> = ({
label,
placeholder,
value,
errorMsg,
onAddressSelect,
}) => {
const styles = useStyles()
const { colors } = useTheme().theme

const ref = useRef<GooglePlacesAutocompleteRef>(null)
const [isFocused, setIsFocused] = useState(false)
const [isVisible, setIsVisible] = useState(false)

useEffect(() => {
if (isVisible && ref.current) {
ref.current.focus()
}
}, [isVisible, ref.current])

return (
<View style={styles.container}>
<Text type="bl" bold>
{label}
</Text>
<TouchableOpacity style={styles.input} onPress={() => setIsVisible(true)}>
<Text type="bl" color={value ? colors.black : colors.placeholder}>
{!!value ? value : placeholder}
</Text>
</TouchableOpacity>
{!!errorMsg && (
<Text type="caption" color={colors.red}>
{errorMsg}
</Text>
)}
<Modal
animationType="slide"
transparent={true}
visible={isVisible}
onRequestClose={() => setIsVisible(false)}
>
<View style={styles.modal}>
<GooglePlacesAutocomplete
ref={ref}
listViewDisplayed="auto"
placeholder={placeholder}
onFail={(err) => console.log("Google places auto complete", err)}
onNotFound={() => console.log("Google places auto complete not found")}
fetchDetails={true}
onPress={(data, details) => {
setIsVisible(false)
onAddressSelect(
data.description,
details?.geometry.location.lat,
details?.geometry.location.lng,
)
}}
query={{
key: GOOGLE_PLACE_API_KEY,
language: "en",
}}
styles={{
textInput: [
styles.googlePlace,
isFocused ? { borderColor: colors.primary } : {},
],
}}
textInputProps={{
onFocus: () => setIsFocused(true),
onBlur: () => setIsFocused(false),
}}
/>
<PrimaryBtn label="Cancel" onPress={() => setIsVisible(false)} />
</View>
</Modal>
</View>
)
}

export default AddressField

const useStyles = makeStyles(({ colors }) => ({
container: {
marginBottom: 15,
},
input: {
paddingHorizontal: 15,
paddingVertical: 20,
marginTop: 5,
marginBottom: 2,
borderRadius: 10,
borderWidth: 1,
borderColor: colors.grey4,
backgroundColor: colors.grey5,
},
modal: {
flex: 1,
backgroundColor: colors.white,
padding: 20,
},
googlePlace: {
height: Platform.OS === "ios" ? 51 : 60,
paddingHorizontal: 15,
padding: 20,
marginTop: 5,
marginBottom: 15,
borderWidth: 1,
borderRadius: 10,
borderColor: colors.grey4,
backgroundColor: colors.grey5,
fontSize: 16,
fontFamily: "Sora-Regular",
},
}))
58 changes: 58 additions & 0 deletions app/components/account-upgrade-flow/CheckBoxField.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React, { useState } from "react"
import { View, TouchableOpacity } from "react-native"
import { Icon, makeStyles, Text, useTheme } from "@rneui/themed"
import Tooltip from "react-native-walkthrough-tooltip"
import { useI18nContext } from "@app/i18n/i18n-react"

type Props = {
isChecked?: boolean
onCheck: () => void
}

const CheckBoxField: React.FC<Props> = ({ isChecked, onCheck }) => {
const styles = useStyles()
const { colors } = useTheme().theme
const { LL } = useI18nContext()

const [tooltipVisible, setTooltipVisible] = useState(false)

return (
<View style={styles.container}>
<TouchableOpacity style={styles.container} onPress={onCheck}>
<Icon
name={isChecked ? "checkbox" : "checkbox-outline"}
size={30}
color={isChecked ? colors.green : colors.grey2}
type="ionicon"
style={{ marginRight: 10 }}
/>
<Text type="bl">{LL.AccountUpgrade.flashTerminal()}</Text>
</TouchableOpacity>
<Tooltip
isVisible={tooltipVisible}
content={<Text>{LL.AccountUpgrade.flashTerminalTooltip()}</Text>}
placement="top"
onClose={() => setTooltipVisible(false)}
>
<TouchableOpacity onPress={() => setTooltipVisible(true)}>
<Icon
name={"help-circle"}
size={25}
color={colors._lightBlue}
type="ionicon"
style={{ marginHorizontal: 5 }}
/>
</TouchableOpacity>
</Tooltip>
</View>
)
}

export default CheckBoxField

const useStyles = makeStyles(() => ({
container: {
flexDirection: "row",
alignItems: "center",
},
}))
81 changes: 81 additions & 0 deletions app/components/account-upgrade-flow/DropDownField.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import React from "react"
import { View } from "react-native"
import { makeStyles, Text, useTheme } from "@rneui/themed"
import { Dropdown } from "react-native-element-dropdown"
import { useI18nContext } from "@app/i18n/i18n-react"

type Props = {
label: string
placeholder: string
data: any[]
value: string
errorMsg?: string
isOptional?: boolean
onChange: (val: string) => void
}

const DropDownField: React.FC<Props> = ({
label,
placeholder,
data,
value,
errorMsg,
isOptional,
onChange,
}) => {
const styles = useStyles()
const { colors } = useTheme().theme
const { LL } = useI18nContext()

return (
<View style={styles.wrapper}>
<Text type="bl" bold>
{label}
{isOptional && (
<Text type="caption" color={colors.grey2}>
{LL.AccountUpgrade.optional()}
</Text>
)}
</Text>
<Dropdown
style={styles.dropdown}
containerStyle={styles.container}
data={data}
search={false}
maxHeight={300}
labelField="label"
valueField={value}
placeholder={placeholder}
value={value}
onChange={(item) => onChange(item.value)}
/>
{!!errorMsg && (
<Text type="caption" color={colors.red}>
{errorMsg}
</Text>
)}
</View>
)
}

export default DropDownField

const useStyles = makeStyles(({ colors }) => ({
wrapper: {
marginBottom: 15,
},
dropdown: {
padding: 15,
marginTop: 5,
marginBottom: 2,
borderRadius: 10,
borderWidth: 1,
borderColor: colors.grey4,
backgroundColor: colors.grey5,
fontSize: 16,
fontFamily: "Sora-Regular",
},
container: {
marginTop: 5,
},
}))
Loading