mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-03 20:07:11 +01:00
REF: Use Error type
This commit is contained in:
parent
1ed33b1091
commit
42aefe9e27
4 changed files with 4 additions and 4 deletions
|
@ -86,7 +86,7 @@ export default class SyncedAsyncStorage {
|
||||||
console.log('saved, seq num:', text);
|
console.log('saved, seq num:', text);
|
||||||
resolve(text);
|
resolve(text);
|
||||||
})
|
})
|
||||||
.catch(reason => reject(reason));
|
.catch((reason: Error) => reject(reason));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ const QRCodeComponent: React.FC<QRCodeComponentProps> = ({
|
||||||
const shareImageBase64 = {
|
const shareImageBase64 = {
|
||||||
url: `data:image/png;base64,${data}`,
|
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
|
wallet
|
||||||
.allowOnchainAddress()
|
.allowOnchainAddress()
|
||||||
.then((value: boolean) => setAllowOnchainAddress(value))
|
.then((value: boolean) => setAllowOnchainAddress(value))
|
||||||
.catch((e: any) => {
|
.catch((e: Error) => {
|
||||||
console.log('This Lndhub wallet does not have an onchain address API.');
|
console.log('This Lndhub wallet does not have an onchain address API.');
|
||||||
setAllowOnchainAddress(false);
|
setAllowOnchainAddress(false);
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,7 +22,7 @@ function useAsyncPromise<T>(promiseFn: () => Promise<T>) {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch((err: Error) => {
|
||||||
if (isMounted) {
|
if (isMounted) {
|
||||||
setError(err);
|
setError(err);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue