@riocrypto/common-server 1.0.644 → 1.0.646

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.
@@ -9,7 +9,7 @@ declare class FireblocksClient {
9
9
  getVaultCryptoBalance(crypto: Crypto): Promise<number>;
10
10
  getExchangeCryptoBalance(crypto: Crypto): Promise<number>;
11
11
  getExchangeFiatBalance(): Promise<number>;
12
- getTransactions(crypto: Crypto): Promise<any>;
12
+ getTransactions(crypto: Crypto, nextPage?: string): Promise<any>;
13
13
  getDepositAddress(crypto: Crypto): Promise<string>;
14
14
  }
15
15
  export declare const buildFireblocksClient: () => Promise<FireblocksClient>;
@@ -108,11 +108,11 @@ class FireblocksClient {
108
108
  return balance;
109
109
  });
110
110
  }
111
- getTransactions(crypto) {
111
+ getTransactions(crypto, nextPage) {
112
112
  return __awaiter(this, void 0, void 0, function* () {
113
113
  let transactions = yield this.fireblocks.getTransactionsWithPageInfo({
114
114
  assets: crypto,
115
- });
115
+ }, nextPage);
116
116
  return transactions;
117
117
  });
118
118
  }
@@ -138,7 +138,7 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
138
138
  try {
139
139
  const BusinessUser = yield (0, business_user_1.buildBusinessUser)(mongoose);
140
140
  businessUser = yield BusinessUser.findOne({
141
- authId: req.currentAuth.id,
141
+ authIds: { $in: [req.currentAuth.id] },
142
142
  attributes: { $ne: common_1.UserAttribute.deleted },
143
143
  });
144
144
  }
@@ -174,7 +174,7 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
174
174
  try {
175
175
  const BusinessUser = yield (0, business_user_1.buildBusinessUser)(mongoose);
176
176
  businessUser = yield BusinessUser.findOne({
177
- authId: req.currentAuth.id,
177
+ authIds: { $in: [req.currentAuth.id] },
178
178
  });
179
179
  if (!businessUser) {
180
180
  throw new Error();
@@ -197,7 +197,7 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
197
197
  try {
198
198
  const BusinessUser = yield (0, business_user_1.buildBusinessUser)(mongoose);
199
199
  brokerBusinessUser = yield BusinessUser.findOne({
200
- authId: req.currentAuth.id,
200
+ authIds: { $in: [req.currentAuth.id] },
201
201
  attributes: { $in: [common_1.UserAttribute.broker] },
202
202
  });
203
203
  if (!brokerBusinessUser) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.644",
3
+ "version": "1.0.646",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "@aws-sdk/client-s3": "^3.297.0",
25
25
  "@everapi/currencyapi-js": "^1.0.6",
26
26
  "@google-cloud/storage": "^6.9.5",
27
- "@riocrypto/common": "^1.0.589",
27
+ "@riocrypto/common": "^1.0.590",
28
28
  "@types/express": "^4.17.13",
29
29
  "axios": "^0.27.2",
30
30
  "ccxt": "^3.0.30",