Skip to content

Commit

Permalink
Merge branch 'develop' into YV-47
Browse files Browse the repository at this point in the history
  • Loading branch information
jorbuedo authored Nov 4, 2024
2 parents 4e4f22f + 2a659ff commit 938ba1f
Show file tree
Hide file tree
Showing 55 changed files with 804 additions and 782 deletions.
5 changes: 2 additions & 3 deletions apps/wallet-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"@shopify/flash-list": "^1.4.1",
"@types/bip39": "^3.0.0",
"@types/pbkdf2": "^3.1.2",
"@yoroi/api": "^1.5.2",
"@yoroi/api": "1.5.3",
"@yoroi/claim": "1.0.0",
"@yoroi/common": "^1.5.4",
"@yoroi/exchange": "^2.1.1",
Expand All @@ -141,7 +141,6 @@
"@yoroi/theme": "^2.0.0",
"@yoroi/transfer": "^1.0.1",
"add": "2.0.6",
"assert": "^2.0.0",
"axios": "^1.5.0",
"base-64": "^1.0.0",
"bignumber.js": "^9.0.1",
Expand Down Expand Up @@ -264,7 +263,7 @@
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.32.0",
"@yoroi/types": "1.5.8",
"@yoroi/types": "1.5.9",
"babel-eslint": "^10.1.0",
"babel-jest": "^29.2.1",
"babel-loader": "8.2.2",
Expand Down
14 changes: 0 additions & 14 deletions apps/wallet-mobile/src/features/Dev/DeveloperScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage'
import {useNavigation} from '@react-navigation/native'
import {useTheme} from '@yoroi/theme'
import {Api} from '@yoroi/types'
import assert from 'assert'
import _ from 'lodash'
import React from 'react'
import {useIntl} from 'react-intl'
Expand Down Expand Up @@ -267,13 +266,9 @@ const useStyles = () => {

class StorageError extends Error {}

const checkPathFormat = (path: string) => path.startsWith('/') && !path.endsWith('/')

const parseJson = (json: string) => (json !== null ? JSON.parse(json) : undefined)

const read = async (path: string) => {
assert(checkPathFormat(path), 'Wrong storage key path')

try {
const text = await AsyncStorage.getItem(path)
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Expand All @@ -284,8 +279,6 @@ const read = async (path: string) => {
}

const readMany = async (paths: Array<string>) => {
assert(_.every(paths, checkPathFormat), 'Wrong storage key path')

try {
const items = await AsyncStorage.multiGet(paths)

Expand All @@ -297,10 +290,6 @@ const readMany = async (paths: Array<string>) => {
}

const write = async (path: string, data: any) => {
assert(path.startsWith('/'), 'Wrong storage key path')
assert(!path.endsWith('/'), 'Wrong storage key path')
assert(data !== undefined, 'Cannot store undefined')

try {
await AsyncStorage.setItem(path, JSON.stringify(data))
} catch (error) {
Expand All @@ -309,9 +298,6 @@ const write = async (path: string, data: any) => {
}

const remove = async (path: string) => {
assert(path.startsWith('/'), 'Wrong storage key path')
assert(!path.endsWith('/'), 'Wrong storage key path')

try {
await AsyncStorage.removeItem(path)
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {defaultStackNavigationOptions, DiscoverRoutes} from '../../kernel/naviga
import {NetworkTag} from '../Settings/useCases/changeAppSettings/ChangeNetwork/NetworkTag'
import {BrowserNavigator} from './BrowserNavigator'
import {useStrings} from './common/useStrings'
import {ReviewTransaction} from './useCases/ReviewTransaction/ReviewTransaction'
import {ListSkeleton} from './useCases/SelectDappFromList/ListSkeleton'
import {SelectDappFromListScreen} from './useCases/SelectDappFromList/SelectDappFromListScreen'
import {useDappConnectorManager} from './useDappConnectorManager'
Expand Down Expand Up @@ -45,12 +44,6 @@ export const DiscoverNavigator = () => {
</Stack.Screen>

<Stack.Screen name="discover-browser" component={BrowserNavigator} options={{headerShown: false}} />

<Stack.Screen
name="discover-review-tx"
component={ReviewTransaction}
options={{...defaultStackNavigationOptions(atoms, color), title: strings.transactionReview}}
/>
</Stack.Navigator>
</DappConnectorProvider>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {NavigationProp, useNavigation} from '@react-navigation/native'
import * as React from 'react'

import {DiscoverRoutes} from '../../../kernel/navigation'
import {ReviewTransactionParams} from '../useCases/ReviewTransaction/ReviewTransaction'

export const useNavigateTo = () => {
const navigation = useNavigation<NavigationProp<DiscoverRoutes>>()
Expand All @@ -12,6 +11,5 @@ export const useNavigateTo = () => {
searchDappInBrowser: () => navigation.navigate('discover-browser', {screen: 'discover-search-dapp-in-browser'}),
selectDappFromList: () => navigation.navigate('discover-select-dapp-from-list'),
browseDapp: () => navigation.navigate('discover-browser', {screen: 'discover-browse-dapp'}),
reviewTransaction: (params: ReviewTransactionParams) => navigation.navigate('discover-review-tx', params),
} as const).current
}

This file was deleted.

Loading

0 comments on commit 938ba1f

Please sign in to comment.