FIX: eslint errors

This commit is contained in:
Gabriele Genta 2021-07-17 22:58:24 +02:00 committed by Overtorment
parent 93321f06fb
commit 170e5a742f
7 changed files with 7 additions and 6 deletions

View File

@ -4,7 +4,7 @@ import { Platform } from 'react-native';
import loc from './loc'; import loc from './loc';
const prompt = require('./blue_modules/prompt'); const prompt = require('./blue_modules/prompt');
const currency = require('./blue_modules/currency'); const currency = require('./blue_modules/currency');
const BlueElectrum = require('./blue_modules/BlueElectrum'); // eslint-disable-line no-unused-vars const BlueElectrum = require('./blue_modules/BlueElectrum'); // eslint-disable-line @typescript-eslint/no-unused-vars
const BlueApp = new AppStorage(); const BlueApp = new AppStorage();
// If attempt reaches 10, a wipe keychain option will be provided to the user. // If attempt reaches 10, a wipe keychain option will be provided to the user.
let unlockAttempt = 0; let unlockAttempt = 0;

View File

@ -158,6 +158,7 @@ class DeeplinkSchemaMatch {
const safelloStateToken = urlObject.query['safello-state-token']; const safelloStateToken = urlObject.query['safello-state-token'];
let wallet; let wallet;
// eslint-disable-next-line no-unreachable-loop
for (const w of context.wallets) { for (const w of context.wallets) {
wallet = w; wallet = w;
break; break;

View File

@ -348,6 +348,7 @@ export class HDSegwitBech32Transaction {
let add = 0; let add = 0;
while (add <= 128) { while (add <= 128) {
// eslint-disable-next-line no-var
var { tx, inputs, outputs, fee } = this._wallet.createTransaction( var { tx, inputs, outputs, fee } = this._wallet.createTransaction(
unconfirmedUtxos, unconfirmedUtxos,
[{ address: myAddress }], [{ address: myAddress }],

View File

@ -162,7 +162,7 @@ export default class Lnurl {
fixed: min === max, fixed: min === max,
min, min,
max, max,
domain: data.callback.match(new RegExp('https://([^/]+)/'))[1], domain: data.callback.match(/https:\/\/([^/]+)\//)[1],
metadata: data.metadata, metadata: data.metadata,
description, description,
image, image,

View File

@ -39,7 +39,6 @@ function DeviceQuickActions() {
return data; return data;
}; };
DeviceQuickActions.getEnabled = async () => { DeviceQuickActions.getEnabled = async () => {
try { try {
const isEnabled = await AsyncStorage.getItem(DeviceQuickActions.STORAGE_KEY); const isEnabled = await AsyncStorage.getItem(DeviceQuickActions.STORAGE_KEY);

View File

@ -16,7 +16,7 @@ const styles = StyleSheet.create({
const Settings = () => { const Settings = () => {
const { navigate } = useNavigation(); const { navigate } = useNavigation();
// By simply having it here, it'll re-render the UI if language is changed // By simply having it here, it'll re-render the UI if language is changed
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
const { language } = useContext(BlueStorageContext); const { language } = useContext(BlueStorageContext);
return ( return (

View File

@ -44,7 +44,7 @@ describe('Entropy reducer and format', () => {
it('handles 256 bits correctly', () => { it('handles 256 bits correctly', () => {
let state = eReducer(undefined, { type: null }); // get init state let state = eReducer(undefined, { type: null }); // get init state
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
for (const i of [...Array(256)]) { for (const i of [...Array(256)]) {
state = eReducer(state, { type: 'push', value: 1, bits: 1 }); state = eReducer(state, { type: 'push', value: 1, bits: 1 });
} }
@ -143,7 +143,7 @@ describe('convertToBuffer function', () => {
it('256 bits or 32bytes', () => { it('256 bits or 32bytes', () => {
let state = eReducer(undefined, { type: null }); // get init state let state = eReducer(undefined, { type: null }); // get init state
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
for (const i of [...Array(256)]) { for (const i of [...Array(256)]) {
state = eReducer(state, { type: 'push', value: 1, bits: 1 }); state = eReducer(state, { type: 'push', value: 1, bits: 1 });
} }