chore(mobile): Expo migration (#10769)

* gitignore android + ios folders

* update deps

* react-native-usb Expo + RN 0.73 support

* remove unnecessary fonts

* migrate to Expo

* update github workflows for Expo

* fix type error

* update expo-av

* fix lottie welcome animation

* change android version to 1 for debug

* fix deps

* fix tsconfig

* PR fixes

* fix min sdk version

* rename app

* add Sentry auth token to CI

* remove unsused deps in root package.json

* fix staging pipeline

* update package.json scripts

* fix staging

* fix fastlane prod

* fix unit tests

* fix unit tests
This commit is contained in:
Daniel Suchý
2024-01-26 19:45:30 +01:00
committed by GitHub
parent d159ef549a
commit bb37005e6b
221 changed files with 2470 additions and 7667 deletions

View File

@@ -43,6 +43,12 @@ jobs:
- name: Build JS libs
run: yarn build:libs
- name: Expo Prebuild
working-directory: suite-native/app/
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: yarn expo prebuild --platform android
- name: Ruby Setup for Fastlane
uses: ruby/setup-ruby@v1
with:
@@ -111,7 +117,12 @@ jobs:
run: |
yarn install
yarn build:libs
yarn workspace @trezor/suite-native pods
- name: Expo Prebuild
working-directory: suite-native/app/
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: yarn expo prebuild --platform ios
- name: Ruby Setup for Fastlane
uses: ruby/setup-ruby@v1

View File

@@ -36,6 +36,12 @@ jobs:
yarn install
yarn build:libs
- name: Expo Prebuild
working-directory: suite-native/app/
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: yarn expo prebuild --platform android
- name: Ruby Setup for Fastlane
uses: ruby/setup-ruby@v1
with:
@@ -97,7 +103,12 @@ jobs:
run: |
yarn install
yarn build:libs
yarn workspace @trezor/suite-native pods
- name: Expo Prebuild
working-directory: suite-native/app/
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: yarn expo prebuild --platform ios
- name: Ruby Setup for Fastlane
uses: ruby/setup-ruby@v1

View File

@@ -31,10 +31,11 @@ jobs:
echo $ENCODED_STRING_KEYSTORE | base64 -d > suite-native/app/android/app/stag-upload-key.keystore
echo $ENCODED_STRING_JSON_FILE > suite-native/app/android/google_play_key.json
- name: Install dependecies
run: |
yarn install
yarn build:libs
- name: Expo Prebuild
working-directory: suite-native/app/
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: yarn expo prebuild --platform android
- name: Ruby Setup for Fastlane
uses: ruby/setup-ruby@v1
@@ -90,11 +91,19 @@ jobs:
run: |
echo $APPSTORE_CERTIFICATE_CONTENT | base64 -d > suite-native/app/TrezorDistributionCertificate.p12
- name: Install missing Python deps (to build bcrypto lib in Node)
run: pip install setuptools
- name: Install dependecies
run: |
yarn install
yarn build:libs
yarn workspace @trezor/suite-native pods
- name: Expo Prebuild
working-directory: suite-native/app/
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: yarn expo prebuild --platform ios
- name: Ruby Setup for Fastlane
uses: ruby/setup-ruby@v1

View File

@@ -43,7 +43,7 @@ Run a dev build:
- `yarn suite:dev` (web app)
- `yarn suite:dev:desktop` (electron app)
## **Trezor Suite Lite** @trezor/suite-native
## **Trezor Suite Lite** @suite-native/app
> To set up your dev environment for a native platform (iOS/Android) follow [these additional steps](https://github.com/trezor/trezor-suite/tree/develop/suite-native/app#prerequisites).

View File

@@ -26,7 +26,7 @@
"_______ Start Scripts _______": "Here are standalone scripts for running individual applications for development.",
"suite:dev": "yarn workspace @trezor/suite-web dev",
"suite:dev:desktop": "yarn workspace @trezor/suite-desktop dev",
"native:start": "yarn workspace @trezor/suite-native start",
"native:start": "yarn workspace @suite-native/app start",
"_______ Testing _______": "Testing, linting, type checking...",
"type-check": "yarn nx run-many --target=type-check",
"type-check:force": "rimraf -rf -- **/libDev && yarn type-check",
@@ -63,10 +63,10 @@
"update-protobuf": "yarn workspace @trezor/protobuf update:protobuf && yarn workspace @trezor/protobuf update:schema",
"update-coinjoin-middleware": "yarn workspace @trezor/suite-data update-coinjoin-middleware",
"prepare-release": "./scripts/prepare-release.sh",
"native:android": "yarn workspace @trezor/suite-native android",
"native:ios": "yarn workspace @trezor/suite-native ios",
"native:android:clean": "yarn workspace @trezor/suite-native android:clean",
"native:pods": "yarn workspace @trezor/suite-native pods",
"native:android": "yarn workspace @suite-native/app android",
"native:ios": "yarn workspace @suite-native/app ios",
"native:android:clean": "yarn workspace @suite-native/app android:clean",
"native:pods": "yarn workspace @suite-native/app pods",
"_______ Aliases _______": "Aliases for longer commands which we often have to run manually. Names don't have to be pretty or make total sense.",
"refs": "yarn update-project-references",
"types": "yarn type-check",
@@ -85,7 +85,7 @@
},
"resolutions": {
"typescript": "5.3.2",
"react-native": "0.71.8",
"react-native": "0.73.2",
"prettier": "3.0.3",
"type-fest": "2.12.2",
"bcrypto": "5.4.0",

View File

@@ -33,9 +33,8 @@
"typescript": "5.3.2"
},
"peerDependencies": {
"expo-localization": "^14.1.1",
"react-native": "0.71.8",
"react-native-config": "^1.5.0",
"expo-localization": "*",
"react-native": "*",
"tslib": "^2.6.2"
},
"peerDependenciesMeta": {
@@ -44,9 +43,6 @@
},
"react-native": {
"optional": true
},
"react-native-config": {
"optional": true
}
}
}

