Skip to content

Commit 8b63168

Browse files
committed
Merge branch 'main' into @szymon/nativeCryptoLib
2 parents fc562df + 3257ad3 commit 8b63168

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+754
-161550
lines changed

packages/core-mobile/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,7 @@ expo-env.d.ts
9797

9898
# Branch
9999
/ios/config.xcconfig
100+
101+
# generated api clients
102+
app/utils/network/generated/glacierApi.client.ts
103+
app/utils/network/generated/tokenAggregatorApi.client.ts

packages/core-mobile/app/consts/reactQueryKeys.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export enum ReactQueryKeys {
1414

1515
NETWORKS = 'networks',
1616
NETWORK_CONTRACT_TOKENS = 'networkContractTokens',
17-
WATCHLIST_TOKENS_AND_CHARTS = 'watchlistTokensAndCharts',
18-
WATCHLIST_TRENDING_TOKENS_AND_CHARTS = 'watchlistTrendingTokensAndCharts',
17+
WATCHLIST_TOP_TOKENS = 'watchlistTopTokens',
18+
WATCHLIST_TRENDING_TOKENS = 'watchlistTrendingTokens',
1919
WATCHLIST_PRICES = 'watchlistPrices',
2020
WATCHLIST_TOKEN_SEARCH = 'watchlistTokenSearch',
2121
LAST_TRANSACTED_ERC20_NETWORKS = 'lastTransactedErc20Networks',

packages/core-mobile/app/hooks/watchlist/useGetTrendingTokens.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ export const useGetTrendingTokens = <TData = TrendingToken[]>(
1818

1919
return useQuery({
2020
enabled: isFocused,
21-
queryKey: [
22-
ReactQueryKeys.WATCHLIST_TRENDING_TOKENS_AND_CHARTS,
23-
exchangeRate
24-
],
21+
queryKey: [ReactQueryKeys.WATCHLIST_TRENDING_TOKENS, exchangeRate],
2522
queryFn: async () => {
2623
const tokens = await runAfterInteractions(async () => {
2724
return WatchlistService.getTrendingTokens(exchangeRate)

packages/core-mobile/app/hooks/watchlist/useGetTokensAndCharts.ts renamed to packages/core-mobile/app/hooks/watchlist/useTopTokens.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@ import { selectSelectedCurrency } from 'store/settings/currency'
77
import { TokensAndCharts } from 'store/watchlist'
88
import { runAfterInteractions } from 'utils/runAfterInteractions'
99

10-
export const useGetTokensAndCharts = (): UseQueryResult<
11-
TokensAndCharts,
12-
Error
13-
> => {
10+
export const useTopTokens = (): UseQueryResult<TokensAndCharts, Error> => {
1411
const currency = useSelector(selectSelectedCurrency)
1512
const isFocused = useIsFocused()
1613

1714
return useQuery({
1815
enabled: isFocused,
19-
queryKey: [ReactQueryKeys.WATCHLIST_TOKENS_AND_CHARTS, currency],
16+
queryKey: [ReactQueryKeys.WATCHLIST_TOP_TOKENS, currency],
2017
queryFn: () => {
2118
return runAfterInteractions(async () => {
22-
return WatchlistService.getTokens(currency)
19+
return WatchlistService.getTopTokens(currency)
2320
})
2421
},
25-
refetchInterval: 60000 // 1 minute
22+
refetchInterval: 120000 // 2 minutes
2623
})
2724
}

packages/core-mobile/app/hooks/watchlist/useWatchlist.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { LocalTokenWithBalance } from 'store/balance/types'
1616
import { getCaip2ChainIdForToken } from 'utils/caip2ChainIds'
1717
import { isNetworkContractToken } from 'utils/isNetworkContractToken'
1818
import { useGetPrices } from './useGetPrices'
19-
import { useGetTokensAndCharts } from './useGetTokensAndCharts'
19+
import { useTopTokens } from './useTopTokens'
2020
import { useGetTrendingTokens } from './useGetTrendingTokens'
2121

2222
type UseWatchListReturnType = {
@@ -47,7 +47,7 @@ export const useWatchlist = (): UseWatchListReturnType => {
4747
isLoading: isLoadingTopTokens,
4848
refetch: refetchTopTokens,
4949
isRefetching: isRefetchingTopTokens
50-
} = useGetTokensAndCharts()
50+
} = useTopTokens()
5151
const {
5252
data: trendingTokensResponse,
5353
isLoading: isLoadingTrendingTokens,

packages/core-mobile/app/hooks/watchlist/useWatchlistListener.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const useWatchlistListener = (): void => {
1717
effect: async () => {
1818
await queryClient.invalidateQueries({
1919
queryKey: [
20-
ReactQueryKeys.WATCHLIST_TOKENS_AND_CHARTS,
20+
ReactQueryKeys.WATCHLIST_TOP_TOKENS,
2121
ReactQueryKeys.WATCHLIST_PRICES
2222
]
2323
})

packages/core-mobile/app/new/common/components/SimpleTextInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const SimpleTextInput = ({
1515
maxLength,
1616
autoFocus,
1717
secureTextEntry,
18-
testID = 'text_input'
18+
testID = 'input_text'
1919
}: {
2020
value: string
2121
onChangeText: (name: string) => void

packages/core-mobile/app/new/common/components/WalletCard.tsx

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -95,32 +95,34 @@ const WalletCard = ({
9595
</View>
9696

9797
{showMoreButton && (
98-
<DropdownMenu
99-
groups={[
100-
{
101-
key: 'wallet-actions',
102-
items: getDropdownItems(wallet)
103-
}
104-
]}
105-
onPressAction={(event: { nativeEvent: { event: string } }) =>
106-
handleDropdownSelect(event.nativeEvent.event, wallet)
107-
}>
108-
<TouchableOpacity
109-
hitSlop={8}
110-
style={{
111-
minHeight: 48,
112-
paddingRight: 24,
113-
paddingLeft: 12,
114-
justifyContent: 'center',
115-
alignItems: 'center'
116-
}}>
117-
<Icons.Navigation.MoreHoriz
118-
color={colors.$textSecondary}
119-
width={20}
120-
height={20}
121-
/>
122-
</TouchableOpacity>
123-
</DropdownMenu>
98+
<View accessible={true} testID={`more_icon__${wallet.name}`}>
99+
<DropdownMenu
100+
groups={[
101+
{
102+
key: 'wallet-actions',
103+
items: getDropdownItems(wallet)
104+
}
105+
]}
106+
onPressAction={(event: { nativeEvent: { event: string } }) =>
107+
handleDropdownSelect(event.nativeEvent.event, wallet)
108+
}>
109+
<TouchableOpacity
110+
hitSlop={8}
111+
style={{
112+
minHeight: 48,
113+
paddingRight: 24,
114+
paddingLeft: 12,
115+
justifyContent: 'center',
116+
alignItems: 'center'
117+
}}>
118+
<Icons.Navigation.MoreHoriz
119+
color={colors.$textSecondary}
120+
width={20}
121+
height={20}
122+
/>
123+
</TouchableOpacity>
124+
</DropdownMenu>
125+
</View>
124126
)}
125127
</TouchableOpacity>
126128

packages/core-mobile/app/new/features/ledger/consts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export const SOLANA_DERIVATION_PATH = "44'/501'/0'/0'/0"
3131
// Solana derivation path prefix for generating indexed paths
3232
export const SOLANA_DERIVATION_PATH_PREFIX = "44'/501'/0'/0'"
3333

34+
// Deprecated Avalanche public key path prefix
35+
export const DEPRECATED_AVALANCHE_DERIVATION_PATH_PREFIX = "m/44'/9000'/0'"
36+
3437
/**
3538
* Generate a Solana derivation path for a specific account index
3639
* @param accountIndex - The account index to generate the path for

packages/core-mobile/app/new/features/track/market/components/MarketScreen.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const MarketScreen = ({
2828
isLoadingTopTokens,
2929
refetchTopTokens
3030
} = useWatchlist()
31-
3231
const { data, sort, view } = useTrackSortAndView(topTokens, prices)
3332
const listType = view.selected as MarketView
3433

0 commit comments

Comments
 (0)