Upgrade to RN077

This commit is contained in:
minibits-cash
2025-02-04 08:35:31 +01:00
parent 9e057ba698
commit 6fd930e851
6 changed files with 391 additions and 393 deletions
+1 -1
View File
@@ -7,4 +7,4 @@ insert_final_newline = true
[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
indent_size = 4
@@ -1,13 +0,0 @@
diff --git a/node_modules/react-native-nitro-sqlite/cpp/operations.cpp b/node_modules/react-native-nitro-sqlite/cpp/operations.cpp
index 0655754..88e80cd 100644
--- a/node_modules/react-native-nitro-sqlite/cpp/operations.cpp
+++ b/node_modules/react-native-nitro-sqlite/cpp/operations.cpp
@@ -165,7 +165,7 @@ SQLiteExecuteQueryResult sqliteExecute(const std::string& dbName, const std::str
switch (column_type) {
case SQLITE_INTEGER: {
- auto column_value = sqlite3_column_int64(statement, i);
+ auto column_value = sqlite3_column_double(statement, i);
row[column_name] = column_value;
break;
}
+22 -22
View File
@@ -11,18 +11,18 @@ export interface TransactionRecord {
fee: number
unit: MintUnit
data: string
sentFrom?: string
sentTo?: string
profile?: string
memo?: string
zapRequest?: string
inputToken?: string
outputToken?: string
proof?: string
sentFrom?: string | null
sentTo?: string | null
profile?: string | null
memo?: string | null
zapRequest?: string | null
inputToken?: string | null
outputToken?: string | null
proof?: string | null
mint: string
balanceAfter?: number
noteToSelf?: string
tags?: Array<string>
balanceAfter?: number | null
noteToSelf?: string | null
tags?: Array<string> | null
status: TransactionStatus
createdAt: Date
}
@@ -63,18 +63,18 @@ export const TransactionModel = types
fee: types.optional(types.integer, 0),
unit: types.frozen<MintUnit>(),
data: types.string,
sentFrom: types.maybe(types.string),
sentTo: types.maybe(types.string),
profile: types.maybe(types.string),
memo: types.maybe(types.string),
sentFrom: types.maybe(types.maybeNull(types.string)),
sentTo: types.maybe(types.maybeNull(types.string)),
profile: types.maybe(types.maybeNull(types.string)),
memo: types.maybe(types.maybeNull(types.string)),
mint: types.string,
zapRequest: types.maybe(types.string),
inputToken: types.maybe(types.string),
outputToken: types.maybe(types.string),
proof: types.maybe(types.string),
balanceAfter: types.maybe(types.integer),
noteToSelf: types.maybe(types.string),
tags: types.maybe(types.array(types.string)),
zapRequest: types.maybe(types.maybeNull(types.string)),
inputToken: types.maybe(types.maybeNull(types.string)),
outputToken: types.maybe(types.maybeNull(types.string)),
proof: types.maybe(types.maybeNull(types.string)),
balanceAfter: types.maybe(types.maybeNull(types.integer)),
noteToSelf: types.maybe(types.maybeNull(types.string)),
tags: types.maybe(types.maybeNull(types.array(types.string))),
status: types.frozen<TransactionStatus>(),
createdAt: types.optional(types.Date, new Date()),
})
+4 -4
View File
@@ -196,11 +196,11 @@ export const TransactionsStoreModel = types
}),
addToHistory(limit: number, offset: number, onlyPending: boolean){
// Appends transaction to the map and adds reference to history from database.
const dbTransactions = Database.getTransactions(limit, offset, onlyPending)
log.trace('[addToHistory] dbResult ids', {ids: dbTransactions.map(t => t.id)})
const result = Database.getTransactions(limit, offset, onlyPending)
log.trace('[addToHistory] dbResult ids', {ids: result?._array.map(t => t.id)})
if (dbTransactions && dbTransactions.length > 0) {
for (const dbTransaction of dbTransactions) {
if (result && result.length > 0) {
for (const dbTransaction of result._array) {
const createdAt = new Date(dbTransaction.createdAt)
const inStoreTransaction = {...dbTransaction, createdAt}
+15 -2
View File
@@ -4,7 +4,7 @@ import { isObj } from '@cashu/cashu-ts/src/utils'
import Clipboard from '@react-native-clipboard/clipboard'
import { observer } from 'mobx-react-lite'
import { getSnapshot } from 'mobx-state-tree'
import { DimensionValue, LayoutAnimation, Platform, TextStyle, UIManager, View, ViewStyle } from 'react-native'
import { DimensionValue, Image, LayoutAnimation, Platform, TextStyle, UIManager, View, ViewStyle } from 'react-native'
import JSONTree from 'react-native-json-tree'
import {
$sizeStyles,
@@ -157,6 +157,18 @@ export const MintInfoScreen: FC<SettingsStackScreenProps<'MintInfo'>> = observer
return (
<Screen contentContainerStyle={$screen} preset="scroll">
<View style={[$headerContainer, {backgroundColor: headerBg, justifyContent: 'space-around', paddingBottom: spacing.huge}]}>
{mintInfo && mintInfo.icon_url ? (
<Image
style={
{
width: spacing.extraLarge,
height: spacing.extraLarge,
borderRadius: spacing.small,
}
}
source={{uri: mintInfo.icon_url}}
/>
):(
<View
style={{
marginEnd: spacing.small,
@@ -173,6 +185,7 @@ export const MintInfoScreen: FC<SettingsStackScreenProps<'MintInfo'>> = observer
fill='white'
/>
</View>
)}
<Text preset='subheading' text={mintInfo?.name ?? mint?.shortname} style={{color: headerTitle}}/>
{mint?.units && (
<View style={{flexDirection: 'row'}}>
@@ -494,7 +507,7 @@ function ContactCard(props: { info: GetInfoResponse, popupMessage: (msg: string)
}
/** don't render these because they're rendered in separate components */
const detailsHiddenKeys = new Set(['name', 'motd', 'description', 'description_long', 'nuts', 'contact'])
const detailsHiddenKeys = new Set(['name', 'motd', 'description', 'description_long', 'nuts', 'contact', 'icon_url', 'time'])
/** key-value pairs of details about the mint */
function MintInfoDetails(props: { info: GetInfoResponse, popupMessage: (msg: string) => void }) {
-2
View File
@@ -18,9 +18,7 @@ import {
import codePush, { RemotePackage } from 'react-native-code-push'
import {moderateScale, verticalScale} from '@gocodingnow/rn-size-matters'
import { SvgXml } from 'react-native-svg'
import notifee, { AndroidImportance } from '@notifee/react-native'
import { NavigationState, Route, TabBar, TabView } from 'react-native-tab-view'
import { NotificationService, TASK_QUEUE_CHANNEL_ID, TASK_QUEUE_CHANNEL_NAME } from '../services/notificationService'
import {useThemeColor, spacing, colors, typography} from '../theme'
import {
Button,