REF: Use Error type
This commit is contained in:
parent
1ed33b1091
commit
42aefe9e27
@ -86,7 +86,7 @@ export default class SyncedAsyncStorage {
|
||||
console.log('saved, seq num:', text);
|
||||
resolve(text);
|
||||
})
|
||||
.catch(reason => reject(reason));
|
||||
.catch((reason: Error) => reject(reason));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ const QRCodeComponent: React.FC<QRCodeComponentProps> = ({
|
||||
const shareImageBase64 = {
|
||||
url: `data:image/png;base64,${data}`,
|
||||
};
|
||||
Share.open(shareImageBase64).catch((error: any) => console.log(error));
|
||||
Share.open(shareImageBase64).catch((error: Error) => console.log(error));
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ const TransactionsNavigationHeader: React.FC<TransactionsNavigationHeaderProps>
|
||||
wallet
|
||||
.allowOnchainAddress()
|
||||
.then((value: boolean) => setAllowOnchainAddress(value))
|
||||
.catch((e: any) => {
|
||||
.catch((e: Error) => {
|
||||
console.log('This Lndhub wallet does not have an onchain address API.');
|
||||
setAllowOnchainAddress(false);
|
||||
});
|
||||
|
||||
@ -22,7 +22,7 @@ function useAsyncPromise<T>(promiseFn: () => Promise<T>) {
|
||||
setLoading(false);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err: Error) => {
|
||||
if (isMounted) {
|
||||
setError(err);
|
||||
setLoading(false);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user