@riocrypto/common-server 1.0.1688 → 1.0.1689

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.
@@ -15,7 +15,7 @@ declare class FireblocksClient {
15
15
  getExchangeFiatBalance(): Promise<number>;
16
16
  getTransactions(vaultId: string, crypto: Crypto, nextPage?: string): Promise<any>;
17
17
  getDepositAddress(vaultId: string, crypto: Crypto): Promise<string>;
18
- createVault(userId: string, name: string, type: "transactional" | "managed"): Promise<string>;
18
+ createVault(userId: string, name: string, type: "transactional" | "managed", number?: number): Promise<string>;
19
19
  createWallet(vaultId: string, crypto: Crypto): Promise<string>;
20
20
  internalTransfer(rioId: string, crypto: Crypto, sourceVaultId: string, destinationVaultId: string, amountCrypto: number, notes?: string): Promise<string>;
21
21
  externalTransfer(rioId: string, crypto: Crypto, sourceVaultId: string, destinationAddress: string, amountCrypto: number, notes?: string): Promise<string>;
@@ -246,12 +246,15 @@ class FireblocksClient {
246
246
  return addresses[0].address;
247
247
  });
248
248
  }
249
- createVault(userId, name, type) {
249
+ createVault(userId, name, type, number) {
250
250
  return __awaiter(this, void 0, void 0, function* () {
251
251
  if ([common_1.RioEnv.Sandbox, common_1.RioEnv.Local].includes(process.env.RIO_ENV)) {
252
252
  throw new Error("Vault creation is disabled in sandbox mode.");
253
253
  }
254
- const vault = yield this.fireblocks.createVaultAccount(`${name} - ${userId} - ${type}`, false, userId, true);
254
+ let vaultName = number
255
+ ? `${name} - ${userId} - ${type} - ${number}`
256
+ : `${name} - ${userId} - ${type}`;
257
+ const vault = yield this.fireblocks.createVaultAccount(vaultName, false, userId, true);
255
258
  return vault.id;
256
259
  });
257
260
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1688",
3
+ "version": "1.0.1689",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",