Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Remove @helium/currency and support non-helium tokens #408

Merged
merged 24 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
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
4 changes: 2 additions & 2 deletions android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
arguments=
arguments=--init-script /var/folders/ck/r25tcygs77n6hv8d515p1w_c0000gn/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/ck/r25tcygs77n6hv8d515p1w_c0000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
auto.sync=false
ChewingGlass marked this conversation as resolved.
Show resolved Hide resolved
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
java.home=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
jvm.arguments=
offline.mode=false
override.workspace.settings=true
Expand Down
6 changes: 3 additions & 3 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -861,17 +861,17 @@ SPEC CHECKSUMS:
FBLazyVector: f1897022b53abf1469d6ad692ee2c69f57d967f3
FBReactNativeSpec: 627fd07f1b9d498c9fa572e76d7f1a6b1ee9a444
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 791fe035093b84822da7f0870421a25839ca7870
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
helium-react-native-sdk: 32c0a7e3abc733a7f3d291013b2db31475fc6980
hermes-engine: 7a53ccac09146018a08239c5425625fdb79a6162
hermes-engine: 0784cadad14b011580615c496f77e0ae112eed75
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
MapboxCommon: fdf7fd31c90b7b607cd9c63e37797f023c01d860
MapboxCoreMaps: 24270c7c6b8cb71819fc2f3c549db9620ee4d019
MapboxMaps: cb76511b98d3b95c74b0771ed105bc69f30ace6b
MapboxMobileEvents: de50b3a4de180dd129c326e09cd12c8adaaa46d6
MultiplatformBleAdapter: 5a6a897b006764392f9cef785e4360f54fb9477d
OneSignalXCFramework: 81ceac017a290f23793443323090cfbe888f74ea
RCT-Folly: 85766c3226c7ec638f05ad7cb3cf6a268d6c4241
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: bd6045fbd511da5efe6db89eecb21e4e36bd7cbf
RCTTypeSafety: c06d9f906faa69dd1c88223204c3a24767725fd8
React: b9ea33557ef1372af247f95d110fbdea114ed3b2
Expand Down
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,25 @@
"@coral-xyz/anchor": "0.26.0",
"@gorhom/bottom-sheet": "4.4.6",
"@gorhom/portal": "1.0.14",
"@helium/account-fetch-cache": "^0.2.5",
"@helium/address": "4.6.2",
"@helium/account-fetch-cache": "^0.2.17",
"@helium/account-fetch-cache-hooks": "^0.2.17",
"@helium/address": "4.10.2",
"@helium/circuit-breaker-sdk": "^0.2.17",
"@helium/crypto-react-native": "4.8.0",
"@helium/currency": "4.11.1",
"@helium/currency-utils": "0.1.1",
"@helium/data-credits-sdk": "0.1.2",
"@helium/distributor-oracle": "^0.2.6",
"@helium/fanout-sdk": "0.1.2",
"@helium/helium-entity-manager-sdk": "^0.2.6",
"@helium/helium-react-hooks": "0.1.2",
"@helium/helium-sub-daos-sdk": "0.1.2",
"@helium/data-credits-sdk": "^0.2.17",
"@helium/distributor-oracle": "^0.2.17",
"@helium/fanout-sdk": "^0.2.17",
"@helium/helium-entity-manager-sdk": "^0.2.17",
"@helium/helium-react-hooks": "^0.2.17",
"@helium/helium-sub-daos-sdk": "^0.2.17",
"@helium/http": "4.7.5",
"@helium/idls": "^0.2.5",
"@helium/lazy-distributor-sdk": "0.1.2",
"@helium/idls": "^0.2.17",
"@helium/lazy-distributor-sdk": "^0.2.17",
"@helium/onboarding": "4.9.0",
"@helium/proto-ble": "4.0.0",
"@helium/react-native-sdk": "1.0.0",
"@helium/spl-utils": "^0.2.6",
"@helium/spl-utils": "^0.2.17",
"@helium/transactions": "4.8.1",
"@helium/treasury-management-sdk": "0.1.2",
"@helium/voter-stake-registry-sdk": "0.1.2",
Expand All @@ -83,6 +84,7 @@
"@shopify/restyle": "1.8.0",
"@solana/spl-account-compression": "0.1.4",
"@solana/spl-token": "0.3.6",
"@solana/wallet-adapter-react": "^0.15.33",
"@solana/wallet-standard-features": "1.0.0",
"@solana/web3.js": "1.64.0",
"@tradle/react-native-http": "2.0.1",
Expand Down
79 changes: 39 additions & 40 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
import './polyfill'
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet'
import { PortalHost, PortalProvider } from '@gorhom/portal'
import { AccountContext } from '@helium/account-fetch-cache-hooks'
import { DarkTheme, NavigationContainer } from '@react-navigation/native'
import MapboxGL from '@rnmapbox/maps'
import { ThemeProvider } from '@shopify/restyle'
import TokensProvider from '@storage/TokensProvider'
import globalStyles from '@theme/globalStyles'
import { darkThemeColors, lightThemeColors, theme } from '@theme/theme'
import { useColorScheme } from '@theme/themeHooks'
import * as SplashLib from 'expo-splash-screen'
import React, { useMemo } from 'react'
import { LogBox, Platform } from 'react-native'
import { ThemeProvider } from '@shopify/restyle'
import { DarkTheme, NavigationContainer } from '@react-navigation/native'
import useAppState from 'react-native-appstate-hook'
import OneSignal, { OpenedEvent } from 'react-native-onesignal'
import Config from 'react-native-config'
import { SafeAreaProvider } from 'react-native-safe-area-context'
import { GestureHandlerRootView } from 'react-native-gesture-handler'
import { PortalHost, PortalProvider } from '@gorhom/portal'
import * as SplashLib from 'expo-splash-screen'
import { AccountProvider } from '@helium/helium-react-hooks'
import { theme, darkThemeColors, lightThemeColors } from '@theme/theme'
import { useColorScheme } from '@theme/themeHooks'
import globalStyles from '@theme/globalStyles'
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet'
import MapboxGL from '@rnmapbox/maps'
import useMount from './hooks/useMount'
import RootNavigator from './navigation/RootNavigator'
import { useAccountStorage } from './storage/AccountStorageProvider'
import LockScreen from './features/lock/LockScreen'
import SecurityScreen from './features/security/SecurityScreen'
import OnboardingProvider from './features/onboarding/OnboardingProvider'
import { BalanceProvider } from './utils/Balance'
import { useDeepLinking } from './utils/linking'
import { useNotificationStorage } from './storage/NotificationStorageProvider'
import OneSignal, { OpenedEvent } from 'react-native-onesignal'
import { SafeAreaProvider } from 'react-native-safe-area-context'
import NetworkAwareStatusBar from './components/NetworkAwareStatusBar'
import SplashScreen from './components/SplashScreen'
import WalletConnectProvider from './features/dappLogin/WalletConnectProvider'
import LockScreen from './features/lock/LockScreen'
import OnboardingProvider from './features/onboarding/OnboardingProvider'
import SecurityScreen from './features/security/SecurityScreen'
import useMount from './hooks/useMount'
import { navigationRef } from './navigation/NavigationHelper'
import SplashScreen from './components/SplashScreen'
import RootNavigator from './navigation/RootNavigator'
import './polyfill'
import { useSolana } from './solana/SolanaProvider'
import WalletSignProvider from './solana/WalletSignProvider'
import { useAccountStorage } from './storage/AccountStorageProvider'
import { useNotificationStorage } from './storage/NotificationStorageProvider'
import { BalanceProvider } from './utils/Balance'
import { useDeepLinking } from './utils/linking'

