REF: lint

This commit is contained in:
overtorment 2023-03-15 21:42:53 +00:00
parent 47b0177efe
commit ec85833877
3 changed files with 8 additions and 12 deletions

View File

@ -35,10 +35,6 @@ export default function PaymentCodesList({ route }: NativeStackScreenProps<Payme
setData(newData);
}, [walletID, wallets]);
const shortenPC = (pc: string): string => {
return pc.substring(0, 8) + '...' + pc.substring(pc.length - 8);
};
return (
<View style={styles.container}>
{!walletID ? (
@ -50,7 +46,7 @@ export default function PaymentCodesList({ route }: NativeStackScreenProps<Payme
keyExtractor={(item, index) => item + index}
renderItem={({ item }) => (
<View>
<BlueCopyTextToClipboard truncated={shortenPC(item)} text={item} />
<BlueCopyTextToClipboard truncated text={item} />
</View>
)}
renderSectionHeader={({ section: { title } }) => <Text style={styles.titleText}>{title}</Text>}

View File

@ -3,7 +3,7 @@ const path = require('path');
const mainLocFile = './loc/en.json';
const dirsToInterate = ['components', 'screen', 'blue_modules', 'class'];
const addFiles = ['BlueComponents.js', 'App.js', 'BlueApp.js'];
const addFiles = ['BlueComponents.js', 'App.js', 'BlueApp.js', 'Navigation.js'];
const allowedLocPrefixes = ['loc.lnurl_auth', 'loc.units'];
const allLocKeysHashmap = {}; // loc key -> used or not

View File

@ -6,8 +6,8 @@ const consoleWarnOrig = console.warn;
console.warn = (...args) => {
if (
typeof args[0] === 'string' &&
(args[0]?.startsWith('WARNING: Sending to a future segwit version address can lead to loss of funds') ||
args[0]?.startsWith('only compressed public keys are good'))
(args[0].startsWith('WARNING: Sending to a future segwit version address can lead to loss of funds') ||
args[0].startsWith('only compressed public keys are good'))
) {
return;
}
@ -18,10 +18,10 @@ const consoleLogOrig = console.log;
console.log = (...args) => {
if (
typeof args[0] === 'string' &&
(args[0]?.startsWith('updating exchange rate') ||
args[0]?.startsWith('begin connection') ||
args[0]?.startsWith('TLS Connected to') ||
args[0]?.startsWith('connected to'))
(args[0].startsWith('updating exchange rate') ||
args[0].startsWith('begin connection') ||
args[0].startsWith('TLS Connected to') ||
args[0].startsWith('connected to'))
) {
return;
}