View File

@@ -1,5 +1,4 @@
import { Dimensions, Platform } from 'react-native';
import Config from 'react-native-config';
import { getLocales } from 'expo-localization';
@@ -25,9 +24,9 @@ const getDeviceType = () => '';
const getOsVersion = () => `${Platform.Version}`;
const getSuiteVersion = () => Config.VERSION || '';
const getSuiteVersion = () => process.env.EXPO_PUBLIC_VERSION || '';
const getCommitHash = () => Config.COMMIT_HASH || '';
const getCommitHash = () => process.env.EXPO_PUBLIC_COMMIT_HASH || '';
const isFirefox = () => false;
@@ -60,7 +59,7 @@ const isAndroid = () => getPlatform() === 'android';
const isLinux = () => false;
const isCodesignBuild = () => Config.CODESIGN_BUILD === 'true';
const isCodesignBuild = () => process.env.EXPO_PUBLIC_CODESIGN_BUILD === 'true';
const getPlatformLanguages = () => getLocales().map(language => language.languageTag);

View File

@@ -54,12 +54,12 @@ android {
compileSdkVersion safeExtGet("compileSdkVersion", 33)
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.majorVersion
jvmTarget = JavaVersion.VERSION_17.majorVersion
}
namespace "io.trezor.rnusb"

View File

@@ -9,18 +9,6 @@
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
<action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</receiver>
<receiver
android:name=".ReactNativeUsbPermissionReceiver"
android:exported="true">
<intent-filter>
<action android:name="io.trezor.rnusb.USB_PERMISSION" />
</intent-filter>
</receiver>
</application>
</manifest>

View File

