improve swap reliabilty by increasing swap time

This commit is contained in:
Blake Kaufman
2025-11-16 18:39:00 -05:00
parent 9cb57aed57
commit 2288d309f6
3 changed files with 8 additions and 7 deletions
@@ -183,8 +183,8 @@ export default function HomeLightning() {
try {
if (!sparkInformation.identityPubKey || !sparkInformation.didConnect)
return;
startLiquidEventListener(2);
startRootstockEventListener({ intervalMs: 30000 });
startLiquidEventListener(6);
startRootstockEventListener({ intervalMs: 60000 });
const response = await fullRestoreSparkState({
sparkAddress: sparkInformation.sparkAddress,
+1 -1
View File
@@ -150,7 +150,7 @@ export default function ReceivePaymentHome(props) {
sparkInformation,
});
if (selectedRecieveOption === 'Liquid') {
startLiquidEventListener();
startLiquidEventListener(60);
} else if (selectedRecieveOption === 'Rootstock') {
startRootstockEventListener({ durationMs: 1200000 });
}
+5 -4
View File
@@ -12,7 +12,7 @@ import {
SdkEventVariant,
} from '@breeztech/react-native-breez-sdk-liquid';
import startLiquidUpdateInterval from '../app/functions/liquidBackupUpdate';
import {useNodeContext} from './nodeContext';
import { useNodeContext } from './nodeContext';
const LiquidEventContext = createContext(null);
@@ -21,8 +21,9 @@ const DEBOUNCE_DELAY = 2000;
const REQUIRED_SYNC_COUNT = 2;
// Create a context for the WebView ref
export function LiquidEventProvider({children}) {
const {toggleLiquidNodeInformation, liquidNodeInformation} = useNodeContext();
export function LiquidEventProvider({ children }) {
const { toggleLiquidNodeInformation, liquidNodeInformation } =
useNodeContext();
const initialLiquidRun = useRef(null);
const liquidEventRunCounter = useRef(0);
const numberOfLiquidEvents = useRef(DEFAULT_EVENT_LIMIT);
@@ -35,7 +36,7 @@ export function LiquidEventProvider({children}) {
if (!liquidNodeInformation.didConnectToNode) return;
if (initialLiquidRun.current) return;
initialLiquidRun.current = true;
startLiquidEventListener(3);
startLiquidEventListener(6);
}, [liquidNodeInformation.didConnectToNode]);
const cleanup = useCallback(() => {