Upgrade to RN 0.80.2, fixes

This commit is contained in:
minibits-cash
2025-08-04 16:52:31 +02:00
parent 665545ffb5
commit 042337141c
13 changed files with 1946 additions and 1358 deletions
+2
View File
@@ -91,3 +91,5 @@ mise.yaml
# temp dev scripts 2025-07-14 and beyond. will remove afterwards
key-mappings.json
replace-translation-keys.js
# hot-updater
.hot-updater/output
@@ -30,13 +30,6 @@ class MainApplication : Application(), ReactApplication {
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
// minibits_wallet:react-native-code-push
// 2. Override the getJSBundleFile method in order to let
// the CodePush runtime determine where to get the JS
// bundle location from on each app start
// override fun getJSBundleFile(): String {
// return CodePush.getJSBundleFile()
// }
override fun getJSBundleFile(): String? {
return HotUpdater.getJSBundleFile(applicationContext)
}
Binary file not shown.
+1 -1
View File
@@ -14,6 +14,6 @@ module.exports = {
'module:react-native-dotenv',
'react-native-reanimated/plugin',
'@babel/plugin-proposal-export-namespace-from',
'hot-updater/babel-plugin',
'hot-updater/babel-plugin',
],
};
+8 -8
View File
@@ -1,9 +1,9 @@
import { metro } from '@hot-updater/metro';
import { bare } from "@hot-updater/bare";
import { withSentry } from "@hot-updater/sentry-plugin";
import {firebaseStorage, firebaseDatabase} from '@hot-updater/firebase';
import * as admin from 'firebase-admin';
import { defineConfig } from 'hot-updater';
import 'dotenv/config';
import { firebaseDatabase, firebaseStorage } from "@hot-updater/firebase";
import "dotenv/config";
import * as admin from "firebase-admin";
import { defineConfig } from "hot-updater";
// https://firebase.google.com/docs/admin/setup?hl=en#initialize_the_sdk_in_non-google_environments
// Check your .env file and add the credentials
@@ -13,9 +13,9 @@ const credential = admin.credential.applicationDefault();
export default defineConfig({
build: withSentry(
metro({
enableHermes: true,
sourcemap: true
bare({
enableHermes: true,
sourcemap: true
}),
{
org: process.env.SENTRY_ORG,
@@ -301,7 +301,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = minibits_wallet/minibits_wallet.entitlements;
CURRENT_PROJECT_VERSION = 13;
CURRENT_PROJECT_VERSION = 14;
DEVELOPMENT_TEAM = GR2ZKMCLAM;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = minibits_wallet/Info.plist;
@@ -312,7 +312,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.2.2;
MARKETING_VERSION = 0.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -337,7 +337,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = minibits_wallet/minibits_wallet.entitlements;
CURRENT_PROJECT_VERSION = 13;
CURRENT_PROJECT_VERSION = 14;
DEVELOPMENT_TEAM = GR2ZKMCLAM;
INFOPLIST_FILE = minibits_wallet/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Minibits;
@@ -347,7 +347,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.2.2;
MARKETING_VERSION = 0.3.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
+5 -6
View File
@@ -18,7 +18,7 @@
"adb:inspect": "adb shell input keyevent 82",
"postinstall": "patch-package --exclude 'nothing'",
"clean": "npx react-native-clean-project",
"machine-translate": "npx @inlang/cli machine translate --project minibits.inlang"
"machine-translate": "npx @inlang/cli machine translate --project minibits.inlang"
},
"dependencies": {
"@cashu/cashu-ts": "minibits-cash/cashu-ts#b3ba36757d84ec03f1064029db02308eb3a09cc4",
@@ -74,7 +74,7 @@
"react-native-quick-base64": "^2.2.1",
"react-native-quick-crypto": "^0.7.16",
"react-native-quick-sqlite": "8.2.7",
"react-native-reanimated": "^4.0.1",
"react-native-reanimated": "^3.19.0",
"react-native-safe-area-context": "^5.5.2",
"react-native-screens": "^4.13.1",
"react-native-svg": "^15.12.1",
@@ -86,11 +86,11 @@
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@hot-updater/firebase": "0.19.9",
"@hot-updater/bare": "0.19.9",
"@hot-updater/firebase": "0.19.9",
"@hot-updater/sentry-plugin": "^0.19.9",
"@react-native-community/cli": "19.1.1",
"@react-native-community/cli-platform-android": "18.0.0",
@@ -111,9 +111,8 @@
"eslint-plugin-unused-imports": "^2.0.0",
"firebase-admin": "^13.2.0",
"firebase-tools": "^14.2.0",
"hot-updater": "^0.16.3",
"hot-updater": "^0.19.9",
"jest": "^29.6.3",
"metro-react-native-babel-preset": "0.76.7",
"prettier": "2.8.8",
"react-native-clean-project": "^4.0.3",
"react-test-renderer": "19.1.0",
+2 -2
View File
@@ -50,14 +50,14 @@ export const ErrorModal: FC<ErrorModalProps> = function ({ error }) {
<>
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: spacing.small }}>
<Icon icon="faTriangleExclamation" size={spacing.large} color={bg} />
<Text style={{ color: 'white', marginLeft: spacing.small }}>{error.name}</Text>
<Text style={{ marginLeft: spacing.small }}>{error.name}</Text>
</View>
<ScrollView
style={{
//height: spacing.screenHeight * 0.1,
maxHeight: spacing.screenHeight * 0.07,
}}>
<Text style={{ color: 'white', marginBottom: spacing.small }}>{error.message}</Text>
<Text style={{ marginBottom: spacing.small }}>{error.message}</Text>
</ScrollView>
{error.params && isObj(error.params) && (
<>
+1 -1
View File
@@ -432,7 +432,7 @@ export const ProofsStoreModel = types
},
getMintBalanceWithMaxBalance: (unit: MintUnit) => {
const balances = self.balances.mintBalances
let maxBalance = undefined;
let maxBalance: MintBalance | undefined = undefined;
let maxAmount = -Infinity;
for (const balance of balances) {
+7 -5
View File
@@ -3,6 +3,7 @@ import React, {FC, useEffect, useRef, useState} from 'react'
import {AppState, LayoutAnimation, Platform, ScrollView, TextStyle, View, ViewStyle, useColorScheme} from 'react-native'
import notifee, { AuthorizationStatus } from '@notifee/react-native'
import messaging from '@react-native-firebase/messaging'
import { HotUpdater, getUpdateSource } from '@hot-updater/react-native'
import {
APP_ENV,
HOT_UPDATER_API_KEY,
@@ -14,14 +15,13 @@ import {useHeader} from '../utils/useHeader'
import {useStores} from '../models'
import {translate} from '../i18n'
import { log } from '../services'
import {Env} from '../utils/envtypes'
import { round } from '../utils/number'
import { Currencies, CurrencyCode } from '../services/wallet/currency'
import { NotificationService } from '../services/notificationService'
import { SvgXml } from 'react-native-svg'
import { CurrencySign } from './Wallet/CurrencySign'
import { CommonActions, StaticScreenProps, useNavigation } from '@react-navigation/native'
import { HotUpdater } from '@hot-updater/react-native'
type Props = StaticScreenProps<undefined>
@@ -54,7 +54,9 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
const checkForUpdate = async () => {
try {
const updateInfo = await HotUpdater.checkForUpdate({
source: HOT_UPDATER_URL,
source: getUpdateSource(HOT_UPDATER_URL, {
updateStrategy: "appVersion",
}),
requestHeaders: {
Authorization: `Bearer ${HOT_UPDATER_API_KEY}`,
},
@@ -68,7 +70,7 @@ export const SettingsScreen = observer(function SettingsScreen({ route }: Props)
if(!__DEV__) {
setIsUpdateAvailable(true)
setUpdateDescription(updateInfo.message)
setUpdateDescription(updateInfo.message || '')
if (updateInfo.shouldForceUpdate) {
// apply emergency update immediately
+8 -6
View File
@@ -55,7 +55,7 @@ import { CurrencyAmount } from './Wallet/CurrencyAmount'
import { LeftProfileHeader } from './ContactsScreen'
import { getUnixTime } from 'date-fns/getUnixTime'
import FastImage from 'react-native-fast-image'
import { HotUpdater } from '@hot-updater/react-native'
import { HotUpdater, getUpdateSource } from '@hot-updater/react-native'
const MINT_CHECK_INTERVAL = 60
@@ -111,7 +111,9 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
const checkForUpdate = async () => {
try {
const updateInfo = await HotUpdater.checkForUpdate({
source: HOT_UPDATER_URL,
source: getUpdateSource(HOT_UPDATER_URL, {
updateStrategy: "appVersion",
}),
requestHeaders: {
Authorization: `Bearer ${HOT_UPDATER_API_KEY}`,
},
@@ -125,7 +127,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
if(!__DEV__) {
setIsUpdateAvailable(true)
setUpdateDescription(updateInfo.message)
setUpdateDescription(updateInfo.message || '')
toggleUpdateModal()
if (updateInfo.shouldForceUpdate) {
@@ -191,14 +193,14 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
const handleReceivedEventTaskResult = async (result: WalletTaskResult) => {
log.trace('[handleReceivedEventTaskResult]')
if(result.error) {
setInfo(result.message)
handleError(result.error)
}
}
const handleClaimTaskResult = async (result: WalletTaskResult) => {
log.trace('[handleClaimTaskResult]')
if(result.error) {
setInfo(result.message)
handleError(result.error)
}
}
@@ -286,7 +288,7 @@ export const WalletScreen = observer(function WalletScreen({ route }: Props) {
lastMintCheckRef.current = nowInSec
WalletTask.handleInFlightQueue()
WalletTask.handleClaimQueue().catch(e => setInfo(e.message))
WalletTask.handleClaimQueue().catch(e => handleError(e))
WalletTask.syncStateWithAllMintsQueue({isPending: true})
WalletTask.handlePendingQueue()
+2 -2
View File
@@ -7,7 +7,7 @@ import {
} from '@env'
import { WalletProfile, WalletProfileRecord } from "../models/WalletProfileStore"
import { CurrencyCode } from "./wallet/currency"
// refresh // refresh
// refresh // refresh // refresh
type MinibitsRequestArgs = {
method: 'POST' | 'PUT' | 'DELETE' | 'GET'
@@ -301,7 +301,7 @@ const fetchApi = async (url: string, options: MinibitsRequestOptions, timeout =
log.trace('[fetchApi] error responseJson', responseJson)
if(error === Object(error)) {
throw new AppError(error.name || Err.NETWORK_ERROR, error.message || '', {caller: 'fetchApi', message: error.params?.message || '', status: response.status, url})
throw new AppError(error.name || Err.NETWORK_ERROR, error.message || '', {caller: error.params?.caller || 'fetchApi', message: error.params?.message || undefined, status: response.status, url})
} else {
throw new AppError(Err.NETWORK_ERROR, String(error), {caller: 'fetchApi', status: response.status, url})
}
+1906 -1316
View File
File diff suppressed because it is too large Load Diff