Skip to content

Commit

Permalink
Merge branch 'develop' into thememing-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SorinC6 committed Mar 28, 2024
2 parents fe23a4f + 89d9989 commit 3bbb88f
Show file tree
Hide file tree
Showing 338 changed files with 9,299 additions and 4,134 deletions.
4 changes: 2 additions & 2 deletions .github/actions/wallet-mobile/action.yml
Expand Up @@ -5,7 +5,7 @@ inputs:
node-version:
description: "Node.js version to use"
required: true
default: "16.19.0"
default: "18.19.1"

runs:
using: "composite"
Expand All @@ -18,7 +18,7 @@ runs:
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
shell: bash
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
@@ -1,4 +1,4 @@
nodejs 18.0.0
nodejs 18.19.1
rust 1.69.0
java adoptopenjdk-17.0.10+7
ruby 3.2.2
Expand Down
20 changes: 12 additions & 8 deletions apps/wallet-mobile/.storybook/storybook.requires.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/wallet-mobile/.tool-versions
@@ -1,4 +1,4 @@
nodejs 18.0.0
nodejs 18.19.1
rust 1.69.0
java adoptopenjdk-17.0.10+7
ruby 3.2.2
Expand Down
9 changes: 8 additions & 1 deletion apps/wallet-mobile/android/app/src/main/AndroidManifest.xml
Expand Up @@ -21,8 +21,15 @@
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="yoroi"/>
<data android:scheme="yoroi" android:host="yoroi-wallet.com" android:pathPrefix="/w1" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https" android:host="yoroi-wallet.com" android:pathPrefix="/w1" />
</intent-filter>

</activity>
</application>
</manifest>
2 changes: 2 additions & 0 deletions apps/wallet-mobile/index.js
Expand Up @@ -4,11 +4,13 @@ import 'react-native-gesture-handler' // required by react-navigation
import './global'
import './src/i18n/polyfills' // https://formatjs.io/docs/polyfills
import BigNumber from 'bignumber.js'
import {enableMapSet} from 'immer'

import {AppRegistry} from 'react-native'

import {name} from './app.json'
import {YoroiApp} from './src/YoroiApp'

