mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-05 19:28:26 +00:00
Patch modal to prevent warnings
This commit is contained in:
@@ -0,0 +1,54 @@
|
|||||||
|
diff --git a/node_modules/react-native-modal/dist/modal.js b/node_modules/react-native-modal/dist/modal.js
|
||||||
|
index 74edee4..9c5bc1f 100644
|
||||||
|
--- a/node_modules/react-native-modal/dist/modal.js
|
||||||
|
+++ b/node_modules/react-native-modal/dist/modal.js
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import * as React from 'react';
|
||||||
|
-import { Animated, DeviceEventEmitter, Dimensions, InteractionManager, KeyboardAvoidingView, Modal, PanResponder, Platform, TouchableWithoutFeedback, View, } from 'react-native';
|
||||||
|
+import { Animated, DeviceEventEmitter, Dimensions, KeyboardAvoidingView, Modal, PanResponder, Platform, TouchableWithoutFeedback, View, } from 'react-native';
|
||||||
|
import * as animatable from 'react-native-animatable';
|
||||||
|
import { buildAnimations, initializeAnimations, reversePercentage, } from './utils';
|
||||||
|
import styles from './modal.style';
|
||||||
|
@@ -116,7 +116,7 @@ export class ReactNativeModal extends React.Component {
|
||||||
|
this.didUpdateDimensionsEmitter.remove();
|
||||||
|
}
|
||||||
|
if (this.interactionHandle) {
|
||||||
|
- InteractionManager.clearInteractionHandle(this.interactionHandle);
|
||||||
|
+ cancelIdleCallback(this.interactionHandle);
|
||||||
|
this.interactionHandle = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -394,14 +394,14 @@ export class ReactNativeModal extends React.Component {
|
||||||
|
if (this.contentRef) {
|
||||||
|
this.props.onModalWillShow && this.props.onModalWillShow();
|
||||||
|
if (this.interactionHandle == null) {
|
||||||
|
- this.interactionHandle = InteractionManager.createInteractionHandle();
|
||||||
|
+ this.interactionHandle = requestIdleCallback(() => {});
|
||||||
|
}
|
||||||
|
this.contentRef
|
||||||
|
.animate(this.animationIn, this.props.animationInTiming)
|
||||||
|
.then(() => {
|
||||||
|
this.isTransitioning = false;
|
||||||
|
if (this.interactionHandle) {
|
||||||
|
- InteractionManager.clearInteractionHandle(this.interactionHandle);
|
||||||
|
+ cancelIdleCallback(this.interactionHandle);
|
||||||
|
this.interactionHandle = null;
|
||||||
|
}
|
||||||
|
if (!this.props.isVisible) {
|
||||||
|
@@ -440,14 +440,14 @@ export class ReactNativeModal extends React.Component {
|
||||||
|
if (this.contentRef) {
|
||||||
|
this.props.onModalWillHide && this.props.onModalWillHide();
|
||||||
|
if (this.interactionHandle == null) {
|
||||||
|
- this.interactionHandle = InteractionManager.createInteractionHandle();
|
||||||
|
+ this.interactionHandle = requestIdleCallback(() => {});
|
||||||
|
}
|
||||||
|
this.contentRef
|
||||||
|
.animate(animationOut, this.props.animationOutTiming)
|
||||||
|
.then(() => {
|
||||||
|
this.isTransitioning = false;
|
||||||
|
if (this.interactionHandle) {
|
||||||
|
- InteractionManager.clearInteractionHandle(this.interactionHandle);
|
||||||
|
+ cancelIdleCallback(this.interactionHandle);
|
||||||
|
this.interactionHandle = null;
|
||||||
|
}
|
||||||
|
if (this.props.isVisible) {
|
||||||
+11
-1
@@ -17,6 +17,13 @@ import { generateId } from '../utils/utils'
|
|||||||
import { Proof } from './Proof'
|
import { Proof } from './Proof'
|
||||||
import { CashuProof, CashuUtils } from '../services/cashu/cashuUtils'
|
import { CashuProof, CashuUtils } from '../services/cashu/cashuUtils'
|
||||||
|
|
||||||
|
// Helper function to serialize MeltPreview and convert BigInt to string
|
||||||
|
function serializeMeltPreview(meltPreview: MeltPreview): any {
|
||||||
|
return JSON.parse(JSON.stringify(meltPreview, (_key, value) =>
|
||||||
|
typeof value === 'bigint' ? value.toString() : value
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
export type MintBalance = {
|
export type MintBalance = {
|
||||||
mintUrl: string
|
mintUrl: string
|
||||||
balances: {
|
balances: {
|
||||||
@@ -148,10 +155,13 @@ export const MintProofsCounterModel = types
|
|||||||
return self.meltCounterValues.get(key)!.counterAtMelt
|
return self.meltCounterValues.get(key)!.counterAtMelt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Serialize MeltPreview to handle BigInt values
|
||||||
|
const serializableMeltPreview = meltPreview ? serializeMeltPreview(meltPreview) : undefined
|
||||||
|
|
||||||
self.meltCounterValues.set(key, {
|
self.meltCounterValues.set(key, {
|
||||||
transactionId,
|
transactionId,
|
||||||
counterAtMelt: self.counter,
|
counterAtMelt: self.counter,
|
||||||
meltPreview,
|
meltPreview: serializableMeltPreview as any,
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user