@@ -108,7 +108,11 @@ class ReactNativeUsbModule : Module() {
val onDeviceDisconnect: OnDeviceDisconnect = { deviceName ->
Log.d("ReactNativeUsbModule", "onDeviceDisconnected: ${devicesHistory[deviceName]}")
sendEvent(ON_DEVICE_DISCONNECT_EVENT_NAME, devicesHistory[deviceName])
if (devicesHistory[deviceName] == null) {
Log.e("ReactNativeUsbModule", "Device $deviceName not found in history.")
}
devicesHistory[deviceName]?.let { sendEvent(ON_DEVICE_DISCONNECT_EVENT_NAME, it) }
Log.d("ReactNativeUsbModule", "Disconnect event sent for device ${devicesHistory[deviceName]}")
openedConnections.remove(deviceName)

View File

@@ -3,14 +3,9 @@
"version": "1.0.0",
"description": "React Native WebUSB implementation",
"main": "src/index",
"publishConfig": {
"main": "lib/index.js",
"types": "lib/index.d.ts"
},
"scripts": {
"lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'",
"type-check": "yarn g:tsc --build tsconfig.json",
"build:lib": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json",
"open:ios": "open -a \"Xcode\" example/ios",
"open:android": "open -a \"Android Studio\" example/android"
},
@@ -27,10 +22,6 @@
"author": "Daniel Suchy <daniel.suchy@satoshilabs.com> (@Nodonisko)",
"license": "MIT",
"homepage": "https://github.com/trezor/trezor-suite#readme",
"devDependencies": {
"@types/react": "^18.0.25",
"expo-module-scripts": "^3.0.11"
},
"peerDependencies": {
"expo": "*",
"expo-modules-core": "*",

View File

@@ -0,0 +1,69 @@
/* eslint-disable @typescript-eslint/no-shadow */
/* eslint-disable require-await */
const { AndroidConfig, withAndroidManifest } = require('expo/config-plugins');
const { getMainApplicationOrThrow } = AndroidConfig.Manifest;
async function setCustomConfigAsync(config, androidManifest) {
const mainApplication = getMainApplicationOrThrow(androidManifest);
const mainActivity = mainApplication.activity?.[0];
if (!mainActivity) {
throw new Error('Cannot find main activity.');
}
// check if the intent-filter with the USB_DEVICE_ATTACHED action already exists
const existingIntentFilter = mainActivity['intent-filter']?.find(
({ action }) =>
action?.find(
({ $: { 'android:name': name } }) =>
name === 'android.hardware.usb.action.USB_DEVICE_ATTACHED' ||
name === 'android.hardware.usb.action.USB_DEVICE_DETACHED',
) !== undefined,
);
if (!existingIntentFilter) {
mainActivity['intent-filter']?.push({
action: [
{
$: {
'android:name': 'android.hardware.usb.action.USB_DEVICE_ATTACHED',
},
},
{
$: {
'android:name': 'android.hardware.usb.action.USB_DEVICE_DETACHED',
},
},
],
});
}
// check if the meta-data with the android.hardware.usb.action.USB_DEVICE_ATTACHED resource already exists
const existingMetaData = mainActivity['meta-data']?.find(
({ $: { 'android:name': name } }) =>
name === 'android.hardware.usb.action.USB_DEVICE_ATTACHED',
);
if (!existingMetaData) {
if (!mainActivity['meta-data']) {
mainActivity['meta-data'] = [];
}
mainActivity['meta-data']?.push({
$: {
'android:name': 'android.hardware.usb.action.USB_DEVICE_ATTACHED',
'android:resource': '@xml/device_filter',
},
});
}
return androidManifest;
}
module.exports = config =>
withAndroidManifest(config, async config => {
// Modifiers can be async, but try to keep them fast.
config.modResults = await setCustomConfigAsync(config, config.modResults);
return config;
});

View File

@@ -1,5 +0,0 @@
{
"extends": "expo-module-scripts/tsconfig.base",
"compilerOptions": { "outDir": "./lib" },
"include": ["./src"]
}

View File

@@ -28,7 +28,7 @@
"polished": "^4.2.2",
"react": "18.2.0",
"react-fela": "^12.2.1",
"react-native": "0.71.8"
"react-native": "0.73.2"
},
"devDependencies": {
"jest": "29.5.0",

View File

@@ -1,5 +1,5 @@
/**
* Use override for react-native (@trezor/suite-native/src/actions)
* Use override for react-native (@suite-native/app/src/actions)
*/
import { Route } from '@suite-common/suite-types';

View File

@@ -11,13 +11,13 @@
"generate-icons": "yarn tsx generateIcons.js"
},
"dependencies": {
"@shopify/react-native-skia": "0.1.233",
"@shopify/react-native-skia": "0.1.234",
"@suite-common/wallet-config": "workspace:*",
"@suite-common/wallet-types": "workspace:*",
"@trezor/styles": "workspace:*",
"@trezor/theme": "workspace:*",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native": "0.73.2",
"react-native-reanimated": "3.7.0-nightly-20240101-9d365ae7b"
},
"devDependencies": {

View File

@@ -115,7 +115,7 @@ export const extraDependenciesMock: ExtraDependencies = {
debug: false,
manifest: {
email: 'info@trezor.io',
appUrl: '@trezor/suite-native',
appUrl: '@suite-native/app',
},
},
},

View File

@@ -4,7 +4,7 @@
"private": true,
"license": "See LICENSE.md in repo root",
"sideEffects": [
"src/config.ts"
"src/config.ts"
],
"main": "src/index",
"scripts": {

View File

@@ -12,7 +12,7 @@
},
"dependencies": {
"@mobily/ts-belt": "^3.13.1",
"@react-navigation/native": "^6.1.9",
"@react-navigation/native": "6.1.9",
"@suite-common/formatters": "workspace:*",
"@suite-common/icons": "workspace:*",
"@suite-common/redux-utils": "workspace:*",
@@ -34,7 +34,7 @@
"@trezor/theme": "workspace:*",
"proxy-memoize": "2.0.2",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native": "0.73.2",
"react-native-reanimated": "3.7.0-nightly-20240101-9d365ae7b",
"react-redux": "8.0.7"
},

View File

@@ -15,7 +15,7 @@
"@trezor/styles": "workspace:*",
"jotai": "1.9.1",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native": "0.73.2",
"react-native-reanimated": "3.7.0-nightly-20240101-9d365ae7b"
}
}

