@riocrypto/common-server 1.0.516 → 1.0.517

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.
@@ -95,17 +95,8 @@ class FireblocksClient {
95
95
  }
96
96
  getVaultCryptoBalance(crypto) {
97
97
  return __awaiter(this, void 0, void 0, function* () {
98
- let vault = yield this.fireblocks.getVaultAccountById("2");
99
- let balance = 0;
100
- if (!(vault === null || vault === void 0 ? void 0 : vault.assets)) {
101
- throw new Error();
102
- }
103
- vault.assets.forEach((asset) => {
104
- if (asset.id === crypto) {
105
- balance += Number(asset.available);
106
- }
107
- });
108
- return balance;
98
+ const vaultAsset = yield this.fireblocks.getVaultAccountAsset("2", crypto);
99
+ return Number(vaultAsset.available) || 0;
109
100
  });
110
101
  }
111
102
  getExchangeCryptoBalance(crypto) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.516",
3
+ "version": "1.0.517",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",