@riocrypto/common-server 1.0.2605 → 1.0.2607

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.
@@ -10,7 +10,7 @@ interface STPMXNWithdrawalAttrs {
10
10
  bulkBankPayoutId?: string;
11
11
  internalTransferId?: string;
12
12
  STPWithdrawals: {
13
- id?: number;
13
+ STPWithdrawalId?: number;
14
14
  partNumber: number;
15
15
  amount: number;
16
16
  reference: string;
@@ -29,7 +29,7 @@ interface STPMXNWithdrawalDoc extends Document {
29
29
  partsCompleted?: number;
30
30
  orderVersion?: number;
31
31
  STPWithdrawals: {
32
- id?: number;
32
+ STPWithdrawalId?: number;
33
33
  partNumber: number;
34
34
  amount: number;
35
35
  status: STPMXNWithdrawalStatus;
@@ -37,7 +37,7 @@ const buildSTPMXNWithdrawal = (mongoose) => {
37
37
  STPWithdrawals: {
38
38
  type: [
39
39
  {
40
- id: Number,
40
+ STPWithdrawalId: Number,
41
41
  amount: Number,
42
42
  status: {
43
43
  type: String,
@@ -10,7 +10,7 @@ interface BitsoMXNWithdrawalAttrs {
10
10
  bankAccountVerificationId?: string;
11
11
  multipartLiquidityOrderId?: string;
12
12
  bitsoWithdrawals: {
13
- id?: string;
13
+ bitsoWithdrawalId?: string;
14
14
  status: BitsoMXNWithdrawalStatus;
15
15
  amount: number;
16
16
  reference: string;
@@ -29,7 +29,7 @@ interface BitsoMXNWithdrawalDoc extends Document {
29
29
  partsCompleted?: number;
30
30
  orderVersion?: number;
31
31
  bitsoWithdrawals: {
32
- id?: string;
32
+ bitsoWithdrawalId?: string;
33
33
  status: BitsoMXNWithdrawalStatus;
34
34
  amount: number;
35
35
  reference: string;
@@ -36,7 +36,7 @@ const buildBitsoMXNWithdrawal = (mongoose) => {
36
36
  bitsoWithdrawals: {
37
37
  type: [
38
38
  {
39
- id: String,
39
+ bitsoWithdrawalId: String,
40
40
  status: String,
41
41
  amount: Number,
42
42
  reference: String,
@@ -53,6 +53,15 @@ const buildBitsoMXNWithdrawal = (mongoose) => {
53
53
  ret.id = ret._id.valueOf();
54
54
  delete ret._id;
55
55
  delete ret.__v;
56
+ if (ret.bitsoWithdrawals && Array.isArray(ret.bitsoWithdrawals)) {
57
+ ret.bitsoWithdrawals = ret.bitsoWithdrawals.map((withdrawal) => {
58
+ if (withdrawal._id) {
59
+ withdrawal.id = withdrawal._id.valueOf();
60
+ delete withdrawal._id;
61
+ }
62
+ return withdrawal;
63
+ });
64
+ }
56
65
  },
57
66
  },
58
67
  });
@@ -12,7 +12,7 @@ interface FireblocksTransferAttrs {
12
12
  numberOfParts?: number;
13
13
  partsCompleted?: number;
14
14
  fireblocksTransfers: {
15
- id: string;
15
+ fireblocksTransferId?: string;
16
16
  amount: number;
17
17
  partNumber?: number;
18
18
  status: FireblocksWithdrawalStatus;
@@ -32,7 +32,7 @@ interface FireblocksTransferDoc extends mongoose.Document {
32
32
  numberOfParts?: number;
33
33
  partsCompleted?: number;
34
34
  fireblocksTransfers: {
35
- id: string;
35
+ fireblocksTransferId?: string;
36
36
  amount: number;
37
37
  partNumber?: number;
38
38
  status: FireblocksWithdrawalStatus;
@@ -37,7 +37,7 @@ const buildFireblocksTransfer = (mongoose) => {
37
37
  },
38
38
  fireblocksTransfers: [
39
39
  {
40
- id: {
40
+ fireblocksTransferId: {
41
41
  type: String,
42
42
  },
43
43
  amount: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2605",
3
+ "version": "1.0.2607",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/secret-manager": "^5.3.0",
29
29
  "@google-cloud/storage": "^6.9.5",
30
30
  "@hyperdx/node-opentelemetry": "^0.7.0",
31
- "@riocrypto/common": "^1.0.2406",
31
+ "@riocrypto/common": "^1.0.2408",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",