View File

@@ -1,7 +1,7 @@
ENVIRONMENT=debug
COMMIT_HASH=
CHANGELOG=
VERSION=
BUILD_NUMBER=
CODESIGN_BUILD=false
JWS_PUBLIC_KEY='-----BEGIN PUBLIC KEY-----MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEbSUHJlr17+NywPS/w+xMkp3dSD8eWXSuAfFKwonZPe5fL63kISipJC+eJP7Mad0WxgyJoiMsZCV6BZPK2jIFdg==-----END PUBLIC KEY-----'
EXPO_PUBLIC_ENVIRONMENT=debug
EXPO_PUBLIC_COMMIT_HASH=
EXPO_PUBLIC_CHANGELOG=
EXPO_PUBLIC_VERSION=
EXPO_PUBLIC_BUILD_NUMBER=
EXPO_PUBLIC_CODESIGN_BUILD=false
EXPO_PUBLIC_JWS_PUBLIC_KEY='-----BEGIN PUBLIC KEY-----MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEbSUHJlr17+NywPS/w+xMkp3dSD8eWXSuAfFKwonZPe5fL63kISipJC+eJP7Mad0WxgyJoiMsZCV6BZPK2jIFdg==-----END PUBLIC KEY-----'

View File

@@ -1,7 +1,7 @@
ENVIRONMENT=develop
COMMIT_HASH=
CHANGELOG=
VERSION=
BUILD_NUMBER=
CODESIGN_BUILD=false
JWS_PUBLIC_KEY='-----BEGIN PUBLIC KEY-----MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEbSUHJlr17+NywPS/w+xMkp3dSD8eWXSuAfFKwonZPe5fL63kISipJC+eJP7Mad0WxgyJoiMsZCV6BZPK2jIFdg==-----END PUBLIC KEY-----'
EXPO_PUBLIC_ENVIRONMENT=develop
EXPO_PUBLIC_COMMIT_HASH=
EXPO_PUBLIC_CHANGELOG=
EXPO_PUBLIC_VERSION=
EXPO_PUBLIC_BUILD_NUMBER=
EXPO_PUBLIC_CODESIGN_BUILD=false
EXPO_PUBLIC_JWS_PUBLIC_KEY='-----BEGIN PUBLIC KEY-----MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEbSUHJlr17+NywPS/w+xMkp3dSD8eWXSuAfFKwonZPe5fL63kISipJC+eJP7Mad0WxgyJoiMsZCV6BZPK2jIFdg==-----END PUBLIC KEY-----'

View File

@@ -1,8 +1,7 @@
ENVIRONMENT=production
CODESIGN_BUILD=production
COMMIT_HASH=
CHANGELOG=
VERSION=
BUILD_NUMBER=
CODESIGN_BUILD=true
JWS_PUBLIC_KEY='-----BEGIN PUBLIC KEY-----MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAES7MbBzU/v5BsljkTM8Mz0Jsk+Nn5n2wH\no2/+MUI3TgCVdTbEHhn3HXaY7GJ6TLyWqxn+pIDY9wUUAyUqOStTUQ==-----END PUBLIC KEY-----'
EXPO_PUBLIC_ENVIRONMENT=production
EXPO_PUBLIC_COMMIT_HASH=
EXPO_PUBLIC_CHANGELOG=
EXPO_PUBLIC_VERSION=
EXPO_PUBLIC_BUILD_NUMBER=
EXPO_PUBLIC_CODESIGN_BUILD=true
EXPO_PUBLIC_JWS_PUBLIC_KEY='-----BEGIN PUBLIC KEY-----MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAES7MbBzU/v5BsljkTM8Mz0Jsk+Nn5n2wH\no2/+MUI3TgCVdTbEHhn3HXaY7GJ6TLyWqxn+pIDY9wUUAyUqOStTUQ==-----END PUBLIC KEY-----'

View File

@@ -1,7 +1,7 @@
ENVIRONMENT=staging
COMMIT_HASH=
CHANGELOG=
VERSION=
BUILD_NUMBER=
CODESIGN_BUILD=false
JWS_PUBLIC_KEY='-----BEGIN PUBLIC KEY-----MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAES7MbBzU/v5BsljkTM8Mz0Jsk+Nn5n2wH\no2/+MUI3TgCVdTbEHhn3HXaY7GJ6TLyWqxn+pIDY9wUUAyUqOStTUQ==-----END PUBLIC KEY-----'
EXPO_PUBLIC_ENVIRONMENT=staging
EXPO_PUBLIC_COMMIT_HASH=
EXPO_PUBLIC_CHANGELOG=
EXPO_PUBLIC_VERSION=
EXPO_PUBLIC_BUILD_NUMBER=
EXPO_PUBLIC_CODESIGN_BUILD=false
EXPO_PUBLIC_JWS_PUBLIC_KEY='-----BEGIN PUBLIC KEY-----MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAES7MbBzU/v5BsljkTM8Mz0Jsk+Nn5n2wH\no2/+MUI3TgCVdTbEHhn3HXaY7GJ6TLyWqxn+pIDY9wUUAyUqOStTUQ==-----END PUBLIC KEY-----'

1
suite-native/app/.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.pbxproj -text

40
suite-native/app/.gitignore vendored Normal file
View File

@@ -0,0 +1,40 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
# dependencies
node_modules/
# Expo
.expo/
dist/
web-build/
# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
# These are generated when running `expo prebuild`
ios/
android/
# Metro
.metro-health-check*
# debug
npm-debug.*
yarn-debug.*
yarn-error.*
# macOS
.DS_Store
*.pem
# local env files
.env
!.env.*
# typescript
*.tsbuildinfo

View File

@@ -1,3 +1,4 @@
{
"prefer_split_fsevents_watcher": true
"prefer_split_fsevents_watcher": true,
"suppress_recrawl_warnings": true
}

View File

@@ -3,7 +3,9 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '>= 3.0'
gem 'cocoapods', '>= 1.11.3'
gem 'cocoapods', '~> 1.13'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
gem 'fastlane'
gem 'xcode-install'

View File