SplashLib.preventAutoHideAsync().catch(() => {
/* reloading the app might trigger some race conditions, ignore them */
Expand All @@ -55,7 +56,7 @@ const App = () => {

const { appState } = useAppState()
const { restored: accountsRestored } = useAccountStorage()
const { connection } = useSolana()
const { cache } = useSolana()
const { setOpenedNotification } = useNotificationStorage()

const linking = useDeepLinking()
Expand Down Expand Up @@ -112,14 +113,10 @@ const App = () => {
<BottomSheetModalProvider>
<PortalHost name="browser-portal" />
<OnboardingProvider baseUrl={Config.ONBOARDING_API_URL}>
{connection && (
<LockScreen>
<AccountProvider
extendConnection={false}
commitment="confirmed"
connection={connection}
>
<WalletConnectProvider>
<WalletConnectProvider>
{cache && (
<LockScreen>
<AccountContext.Provider value={cache}>
{accountsRestored && (
<>
<NavigationContainer
Expand All @@ -128,10 +125,12 @@ const App = () => {
ref={navigationRef}
>
<BalanceProvider>
<WalletSignProvider>
<NetworkAwareStatusBar />
<RootNavigator />
</WalletSignProvider>
<TokensProvider>
<WalletSignProvider>
<NetworkAwareStatusBar />
<RootNavigator />
</WalletSignProvider>
</TokensProvider>
</BalanceProvider>
</NavigationContainer>
<SecurityScreen
Expand All @@ -142,10 +141,10 @@ const App = () => {
/>
</>
)}
</WalletConnectProvider>
</AccountProvider>
</LockScreen>
)}
</AccountContext.Provider>
</LockScreen>
)}
</WalletConnectProvider>
</OnboardingProvider>
</BottomSheetModalProvider>
</PortalProvider>
Expand Down
3 changes: 3 additions & 0 deletions src/assets/images/config.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading