File tree Expand file tree Collapse file tree 14 files changed +18
-29
lines changed
Expand file tree Collapse file tree 14 files changed +18
-29
lines changed Original file line number Diff line number Diff line change 1010 },
1111 "nursery" : {
1212 "useExplicitType" : " off"
13+ "correctness" : {
14+ "noUnusedFunctionParameters" : " error" ,
15+ "noUnusedVariables" : " error"
1316 },
1417 "performance" : {
1518 "noAccumulatingSpread" : " off"
Original file line number Diff line number Diff line change @@ -164,7 +164,6 @@ const OnchainActivityDetail = ({
164164 const dispatch = useAppDispatch ( ) ;
165165 const contacts = useAppSelector ( contactsSelector ) ;
166166 const tags = useAppSelector ( ( state ) => tagSelector ( state , id ) ) ;
167- const selectedNetwork = useAppSelector ( selectedNetworkSelector ) ;
168167 const activityItems = useAppSelector ( activityItemsSelector ) ;
169168 const boostedTransactions = useAppSelector ( boostedTransactionsSelector ) ;
170169 const transfer = useAppSelector ( ( state ) => {
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ const AddContact = ({
5050
5151 try {
5252 parse ( contactUrl ) ;
53- } catch ( e ) {
53+ } catch ( _e ) {
5454 setError ( t ( 'contact_error_key' ) ) ;
5555 return ;
5656 }
@@ -60,7 +60,7 @@ const AddContact = ({
6060 setError ( t ( 'contact_error_yourself' ) ) ;
6161 return ;
6262 }
63- } catch ( e ) { }
63+ } catch ( _e ) { }
6464
6565 const onError = ( ) : void => {
6666 setError ( t ( 'contact_error_key' ) ) ;
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ const ContactEdit = ({
4545 const myProfile = useMemo ( ( ) => {
4646 try {
4747 return parse ( myProfileUrl ) . id === parse ( url ) . id ;
48- } catch ( e ) {
48+ } catch ( _e ) {
4949 return false ;
5050 }
5151 } , [ myProfileUrl , url ] ) ;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ const isValidURL = (data: string): boolean => {
6767 }
6868
6969 return isValidDomainOrIP ;
70- } catch ( e ) {
70+ } catch ( _e ) {
7171 // If URL constructor fails, it's not a valid URL
7272 return false ;
7373 }
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ const migrations = {
7676 for ( const key of keys ) {
7777 mmkv . delete ( key ) ;
7878 }
79- } catch ( e ) { }
79+ } catch ( _e ) { }
8080
8181 return state ;
8282 } ,
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export const wipeApp = async ({
3535 try {
3636 const wallet = getOnChainWallet ( ) ;
3737 await wallet . stop ( ) ;
38- } catch ( e ) { }
38+ } catch ( _e ) { }
3939
4040 // Reset Redux stores & persisted storage
4141 dispatch ( { type : actions . WIPE_APP } ) ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export const btcToSats = (balance: number): number => {
1313 . value ( )
1414 . toFixed ( 0 ) ,
1515 ) ;
16- } catch ( e ) {
16+ } catch ( _e ) {
1717 return 0 ;
1818 }
1919} ;
@@ -75,7 +75,7 @@ export const fiatToBitcoinUnit = ({
7575 . toFixed ( denomination === EDenomination . modern ? 0 : 8 ) ; // satoshi cannot be a fractional number
7676
7777 return Number ( value ) ;
78- } catch ( e ) {
78+ } catch ( _e ) {
7979 return 0 ;
8080 }
8181} ;
Original file line number Diff line number Diff line change @@ -191,19 +191,6 @@ export const capitalize = (text: string): string => {
191191 return text . charAt ( 0 ) . toUpperCase ( ) + text . slice ( 1 ) ;
192192} ;
193193
194- /**
195- * Returns the last word in a string.
196- * @param {string } phrase
197- */
198- export const getLastWordInString = ( phrase : string ) : string => {
199- try {
200- const n = phrase . split ( ' ' ) ;
201- return n [ n . length - 1 ] ;
202- } catch ( e ) {
203- return phrase ;
204- }
205- } ;
206-
207194export const roundUpToTwoDecimals = ( num : number ) : number => {
208195 return Math . ceil ( num * 100 ) / 100 ;
209196} ;
@@ -509,7 +496,7 @@ export const openURL = async (url: string): Promise<boolean> => {
509496export const openAppURL = async ( url : string ) : Promise < void > => {
510497 try {
511498 await Linking . openURL ( url ) ;
512- } catch ( error ) {
499+ } catch ( _e ) {
513500 console . log ( 'Cannot open url: ' , url ) ;
514501 }
515502} ;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ i18nICU
5454 try {
5555 // @ts -ignore __setDefaultTimeZone doesn't exist in native API
5656 Intl . DateTimeFormat . __setDefaultTimeZone ( timeZone ) ;
57- } catch ( e ) {
57+ } catch ( _e ) {
5858 console . log ( `error settings timezone to: ${ timeZone } fallback to UTC` ) ;
5959 // @ts -ignore __setDefaultTimeZone doesn't exist in native API
6060 Intl . DateTimeFormat . __setDefaultTimeZone ( 'UTC' ) ;
@@ -80,7 +80,7 @@ i18nICU
8080 if ( Intl . RelativeTimeFormat . polyfilled ) {
8181 await relativeTimeFormatPolyfills [ lang ] ?.( ) ;
8282 }
83- } catch ( e ) {
83+ } catch ( _e ) {
8484 console . warn ( 'Error loading polyfill for language: ' , lang ) ;
8585 }
8686 } ) ;
You can’t perform that action at this time.
0 commit comments