Skip to content

Commit

Permalink
Types
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosrdz committed Jan 27, 2022
2 parents 6f32062 + 1bb7680 commit 488f2e5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions class/wallets/abstract-hd-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion class/wallets/legacy-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions models/fiatUnit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand All @@ -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}`];
Expand All @@ -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;
Expand All @@ -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
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 488f2e5

Please sign in to comment.