@riocrypto/common 1.0.983 → 1.0.985

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.
@@ -19,7 +19,6 @@ import { BankPayment } from "../types/bank-payment";
19
19
  import { BankAccount } from "../types/bank-account";
20
20
  import { Quote } from "../types/quote";
21
21
  import { Crypto } from "../types/crypto";
22
- import { OrderUpdate } from "../types/order-update";
23
22
  import { QuoteInput } from "../types/quote-input";
24
23
  import { OrderQuery } from "../types/order-query";
25
24
  import { UserQuery } from "../types/user-query";
@@ -99,7 +98,7 @@ export declare class RioAdminClient {
99
98
  refreshAdminToken(): Promise<void>;
100
99
  createOrder(order: OrderInput): Promise<Order>;
101
100
  importOrder(order: ImportOrderInput): Promise<Order>;
102
- updateOrder(id: string, update: OrderUpdate): Promise<Order>;
101
+ registerExchangeRate(orderId: string, amount: number, price: number, provider: string): Promise<void>;
103
102
  cancelOrder(id?: string): Promise<Order>;
104
103
  getOrder(id: string): Promise<Order>;
105
104
  createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
@@ -322,10 +322,14 @@ class RioAdminClient {
322
322
  return response.data;
323
323
  });
324
324
  }
325
- updateOrder(id, update) {
325
+ registerExchangeRate(orderId, amount, price, provider) {
326
326
  return __awaiter(this, void 0, void 0, function* () {
327
- const response = yield this.axios.patch(`/api/orders/${id}`, update);
328
- return response.data;
327
+ yield this.axios.post(`/api/exchange-rates`, {
328
+ orderId,
329
+ amount,
330
+ price,
331
+ provider,
332
+ });
329
333
  });
330
334
  }
331
335
  cancelOrder(id) {
@@ -4,5 +4,7 @@ export interface ExchangeRateFixedEvent {
4
4
  data: {
5
5
  orderId: string;
6
6
  price: number;
7
+ provider: string;
8
+ providerId: string;
7
9
  };
8
10
  }
@@ -5,5 +5,7 @@ export interface ExchangeRatePartiallyFixedEvent {
5
5
  orderId: string;
6
6
  amountFixed: number;
7
7
  price: number;
8
+ provider: string;
9
+ providerId: string;
8
10
  };
9
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.983",
3
+ "version": "1.0.985",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",