enableMapSet()
BigNumber.config({DECIMAL_PLACES: 19, EXPONENTIAL_AT: [-10, 40]})
AppRegistry.registerComponent(name, () => YoroiApp)
10 changes: 10 additions & 0 deletions apps/wallet-mobile/ios/nightly.entitlements
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:yoroi-wallet.com</string>
</array>
</dict>
</plist>
8 changes: 8 additions & 0 deletions apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj
Expand Up @@ -102,6 +102,8 @@
9A17D1FE4D734EC2A996EA26 /* Rubik-Medium.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Rubik-Medium.ttf"; path = "../src/assets/fonts/Rubik-Medium.ttf"; sourceTree = "<group>"; };
A230DBE7EEBA4B38AD9006D2 /* Rubik-Italic-VariableFont_wght.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Rubik-Italic-VariableFont_wght.ttf"; path = "../src/assets/fonts/Rubik-Italic-VariableFont_wght.ttf"; sourceTree = "<group>"; };
B4FF531EA86A409487D4A26C /* Rubik-BlackItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Rubik-BlackItalic.ttf"; path = "../src/assets/fonts/Rubik-BlackItalic.ttf"; sourceTree = "<group>"; };
BD1BE1882BAA0839004E2DD9 /* yoroi.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = yoroi.entitlements; path = yoroi/yoroi.entitlements; sourceTree = "<group>"; };
BD1BE1892BAA0888004E2DD9 /* nightly.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = nightly.entitlements; sourceTree = "<group>"; };
BD60BE852A34B13000EFF020 /* nightly.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = nightly.app; sourceTree = BUILT_PRODUCTS_DIR; };
BD825DEA29FB507600E19149 /* BootSplash.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = BootSplash.storyboard; path = yoroi/BootSplash.storyboard; sourceTree = "<group>"; };
BDD74A382A34B82A003591A8 /* nightly.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = nightly.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -161,6 +163,7 @@
13B07FAE1A68108700A75B9A /* yoroi */ = {
isa = PBXGroup;
children = (
BD1BE1882BAA0839004E2DD9 /* yoroi.entitlements */,
BDD74A382A34B82A003591A8 /* nightly.plist */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
Expand Down Expand Up @@ -193,6 +196,7 @@
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
BD1BE1892BAA0888004E2DD9 /* nightly.entitlements */,
13B07FAE1A68108700A75B9A /* yoroi */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* yoroiTests */,
Expand Down Expand Up @@ -828,6 +832,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = yoroi/yoroi.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 513;
Expand Down Expand Up @@ -872,6 +877,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = yoroi/yoroi.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 513;
Expand Down Expand Up @@ -1058,6 +1064,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-nightly";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = nightly.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 513;
Expand Down Expand Up @@ -1102,6 +1109,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon-nightly";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = nightly.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 513;
Expand Down
7 changes: 7 additions & 0 deletions apps/wallet-mobile/ios/yoroi/AppDelegate.mm
Expand Up @@ -46,4 +46,11 @@ - (BOOL)application:(UIApplication *)application
return [RCTLinkingManager application:application openURL:url options:options];
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
return [RCTLinkingManager application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}
@end
10 changes: 10 additions & 0 deletions apps/wallet-mobile/ios/yoroi/yoroi.entitlements
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:yoroi-wallet.com</string>
</array>
</dict>
</plist>
11 changes: 6 additions & 5 deletions apps/wallet-mobile/package.json
Expand Up @@ -99,7 +99,7 @@
"@emurgo/csl-mobile-bridge": "6.0.0-alpha.4",
"@emurgo/react-native-blockies-svg": "^0.0.2",
"@emurgo/react-native-hid": "^5.15.6",
"@emurgo/yoroi-lib": "0.15.0",
"@emurgo/yoroi-lib": "0.15.1",
"@formatjs/intl-datetimeformat": "^6.7.0",
"@formatjs/intl-getcanonicallocales": "^2.1.0",
"@formatjs/intl-locale": "^3.2.1",
Expand All @@ -123,16 +123,17 @@
"@types/bip39": "^3.0.0",
"@types/pbkdf2": "^3.1.2",
"@yoroi/api": "1.5.1",
"@yoroi/common": "1.5.1",
"@yoroi/exchange": "2.0.0",
"@yoroi/links": "1.5.1",
"@yoroi/common": "1.5.2",
"@yoroi/exchange": "2.0.1",
"@yoroi/links": "1.5.4",
"@yoroi/resolver": "2.0.4",
"@yoroi/staking": "1.5.1",
"@yoroi/swap": "1.5.2",
"@yoroi/theme": "^1.0.0",
"@yoroi/transfer": "1.0.0",
"add": "2.0.6",
"assert": "^2.0.0",
"axios": "^1.5.0",
"base-64": "^1.0.0",
"bignumber.js": "^9.0.1",
"bip39": "2.5.0",
Expand Down Expand Up @@ -243,7 +244,7 @@
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.32.0",
"@yoroi/types": "1.5.2",
"@yoroi/types": "1.5.4",
"babel-eslint": "^10.1.0",
"babel-jest": "^29.2.1",
"babel-loader": "8.2.2",
Expand Down
3 changes: 3 additions & 0 deletions apps/wallet-mobile/scripts/request-ada-with-link-android.sh
@@ -0,0 +1,3 @@
#!/bin/zsh

adb shell am start -W -a android.intent.action.VIEW -d "yoroi://yoroi-wallet.com/w1/transfer/request/ada-with-link?link=web%252Bcardano%253Aaddr_test1qzp3w455j8hdusjyv38rkr3cas9hyydfkr3tpwsz2yt8mqxr3y3kdut55a40jff00qmg74686vz44v6k363md06qkq0qgvjva0%253Famount%253D10\&isSandbox=true\&isTestnet=false\&appId=yoroi\&message=hi+there\&walletId=c4832ba5-c03e-4bd8-93ee-52536f1b1747\&authorization=ac0692d3-bf34-44e2-b57d-53e4ce47666b\&signature=4B7C8DB8B485D176D426980EE8A0D8A600B305AE2D7DC835B537657E2DAE110A6F7C0A641EAA623A8C43568BFC9DDCED5CBEA5AD6768BDE89F084EEDDBEBA36A\&redirectTo=https%253A%252F%252Fyoroi-wallet.com"
4 changes: 4 additions & 0 deletions apps/wallet-mobile/scripts/request-ada-with-link-ios.sh
@@ -0,0 +1,4 @@
#!/bin/zsh

xcrun simctl openurl booted "yoroi://yoroi-wallet.com/w1/transfer/request/ada-with-link?link=web%252Bcardano%253Aaddr_test1qzp3w455j8hdusjyv38rkr3cas9hyydfkr3tpwsz2yt8mqxr3y3kdut55a40jff00qmg74686vz44v6k363md06qkq0qgvjva0%253Famount%253D10&isSandbox=true&isTestnet=false&appId=yoroi&message=hi+there&walletId=c4832ba5-c03e-4bd8-93ee-52536f1b1747&authorization=ac0692d3-bf34-44e2-b57d-53e4ce47666b&signature=4B7C8DB8B485D176D426980EE8A0D8A600B305AE2D7DC835B537657E2DAE110A6F7C0A641EAA623A8C43568BFC9DDCED5CBEA5AD6768BDE89F084EEDDBEBA36A&redirectTo=https%253A%252F%252Fyoroi-wallet.com"

28 changes: 17 additions & 11 deletions apps/wallet-mobile/src/AppNavigator.tsx
@@ -1,6 +1,8 @@
import {NavigationContainer, NavigationContainerRef} from '@react-navigation/native'
import {createStackNavigator} from '@react-navigation/stack'
import {isString} from '@yoroi/common'
import {supportedPrefixes} from '@yoroi/links'
import {TransferProvider} from '@yoroi/transfer'
import * as React from 'react'
import {defineMessages, useIntl} from 'react-intl'
import {Alert, AppState, AppStateStatus, InteractionManager, Platform} from 'react-native'
Expand All @@ -11,11 +13,13 @@ import {OsLoginScreen, PinLoginScreen, useBackgroundTimeout} from './auth'
import {useAuth} from './auth/AuthProvider'
import {supportsAndroidFingerprintOverlay} from './auth/biometrics'
import {EnableLoginWithPin} from './auth/EnableLoginWithPin'
import {useStatusBar} from './components/hooks/useStatusBar'
import {ModalProvider} from './components/Modal/ModalContext'
import {ModalScreen} from './components/Modal/ModalScreen'
import {AgreementChangedNavigator, InitializationNavigator} from './features/Initialization'
import {LegalAgreement, useLegalAgreement} from './features/Initialization/common'
import {CONFIG, LINKING_CONFIG, LINKING_PREFIXES} from './legacy/config'
import {useDeepLinkWatcher} from './features/Links/common/useDeepLinkWatcher'
import {CONFIG} from './legacy/config'
import {DeveloperScreen} from './legacy/DeveloperScreen'
import {AppRoutes} from './navigation'
import {SearchProvider} from './Search/SearchContext'
Expand All @@ -25,18 +29,13 @@ import {AuthSetting, useAuthOsEnabled, useAuthSetting, useAuthWithOs} from './yo

const Stack = createStackNavigator<AppRoutes>()
const navRef = React.createRef<NavigationContainerRef<ReactNavigation.RootParamList>>()
const prefixes = [...supportedPrefixes]

export const AppNavigator = () => {
useDeepLinkWatcher()
const strings = useStrings()
const [routeName, setRouteName] = React.useState<string>()

const enableDeepLink = routeName === 'history-list'

const linking = {
enabled: enableDeepLink,
prefixes: LINKING_PREFIXES,
config: LINKING_CONFIG,
}
useStatusBar(routeName)

useHideScreenInAppSwitcher()
useAutoLogout()
Expand Down Expand Up @@ -77,7 +76,12 @@ export const AppNavigator = () => {
}

return (
<NavigationContainer onStateChange={handleStateChange} linking={linking} onReady={onReady} ref={navRef}>
<NavigationContainer
onStateChange={handleStateChange}
linking={{enabled: true, prefixes}}
onReady={onReady}
ref={navRef}
>
<ModalProvider>
<Stack.Navigator
screenOptions={{
Expand Down Expand Up @@ -133,7 +137,9 @@ export const AppNavigator = () => {
<Stack.Screen name="app-root">
{() => (
<SearchProvider>
<WalletNavigator />
<TransferProvider>
<WalletNavigator />
</TransferProvider>
</SearchProvider>
)}
</Stack.Screen>
Expand Down
3 changes: 0 additions & 3 deletions apps/wallet-mobile/src/Dashboard/Dashboard.tsx
Expand Up @@ -6,7 +6,6 @@ import {defineMessages, useIntl} from 'react-intl'
import {ActivityIndicator, RefreshControl, ScrollView, StyleSheet, View, ViewProps} from 'react-native'

import {Banner, Button, useModal} from '../components'
import {useStatusBar} from '../components/hooks/useStatusBar'
import {
useGovernanceStrings,
useIsParticipatingInGovernance,
Expand Down Expand Up @@ -56,8 +55,6 @@ export const Dashboard = () => {
const isParticipatingInGovernance = useIsParticipatingInGovernance(wallet)
const walletNavigateTo = useWalletNavigation()

useStatusBar()

const handleOnParticipatePress = () => {
walletNavigateTo.navigateToGovernanceCentre({navigateToStakingOnSuccess: true})
}
Expand Down
2 changes: 0 additions & 2 deletions apps/wallet-mobile/src/Nfts/Nfts.tsx
Expand Up @@ -7,7 +7,6 @@ import {RefreshControl, ScrollView, StyleSheet, Text, View} from 'react-native'
import {SafeAreaView} from 'react-native-safe-area-context'

import {Icon, NftImageGallery, SkeletonGallery, Spacer} from '../components'
import {useStatusBar} from '../components/hooks/useStatusBar'
import {useMetrics} from '../metrics/metricsManager'
import {useSearch, useSearchOnNavBar} from '../Search/SearchContext'
import {useSelectedWallet} from '../SelectedWallet'
Expand All @@ -21,7 +20,6 @@ export const Nfts = () => {
const strings = useStrings()
const styles = useStyles()
const {track} = useMetrics()
useStatusBar()

// use case: search nfts
useSearchOnNavBar({
Expand Down

0 comments on commit 3bbb88f

Please sign in to comment.