@riocrypto/common-server 1.0.1303 → 1.0.1304
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.
|
@@ -26,7 +26,8 @@ class FireblocksClient {
|
|
|
26
26
|
estimateWithdrawFee(crypto, address, amountCrypto) {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
let fee;
|
|
29
|
-
const cachedResponse =
|
|
29
|
+
const cachedResponse = cache2.get(`estimateWithdrawFee(${crypto}, ${address}, ${amountCrypto})`);
|
|
30
|
+
console.log(`estimateWithdrawFee(${crypto}, ${address}, ${amountCrypto})`, cachedResponse);
|
|
30
31
|
if (cachedResponse) {
|
|
31
32
|
fee = cachedResponse;
|
|
32
33
|
}
|
|
@@ -47,6 +48,7 @@ class FireblocksClient {
|
|
|
47
48
|
operation: fireblocks_sdk_1.TransactionOperation.TRANSFER,
|
|
48
49
|
});
|
|
49
50
|
let fee = estimate.medium.networkFee;
|
|
51
|
+
console.log("fee", fee);
|
|
50
52
|
cache.set(`estimateWithdrawFee(${crypto}, ${address}, ${amountCrypto})`, fee);
|
|
51
53
|
}
|
|
52
54
|
return fee;
|
|
@@ -107,6 +109,7 @@ class FireblocksClient {
|
|
|
107
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
110
|
let balance = 0;
|
|
109
111
|
const cachedResponse = cache.get(`getTotalVaultUSDBalance(${vaultId})`);
|
|
112
|
+
console.log(`getTotalVaultUSDBalance(${vaultId})`, cachedResponse);
|
|
110
113
|
if (cachedResponse) {
|
|
111
114
|
balance = cachedResponse;
|
|
112
115
|
}
|
|
@@ -127,6 +130,7 @@ class FireblocksClient {
|
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
}
|
|
133
|
+
console.log("balance", balance);
|
|
130
134
|
cache.set(`getTotalVaultUSDBalance(${vaultId})`, balance);
|
|
131
135
|
}
|
|
132
136
|
return balance;
|