@riocrypto/common-server 1.0.1086 → 1.0.1088
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.
|
@@ -69,7 +69,10 @@ class BitsoClient {
|
|
|
69
69
|
};
|
|
70
70
|
const signedRequestConfig = this.signRequest(requestConfig);
|
|
71
71
|
const { data } = yield (0, axios_1.default)(signedRequestConfig);
|
|
72
|
-
|
|
72
|
+
if (!data.success) {
|
|
73
|
+
throw new Error("Error creating Bitso receiving account");
|
|
74
|
+
}
|
|
75
|
+
return data.payload;
|
|
73
76
|
});
|
|
74
77
|
}
|
|
75
78
|
signRequest(requestConfig) {
|
package/build/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from "./models/webhook-registration";
|
|
|
42
42
|
export * from "./models/chained-quote";
|
|
43
43
|
export * from "./models/chained-order";
|
|
44
44
|
export * from "./models/bitso-bank-account";
|
|
45
|
+
export * from "./models/bitso-receiving-account";
|
|
45
46
|
export * from "./clients/bitstamp-client";
|
|
46
47
|
export * from "./clients/ccxt-client";
|
|
47
48
|
export * from "./clients/kushki-client";
|
package/build/index.js
CHANGED
|
@@ -58,6 +58,7 @@ __exportStar(require("./models/webhook-registration"), exports);
|
|
|
58
58
|
__exportStar(require("./models/chained-quote"), exports);
|
|
59
59
|
__exportStar(require("./models/chained-order"), exports);
|
|
60
60
|
__exportStar(require("./models/bitso-bank-account"), exports);
|
|
61
|
+
__exportStar(require("./models/bitso-receiving-account"), exports);
|
|
61
62
|
__exportStar(require("./clients/bitstamp-client"), exports);
|
|
62
63
|
__exportStar(require("./clients/ccxt-client"), exports);
|
|
63
64
|
__exportStar(require("./clients/kushki-client"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
interface BitsoReceivingAccountAttrs {
|
|
3
|
+
userId: string;
|
|
4
|
+
bankAccountId: string;
|
|
5
|
+
BitsoReceivingAccountId: string;
|
|
6
|
+
}
|
|
7
|
+
interface BitsoReceivingAccountDoc extends mongoose.Document {
|
|
8
|
+
userId: string;
|
|
9
|
+
bankAccountId: string;
|
|
10
|
+
BitsoReceivingAccountId: string;
|
|
11
|
+
}
|
|
12
|
+
interface BitsoReceivingAccountModel extends mongoose.Model<BitsoReceivingAccountDoc> {
|
|
13
|
+
build(attrs: BitsoReceivingAccountAttrs): BitsoReceivingAccountDoc;
|
|
14
|
+
}
|
|
15
|
+
declare const buildBitsoReceivingAccount: (mongoose: typeof mongoose) => BitsoReceivingAccountModel;
|
|
16
|
+
export { buildBitsoReceivingAccount, BitsoReceivingAccountDoc };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildBitsoReceivingAccount = void 0;
|
|
4
|
+
const buildBitsoReceivingAccount = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.BitsoReceivingAccount) {
|
|
7
|
+
return mongoose.model("BitsoReceivingAccount");
|
|
8
|
+
}
|
|
9
|
+
const BitsoReceivingAccountSchema = new mongoose.Schema({
|
|
10
|
+
userId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
bankAccountId: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
BitsoReceivingAccountId: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
}, {
|
|
23
|
+
toJSON: {
|
|
24
|
+
transform(doc, ret) {
|
|
25
|
+
ret.id = ret._id;
|
|
26
|
+
delete ret._id;
|
|
27
|
+
delete ret.__v;
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
BitsoReceivingAccountSchema.statics.build = (attrs) => {
|
|
32
|
+
return new BitsoReceivingAccount(attrs);
|
|
33
|
+
};
|
|
34
|
+
const BitsoReceivingAccount = mongoose.model("BitsoReceivingAccount", BitsoReceivingAccountSchema);
|
|
35
|
+
return BitsoReceivingAccount;
|
|
36
|
+
};
|
|
37
|
+
exports.buildBitsoReceivingAccount = buildBitsoReceivingAccount;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1088",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
26
26
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
27
27
|
"@google-cloud/storage": "^6.9.5",
|
|
28
|
-
"@riocrypto/common": "^1.0.
|
|
28
|
+
"@riocrypto/common": "^1.0.926",
|
|
29
29
|
"@types/express": "^4.17.13",
|
|
30
30
|
"axios": "^0.27.2",
|
|
31
31
|
"ccxt": "^3.0.30",
|