@riocrypto/common-server 1.0.2719 → 1.0.2721
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.
|
@@ -58,7 +58,9 @@ declare class ClusterClient {
|
|
|
58
58
|
twoWaySettlementDateOffset?: number;
|
|
59
59
|
}): Promise<Order>;
|
|
60
60
|
checkBankPayment(orderId: string): Promise<void>;
|
|
61
|
+
confirmBankPayment(orderId: string, amountFiat: number): Promise<void>;
|
|
61
62
|
checkCryptoPayment(orderId: string): Promise<void>;
|
|
63
|
+
confirmCryptoPayment(orderId: string, amountCrypto: number): Promise<void>;
|
|
62
64
|
createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
|
|
63
65
|
createAuthWithoutRegistration({ phoneNumber, firstName, lastName, role, permissions, telegramUsername, telegramUserId, slackUsername, email, authMethod, }: {
|
|
64
66
|
phoneNumber?: string;
|
|
@@ -170,6 +170,18 @@ class ClusterClient {
|
|
|
170
170
|
});
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
|
+
confirmBankPayment(orderId, amountFiat) {
|
|
174
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
yield this.axios.post(`${this.baseUrl}/api/payments/bank/confirm`, {
|
|
176
|
+
orderId,
|
|
177
|
+
amountFiat,
|
|
178
|
+
}, {
|
|
179
|
+
headers: {
|
|
180
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
}
|
|
173
185
|
checkCryptoPayment(orderId) {
|
|
174
186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
175
187
|
yield this.axios.post(`${this.baseUrl}/api/payments/crypto/check`, {
|
|
@@ -181,6 +193,18 @@ class ClusterClient {
|
|
|
181
193
|
});
|
|
182
194
|
});
|
|
183
195
|
}
|
|
196
|
+
confirmCryptoPayment(orderId, amountCrypto) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
yield this.axios.post(`${this.baseUrl}/api/payments/crypto/confirm`, {
|
|
199
|
+
orderId,
|
|
200
|
+
amountCrypto,
|
|
201
|
+
}, {
|
|
202
|
+
headers: {
|
|
203
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
204
|
+
},
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
}
|
|
184
208
|
createBitsoBankAccount(userId) {
|
|
185
209
|
return __awaiter(this, void 0, void 0, function* () {
|
|
186
210
|
const response = yield this.axios.post(`${this.baseUrl}/api/bank/accounts/bitso`, {
|
package/build/models/order.js
CHANGED
|
@@ -376,6 +376,7 @@ const buildOrder = (mongoose) => {
|
|
|
376
376
|
orderSchema.index({ userId: 1, "TWAP.sessionId": 1, createdAt: 1 });
|
|
377
377
|
orderSchema.index({ brokerId: 1, "TWAP.sessionId": 1, createdAt: 1 });
|
|
378
378
|
orderSchema.index({ clientReferenceId: 1 }, { sparse: true });
|
|
379
|
+
orderSchema.index({ "paymentsReceived.blockchainTxId": 1 }, { sparse: true });
|
|
379
380
|
orderSchema.statics.build = (attrs) => {
|
|
380
381
|
return new Order(attrs);
|
|
381
382
|
};
|