mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
Types
This commit is contained in:
commit
488f2e56d3
5 changed files with 16 additions and 16 deletions
|
@ -133,7 +133,7 @@ export class AbstractHDWallet extends LegacyWallet {
|
|||
let txs = [];
|
||||
try {
|
||||
txs = await BlueElectrum.getTransactionsByAddress(address);
|
||||
} catch (Err) {
|
||||
} catch (Err: any) {
|
||||
console.warn('BlueElectrum.getTransactionsByAddress()', Err.message);
|
||||
}
|
||||
if (txs.length === 0) {
|
||||
|
@ -171,7 +171,7 @@ export class AbstractHDWallet extends LegacyWallet {
|
|||
let txs = [];
|
||||
try {
|
||||
txs = await BlueElectrum.getTransactionsByAddress(address);
|
||||
} catch (Err) {
|
||||
} catch (Err: any) {
|
||||
console.warn('BlueElectrum.getTransactionsByAddress()', Err.message);
|
||||
}
|
||||
if (txs.length === 0) {
|
||||
|
|
|
@ -620,7 +620,7 @@ export class LegacyWallet extends AbstractWallet {
|
|||
// undefined, true so it can verify Electrum signatures without errors
|
||||
try {
|
||||
return bitcoinMessage.verify(message, address, signature, undefined, true);
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
if (e.message === 'checkSegwitAlways can only be used with a compressed pubkey signature flagbyte') {
|
||||
// If message created with uncompressed private key, it will throw this error
|
||||
// in this case we should re-try with checkSegwitAlways flag off
|
||||
|
|
|
@ -14,7 +14,7 @@ const RateExtractors = {
|
|||
try {
|
||||
const res = await fetch(`https://api.coindesk.com/v1/bpi/currentprice/${ticker}.json`);
|
||||
json = await res.json();
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
throw new Error(`Could not update rate for ${ticker}: ${e.message}`);
|
||||
}
|
||||
let rate = json?.bpi?.[ticker]?.rate_float; // eslint-disable-line
|
||||
|
@ -30,7 +30,7 @@ const RateExtractors = {
|
|||
try {
|
||||
const res = await fetch(`https://api.yadio.io/json/${ticker}`);
|
||||
json = await res.json();
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
throw new Error(`Could not update rate for ${ticker}: ${e.message}`);
|
||||
}
|
||||
let rate = json?.[ticker]?.price;
|
||||
|
@ -46,7 +46,7 @@ const RateExtractors = {
|
|||
try {
|
||||
const res = await fetch('https://bitcoinduliban.org/api.php?key=lbpusd');
|
||||
json = await res.json();
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
throw new Error(`Could not update rate for ${ticker}: ${e.message}`);
|
||||
}
|
||||
let rate = json?.[`BTC/${ticker}`];
|
||||
|
@ -62,7 +62,7 @@ const RateExtractors = {
|
|||
try {
|
||||
const res = await fetch('https://api.exir.io/v1/ticker?symbol=btc-irt');
|
||||
json = await res.json();
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
throw new Error(`Could not update rate for ${ticker}: ${e.message}`);
|
||||
}
|
||||
let rate = json?.last;
|
||||
|
@ -78,7 +78,7 @@ const RateExtractors = {
|
|||
try {
|
||||
const res = await fetch(`https://api.wazirx.com/api/v2/tickers/btcinr`);
|
||||
json = await res.json();
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
throw new Error(`Could not update rate for ${ticker}: ${e.message}`);
|
||||
}
|
||||
let rate = json?.ticker?.buy; // eslint-disable-line
|
||||
|
|
14
package-lock.json
generated
14
package-lock.json
generated
|
@ -49,7 +49,7 @@
|
|||
"junderw-crc32c": "1.2.0",
|
||||
"lottie-ios": "3.1.9",
|
||||
"lottie-react-native": "4.0.2",
|
||||
"metro-react-native-babel-preset": "0.66.2",
|
||||
"metro-react-native-babel-preset": "0.67.0",
|
||||
"path-browserify": "1.0.1",
|
||||
"payjoin-client": "1.0.1",
|
||||
"process": "0.11.10",
|
||||
|
@ -17199,9 +17199,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/metro-react-native-babel-preset": {
|
||||
"version": "0.66.2",
|
||||
"resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.66.2.tgz",
|
||||
"integrity": "sha512-H/nLBAz0MgfDloSe1FjyH4EnbokHFdncyERvLPXDACY3ROVRCeUyFNo70ywRGXW2NMbrV4H7KUyU4zkfWhC2HQ==",
|
||||
"version": "0.67.0",
|
||||
"resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.67.0.tgz",
|
||||
"integrity": "sha512-tgTG4j0SKwLHbLRELMmgkgkjV1biYkWlGGKOmM484/fJC6bpDikdaFhfjsyE+W+qt7I5szbCPCickMTNQ+zwig==",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.14.0",
|
||||
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
||||
|
@ -38497,9 +38497,9 @@
|
|||
}
|
||||
},
|
||||
"metro-react-native-babel-preset": {
|
||||
"version": "0.66.2",
|
||||
"resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.66.2.tgz",
|
||||
"integrity": "sha512-H/nLBAz0MgfDloSe1FjyH4EnbokHFdncyERvLPXDACY3ROVRCeUyFNo70ywRGXW2NMbrV4H7KUyU4zkfWhC2HQ==",
|
||||
"version": "0.67.0",
|
||||
"resolved": "https://registry.npmjs.org/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.67.0.tgz",
|
||||
"integrity": "sha512-tgTG4j0SKwLHbLRELMmgkgkjV1biYkWlGGKOmM484/fJC6bpDikdaFhfjsyE+W+qt7I5szbCPCickMTNQ+zwig==",
|
||||
"requires": {
|
||||
"@babel/core": "^7.14.0",
|
||||
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
"junderw-crc32c": "1.2.0",
|
||||
"lottie-ios": "3.1.9",
|
||||
"lottie-react-native": "4.0.2",
|
||||
"metro-react-native-babel-preset": "0.66.2",
|
||||
"metro-react-native-babel-preset": "0.67.0",
|
||||
"path-browserify": "1.0.1",
|
||||
"payjoin-client": "1.0.1",
|
||||
"process": "0.11.10",
|
||||
|
|
Loading…
Add table
Reference in a new issue