@riocrypto/common-server 1.0.608 → 1.0.609

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { Crypto } from "@riocrypto/common";
3
3
  declare class FireblocksClient {
4
4
  fireblocks: FireblocksSDK;
5
5
  constructor(privateKey: string, apiKey: string);
6
- estimateWithdrawFee(crypto: Crypto): Promise<string | undefined>;
6
+ estimateWithdrawFee(crypto: Crypto): Promise<string | 0 | undefined>;
7
7
  withdrawFromExchange(crypto: Crypto, address: string, amountCrypto: number): Promise<void>;
8
8
  withdrawFromVault(crypto: Crypto, address: string, amountCrypto: number): Promise<void>;
9
9
  getVaultCryptoBalance(crypto: Crypto): Promise<number>;
@@ -18,8 +18,15 @@ class FireblocksClient {
18
18
  }
19
19
  estimateWithdrawFee(crypto) {
20
20
  return __awaiter(this, void 0, void 0, function* () {
21
- let estimate = yield this.fireblocks.getFeeForAsset(crypto);
22
- return estimate.medium.networkFee;
21
+ try {
22
+ let estimate = yield this.fireblocks.getFeeForAsset(crypto);
23
+ console.log("sancho", estimate);
24
+ return estimate.medium.networkFee;
25
+ }
26
+ catch (e) {
27
+ console.log(e);
28
+ return 0;
29
+ }
23
30
  });
24
31
  }
25
32
  withdrawFromExchange(crypto, address, amountCrypto) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.608",
3
+ "version": "1.0.609",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@aws-sdk/client-s3": "^3.297.0",
25
25
  "@google-cloud/storage": "^6.9.5",
26
- "@riocrypto/common": "^1.0.581",
26
+ "@riocrypto/common": "^1.0.582",
27
27
  "@types/express": "^4.17.13",
28
28
  "axios": "^0.27.2",
29
29
  "ccxt": "^3.0.30",