@riocrypto/common-server 1.0.2120 → 1.0.2122

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.
@@ -11,7 +11,7 @@ declare class BitsoClient {
11
11
  createReceivingAccount(user: User, bankAccount: BankAccount): Promise<string>;
12
12
  deleteReceivingAccount(bitsoReceivingAccountId: string): Promise<string>;
13
13
  createMXNSPEIWithdraw(bitsoReceivingAccountId: string, amount: number, concept: string, idempotencyKey?: string): Promise<Object>;
14
- createMXNBTWithdraw(bitsoReceivingAccountId: string, amount: number, concept: string, idempotencyKey?: string): Promise<Object>;
14
+ createMXNBTWithdraw(email: string, amount: number, concept: string, idempotencyKey?: string): Promise<Object>;
15
15
  getWithdrawal(withdrawalId: string): Promise<any>;
16
16
  createLimitOrder(asset: string, amount: number, price: number, side: "buy" | "sell"): Promise<{
17
17
  oid: string;
@@ -129,7 +129,7 @@ class BitsoClient {
129
129
  return data.payload;
130
130
  });
131
131
  }
132
- createMXNBTWithdraw(bitsoReceivingAccountId, amount, concept, idempotencyKey) {
132
+ createMXNBTWithdraw(email, amount, concept, idempotencyKey) {
133
133
  return __awaiter(this, void 0, void 0, function* () {
134
134
  if ([common_1.RioEnv.Sandbox, common_1.RioEnv.Local, common_1.RioEnv.Test].includes(process.env.RIO_ENV)) {
135
135
  throw new Error("Bitso withdraw not allowed in sandbox");
@@ -142,11 +142,11 @@ class BitsoClient {
142
142
  },
143
143
  data: {
144
144
  amount: amount.toFixed(2),
145
- contact_id: bitsoReceivingAccountId,
145
+ email,
146
146
  notes_ref: concept,
147
147
  protocol: "bt",
148
- network: "spei",
149
- method: "praxis",
148
+ network: "bt",
149
+ method: "bt",
150
150
  currency: "mxn",
151
151
  asset: "mxn",
152
152
  origin_id: idempotencyKey,
@@ -15,6 +15,7 @@ interface BankAccountAttrs {
15
15
  advancedVerificationStatus?: BankAccountVerificationStatus;
16
16
  bridgeExternalAccountId?: string;
17
17
  preSettledAmountAvailable?: number;
18
+ email?: string;
18
19
  }
19
20
  interface BankAccountDoc extends Document {
20
21
  createdAt: Date;
@@ -31,6 +32,7 @@ interface BankAccountDoc extends Document {
31
32
  advancedVerificationStatus?: BankAccountVerificationStatus;
32
33
  bridgeExternalAccountId?: string;
33
34
  preSettledAmountAvailable?: number;
35
+ email?: string;
34
36
  }
35
37
  interface BankAccountModel extends Model<BankAccountDoc> {
36
38
  build(attrs: BankAccountAttrs): BankAccountDoc;
@@ -57,6 +57,9 @@ const buildBankAccount = (mongoose) => {
57
57
  preSettledAmountAvailable: {
58
58
  type: Number,
59
59
  },
60
+ email: {
61
+ type: String,
62
+ },
60
63
  }, {
61
64
  toJSON: {
62
65
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2120",
3
+ "version": "1.0.2122",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",