Skip to content

Commit c212c43

Browse files
authored
chore: merge dev to preview (#4463)
2 parents 62a267a + 61d5d62 commit c212c43

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

mobile/src/common/hooks/useRemoteConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const url = `${basePath}${isDev ? 'dev.json' : 'prod.json'}`
1515
export const useRemoteConfig = () => {
1616
const query = useQuery({
1717
queryKey,
18-
queryFn: async (): Promise<App.Config> => {
18+
queryFn: async (): Promise<App.Config | undefined> => {
1919
const response = await fetchData<App.Config>({
2020
url,
2121
})
@@ -25,7 +25,7 @@ export const useRemoteConfig = () => {
2525
origin: 'useRemoteConfig',
2626
response: response,
2727
})
28-
return {} as App.Config
28+
return undefined
2929
}
3030

3131
return response.value.data

mobile/src/features/Airdrop/common/useAirdropEligibility.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const useAirdropEligibility = () => {
4242
!isByronWallet,
4343
staleTime: time.fiveMinutes,
4444
retry: false,
45-
queryFn: async (): Promise<AddressAllocation[]> => {
45+
queryFn: async (): Promise<AddressAllocation[] | undefined> => {
4646
if (!wallet || !wallet.isMainnet) {
4747
return []
4848
}
@@ -57,7 +57,7 @@ export const useAirdropEligibility = () => {
5757
addresses = wallet.receiveAddresses() || []
5858
} catch (error) {
5959
logger.warn('Failed to get receive addresses', {error})
60-
return []
60+
return undefined
6161
}
6262

6363
if (addresses.length === 0) {

mobile/src/features/Pairing/hooks/usePrimaryTokenActivity.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ export const usePrimaryTokenActivity = ({
1111
options,
1212
}: {
1313
to: Portfolio.Currency.Symbol
14-
options?: UseQueryOptions<PrimaryTokenActivity, Error>
14+
options?: UseQueryOptions<PrimaryTokenActivity | undefined, Error>
1515
}) => {
16-
const query = useQuery({
16+
const query = useQuery<PrimaryTokenActivity | undefined, Error>({
1717
enabled: to !== ptTicker,
1818
staleTime: time.oneMinute,
1919
retryDelay: time.oneSecond,
2020
refetchInterval: time.oneMinute,
2121
queryKey: [persistPrefixKeyword, 'usePrimaryTokenActivity', to],
2222
...options,
23-
queryFn: async () => {
23+
queryFn: async (): Promise<PrimaryTokenActivity | undefined> => {
2424
const response = await fetchPtPriceActivity([
2525
Date.now(),
2626
Date.now() - time.oneDay,
@@ -39,7 +39,7 @@ export const usePrimaryTokenActivity = ({
3939
}
4040
}
4141

42-
return defaultPrimaryTokenActivity
42+
return undefined
4343
},
4444
})
4545

0 commit comments

Comments
 (0)