@@ -1,4 +1,4 @@
# @trezor/suite-native
# @suite-native/app
Trezor Suite native application.
@@ -30,21 +30,12 @@ Transport layer not working for iOS but it's possible to run app in watch-only m
3. Open `ios/TrezorSuite.xcworkspace` in Xcode
4. Hit ▶️ `Run` button
## Debugging
## Debugging with Flipper - deprecated
Because of usage of new Fabric architecture, it is not possible to use Chrome debugger anymore. We are compiling our own version of Hermes core with added functions.
Best way how to debug app is download [Flipper](https://fbflipper.com).
## Dependencies, version locks
1. `simple-plist` - some internal dependency of RN wants to use version `1.3.0`, but in this version there is some error that dependabot doesn't like. Error is not valid for us, but adding `1.3.1` to dev dependencies will fix this warning.
## Updating fonts
1. Place updated fonts to `packages/theme/fonts`
1. Run `yarn react-native link`
## Distribution
Fastlane is the easiest way to automate beta deployments and releases for iOS and Android apps.

View File

@@ -1,211 +0,0 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
// requiring lowercase
project.ext.envConfigFiles = [
dev: ".env.debug",
firebasedevelop: ".env.develop",
stag: ".env.staging",
prod: ".env.production",
]
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
if (getGradle().getStartParameter().getTaskRequests().toString().contains("firebaseDevelop")){
apply plugin: 'com.google.gms.google-services'
}
import com.android.build.OutputFile
def monorepoRoot = "../../../.."
def rootNodeModules = "$monorepoRoot/node_modules"
def appRoot = "$monorepoRoot/suite-native/app"
/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
*/
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
root = file(appRoot)
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
reactNativeDir = file("$rootNodeModules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
codegenDir = file("$rootNodeModules/react-native-codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
cliFile = file("$rootNodeModules/react-native/cli.js")
/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
// debuggableVariants = ["liteDebug", "prodDebug"]
/* Bundling */
// A list containing the node command and its flags. Default is just 'node'.
// nodeExecutableAndArgs = ["node"]
//
// The command to run when bundling. By default is 'bundle'
// bundleCommand = "ram-bundle"
//
// The path to the CLI configuration file. Default is empty.
bundleConfig = file("$appRoot/metro.config.js")
//
// The name of the generated asset file containing your JS bundle
// bundleAssetName = "MyApplication.android.bundle"
//
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
entryFile = file("$appRoot/index.js")
//
// A list of extra flags to pass to the 'bundle' commands.
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
// extraPackagerArgs = []
/* Hermes Commands */
// The hermes compiler command to run. By default it is 'hermesc'
hermesCommand = "../../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc"
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
}
/**
* Set this to true to create four separate APKs instead of one,
* one for each native architecture. This is useful if you don't
* use App Bundles (https://developer.android.com/guide/app-bundle/)
* and want to have separate APKs to upload to the Play Store.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/*
* Private function to get the list of Native Architectures you want to build.
* This reads the value from reactNativeArchitectures in your gradle.properties
* file and works together with the --active-arch-only flag of react-native run-android.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
flavorDimensions "default"
namespace "io.trezor.suite"
defaultConfig {
applicationId "io.trezor.suite"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
// defaults - correct versions are managed by fastlane while building the app
versionCode 1
versionName "1.0.0"
// we use applicationIdSuffix that is different from the package name indicated in AndroidManifest.xml
resValue "string", "build_config_package", "io.trezor.suite"
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include (*reactNativeArchitectures())
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
if (System.getenv("SIGNING_KEY_FILE")) {
storeFile file(System.getenv("SIGNING_KEY_FILE"))
storePassword System.getenv("SIGNING_KEY_STORE_PASSWORD")
keyAlias System.getenv("SIGNING_KEY_ALIAS")
keyPassword System.getenv("SIGNING_KEY_PASSWORD")
}
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
productFlavors {
dev {
applicationIdSuffix '.debug'
}
firebaseDevelop {
applicationIdSuffix '.develop'
}
stag {
applicationIdSuffix '.staging'
}
prod {
// Placeholder, we can assemble `prodRelease` build variant
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}
}
}
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
apply from: file("$rootNodeModules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

View File

@@ -1,17 +0,0 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
-keep class com.facebook.hermes.unicode.** { *; }
-keep class com.facebook.jni.** { *; }
-keep public class com.horcrux.svg.** {*;}
# https://www.npmjs.com/package/react-native-config
-keep class io.trezor.suite.BuildConfig { *; }

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
</manifest>

View File

@@ -1,75 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package io.trezor.suite;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import com.facebook.react.ReactInstanceEventListener;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;
/**
* Class responsible of loading Flipper inside your React Native application. This is the debug
* flavor of it. Here you can add your own plugins and customize the Flipper setup.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
NetworkingModule.setCustomClientBuilder(
new NetworkingModule.CustomClientBuilder() {
@Override
public void apply(OkHttpClient.Builder builder) {
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
}
});
client.addPlugin(networkFlipperPlugin);
client.start();
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
reactContext.runOnNativeModulesQueueThread(
new Runnable() {
@Override
public void run() {
client.addPlugin(new FrescoFlipperPlugin());
}
});
}
});
} else {
client.addPlugin(new FrescoFlipperPlugin());
}
}
}
}

View File

@@ -1,27 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.3941606"
android:scaleY="0.3941606">
<path
android:pathData="M26.76,74.92C26.76,48.32 48.32,26.76 74.92,26.76H199.08C225.68,26.76 247.24,48.32 247.24,74.92V199.08C247.24,225.68 225.68,247.24 199.08,247.24H74.92C48.32,247.24 26.76,225.68 26.76,199.08V74.92Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="137"
android:startY="26.76"
android:endX="2.53"
android:endY="323.46"
android:type="linear">
<item android:offset="0" android:color="#FF037091"/>
<item android:offset="1" android:color="#FF469DB8"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M173.77,96.85C173.77,77.85 157.19,62.08 137,62.08C116.81,62.08 100.23,77.85 100.23,96.85V107.96H85.09V187.9L137,211.92L188.91,187.9V108.32H173.77V96.85ZM118.98,96.85C118.98,87.89 126.91,80.72 137,80.72C147.09,80.72 155.02,87.89 155.02,96.85V107.96H118.98V96.85ZM168,175L137,189.34L106,175V126.96H168V175Z"
android:fillColor="#ffffff"/>
</group>
</vector>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/splashscreen_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/splashscreen_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Local-TrezorSuite</string>
</resources>

View File

@@ -1,39 +0,0 @@
{
"project_info": {
"project_number": "191883890128",
"project_id": "pc-api-4710771878548015996-769",
"storage_bucket": "pc-api-4710771878548015996-769.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:191883890128:android:625bcdab76b3b3a644bdd5",
"android_client_info": {
"package_name": "io.trezor.suite.develop"
}
},
"oauth_client": [
{
"client_id": "191883890128-qfb2s8nq9k6jeb86vvabcgjqf4v71l5u.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDbkrxlf4L2uf3-oL73V2x23xSujAcvYe0"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "191883890128-qfb2s8nq9k6jeb86vvabcgjqf4v71l5u.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -1,27 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.3941606"
android:scaleY="0.3941606">
<path
android:pathData="M26.76,74.92C26.76,48.32 48.32,26.76 74.92,26.76H199.08C225.68,26.76 247.24,48.32 247.24,74.92V199.08C247.24,225.68 225.68,247.24 199.08,247.24H74.92C48.32,247.24 26.76,225.68 26.76,199.08V74.92Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="137"
android:startY="26.76"
android:endX="2.53"
android:endY="323.46"
android:type="linear">
<item android:offset="0" android:color="#FF880101"/>
<item android:offset="1" android:color="#FFB13030"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M173.77,96.85C173.77,77.85 157.19,62.08 137,62.08C116.81,62.08 100.23,77.85 100.23,96.85V107.96H85.09V187.9L137,211.92L188.91,187.9V108.32H173.77V96.85ZM118.98,96.85C118.98,87.89 126.91,80.72 137,80.72C147.09,80.72 155.02,87.89 155.02,96.85V107.96H118.98V96.85ZM168,175L137,189.34L106,175V126.96H168V175Z"
android:fillColor="#ffffff"/>
</group>
</vector>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/splashscreen_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/splashscreen_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,3 +0,0 @@
<resources>
<string name="app_name">Dev-TrezorSuite</string>
</resources>

View File

@@ -1,37 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/Theme.App.SplashScreen"
>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="portrait"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
<action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</activity>
</application>
</manifest>

View File

@@ -1,43 +0,0 @@
package io.trezor.suite;
import expo.modules.ReactActivityDelegateWrapper;
import android.os.Bundle;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactActivityDelegate;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "TrezorSuite";
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
}
/**
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
* (aka React 18) with two boolean flags.
*/
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new DefaultReactActivityDelegate(
this,
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
));
}
}

