@riocrypto/common-server 1.0.1796 → 1.0.1798

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.
@@ -205,6 +205,9 @@ class BridgeClient {
205
205
  }
206
206
  createExternalAccount(bridgeCustomerId, bankName, accountNumber, routingNumber, accountOwnerName, address) {
207
207
  return __awaiter(this, void 0, void 0, function* () {
208
+ if ([common_1.RioEnv.Sandbox, common_1.RioEnv.Local].includes(process.env.RIO_ENV)) {
209
+ throw new Error("Bridge external accounts are disabled in sandbox mode.");
210
+ }
208
211
  const { data } = yield axios_with_logging_1.default.post(`${this.baseUrl}/v0/customers/${bridgeCustomerId}/external_accounts`, {
209
212
  type: "wire",
210
213
  bank_name: bankName,
@@ -46,6 +46,9 @@ interface OrderAttrs {
46
46
  chainedOrderId?: string;
47
47
  netPrice: number;
48
48
  requestedNetPrice?: number;
49
+ paymentAddressId?: string;
50
+ payoutAddressId?: string;
51
+ payoutBankAccountId?: string;
49
52
  }
50
53
  interface OrderDoc extends Document {
51
54
  quoteId: string;
@@ -93,6 +96,9 @@ interface OrderDoc extends Document {
93
96
  chainedOrderId?: string;
94
97
  netPrice: number;
95
98
  requestedNetPrice?: number;
99
+ paymentAddressId?: string;
100
+ payoutAddressId?: string;
101
+ payoutBankAccountId?: string;
96
102
  }
97
103
  interface OrderModel extends Model<OrderDoc> {
98
104
  build(attrs: OrderAttrs): OrderDoc;
@@ -205,6 +205,15 @@ const buildOrder = (mongoose) => {
205
205
  requestedNetPrice: {
206
206
  type: Number,
207
207
  },
208
+ paymentAddressId: {
209
+ type: String,
210
+ },
211
+ payoutAddressId: {
212
+ type: String,
213
+ },
214
+ payoutBankAccountId: {
215
+ type: String,
216
+ },
208
217
  }, {
209
218
  toJSON: {
210
219
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1796",
3
+ "version": "1.0.1798",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "@google-cloud/secret-manager": "^5.3.0",
27
27
  "@google-cloud/storage": "^6.9.5",
28
28
  "@hyperdx/node-opentelemetry": "^0.4.2",
29
- "@riocrypto/common": "^1.0.1596",
29
+ "@riocrypto/common": "^1.0.1597",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^1.6.0",
32
32
  "crypto-js": "^4.2.0",