Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/(tabs)/receive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function ReceiveScreenContent({ walletContext }: { walletContext: ReturnType<typ
});
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currentWallet?.xpub, currentWallet?.addresses?.length]);
}, [currentWallet?.xpub, currentWallet?.addresses?.length]); // walletService and stable setters/callbacks are intentionally omitted to avoid unnecessary refetch loops

// Spin animation for the refresh icon
useEffect(() => {
Expand Down Expand Up @@ -550,4 +550,4 @@ const styles = StyleSheet.create({
textAlign: 'center',
letterSpacing: 0.2,
},
});
});
4 changes: 2 additions & 2 deletions app/wallet-setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
};

// Verify all required functions are available
const requiredFunctions: (keyof WalletService)[] = ['generateMnemonic', 'validateMnemonic', 'createWallet', 'importWallet'];
const requiredFunctions: Array<keyof WalletService> = ['generateMnemonic', 'validateMnemonic', 'createWallet', 'importWallet'];

Check warning on line 60 in app/wallet-setup.tsx

View workflow job for this annotation

GitHub Actions / ESLint

Array type using 'Array<T>' is forbidden. Use 'T[]' instead
const missingFunctions = requiredFunctions.filter(func => typeof walletService[func] !== 'function');

if (missingFunctions.length > 0) {
Expand Down Expand Up @@ -1428,4 +1428,4 @@
fontSize: 13,
lineHeight: 18,
},
});
});
7 changes: 4 additions & 3 deletions components/AnimatedNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@

useEffect(() => {
animatedValue.value = withTiming(value, { duration });
}, [value, duration, animatedValue]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [value, duration]); // animatedValue is a stable shared value ref and should not be in deps

// Scale animation on value change for emphasis
const scale = useSharedValue(1);
Expand All @@ -45,7 +46,8 @@
scale.value = withSpring(1.02, { damping: 8, stiffness: 300 }, () => {
scale.value = withSpring(1, { damping: 15, stiffness: 400 });
});
}, [value, scale]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [value]); // scale is a stable shared value ref and should not be in deps

const animatedStyle = useAnimatedStyle(() => ({
transform: [{ scale: scale.value }],
Expand All @@ -57,7 +59,6 @@
const text = `${prefix}${format(animatedValue.value)}${suffix}`;
return {
text,
defaultValue: text,
};
});

Expand All @@ -67,7 +68,7 @@
editable={false}
underlineColorAndroid="transparent"
style={[{ padding: 0, margin: 0 }, style]}
animatedProps={animatedProps}

Check failure on line 71 in components/AnimatedNumber.tsx

View workflow job for this annotation

GitHub Actions / TypeScript Build Check

Type 'Partial<{ text: string; }>' is not assignable to type 'AddArrayPropertyType<Partial<AnimatedPropsProp<TextInputProps>> | CSSStyle<TextInputProps>> | undefined'.
/>
</Animated.View>
);
Expand Down
Loading