View File

@@ -1,76 +0,0 @@
package io.trezor.suite;
import android.app.Application;
import android.content.res.Configuration;
import androidx.annotation.NonNull;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.defaults.DefaultReactNativeHost;
import com.facebook.soloader.SoLoader;
import expo.modules.ApplicationLifecycleDispatcher;
import expo.modules.ReactNativeHostWrapper;
import java.util.List;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost =
new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index.js";
}
@Override
protected boolean isNewArchEnabled() {
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
}
@Override
protected Boolean isHermesEnabled() {
return BuildConfig.IS_HERMES_ENABLED;
}
});
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
DefaultNewArchitectureEntryPoint.load();
}
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
ApplicationLifecycleDispatcher.onApplicationCreate(this);
}
@Override
public void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
}
}

View File

@@ -1,27 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.3941606"
android:scaleY="0.3941606">
<path
android:pathData="M26.76,74.92C26.76,48.32 48.32,26.76 74.92,26.76H199.08C225.68,26.76 247.24,48.32 247.24,74.92V199.08C247.24,225.68 225.68,247.24 199.08,247.24H74.92C48.32,247.24 26.76,225.68 26.76,199.08V74.92Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="137"
android:startY="26.76"
android:endX="2.53"
android:endY="323.46"
android:type="linear">
<item android:offset="0" android:color="#FF00854D"/>
<item android:offset="1" android:color="#FF239E4C"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M173.77,96.85C173.77,77.85 157.19,62.08 137,62.08C116.81,62.08 100.23,77.85 100.23,96.85V107.96H85.09V187.9L137,211.92L188.91,187.9V108.32H173.77V96.85ZM118.98,96.85C118.98,87.89 126.91,80.72 137,80.72C147.09,80.72 155.02,87.89 155.02,96.85V107.96H118.98V96.85ZM168,175L137,189.34L106,175V126.96H168V175Z"
android:fillColor="#ffffff"/>
</group>
</vector>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
android:insetTop="@dimen/abc_edit_text_inset_top_material"
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
<selector>
<!--
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
-->
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
</selector>
</inset>

View File

@@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="70dp"
android:height="102dp"
android:viewportWidth="70"
android:viewportHeight="102">
<path
android:pathData="M59.79,23.67C59.79,10.73 48.61,0 35,0C21.39,0 10.2,10.74 10.2,23.67V31.24H0V85.65L34.99,102L70,85.65V31.48H59.8L59.79,23.67ZM22.84,23.67C22.84,17.57 28.19,12.69 35,12.69C41.8,12.69 47.15,17.57 47.15,23.67V31.24H22.84V23.67ZM55.9,76.87L34.99,86.64L14.08,76.88V44.17H55.9V76.87Z"
android:fillColor="#ffffff"/>
</vector>

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/splashscreen_background"/>
<item android:gravity="center" android:drawable="@drawable/splash_icon"
android:left="170dp" android:right="170dp" android:top="170dp" android:bottom="170dp">
</item>
</layer-list>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/splashscreen_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/splashscreen_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="splashscreen_background">#141414</color>
<color name="primary_dark">#000000</color>
</resources>

View File

@@ -1,4 +0,0 @@
<resources>
<string name="expo_splash_screen_resize_mode">native</string>
<string name="app_name">Trezor Suite Lite</string>
</resources>

View File

@@ -1,12 +0,0 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:windowIsTranslucent">true</item>
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
</style>
<style name="Theme.App.SplashScreen" parent="AppTheme">
<item name="android:windowBackground">@drawable/splashscreen</item>
</style>
</resources>

View File

@@ -1,20 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package io.trezor.suite;
import android.content.Context;
import com.facebook.react.ReactInstanceManager;
/**
* Class responsible of loading Flipper inside your React Native application. This is the release
* flavor of it so it's empty as we don't want to load Flipper.
*/
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
// Do nothing as we don't want to initialize Flipper on Release.
}
}

View File

@@ -1,27 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.3941606"
android:scaleY="0.3941606">
<path
android:pathData="M26.76,74.92C26.76,48.32 48.32,26.76 74.92,26.76H199.08C225.68,26.76 247.24,48.32 247.24,74.92V199.08C247.24,225.68 225.68,247.24 199.08,247.24H74.92C48.32,247.24 26.76,225.68 26.76,199.08V74.92Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="137"
android:startY="26.76"
android:endX="2.53"
android:endY="323.46"
android:type="linear">
<item android:offset="0" android:color="#FFEDA727"/>
<item android:offset="1" android:color="#FFD68B02"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M173.77,96.85C173.77,77.85 157.19,62.08 137,62.08C116.81,62.08 100.23,77.85 100.23,96.85V107.96H85.09V187.9L137,211.92L188.91,187.9V108.32H173.77V96.85ZM118.98,96.85C118.98,87.89 126.91,80.72 137,80.72C147.09,80.72 155.02,87.89 155.02,96.85V107.96H118.98V96.85ZM168,175L137,189.34L106,175V126.96H168V175Z"
android:fillColor="#ffffff"/>
</group>
</vector>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/splashscreen_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/splashscreen_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Some files were not shown because too many files have changed in this diff Show More