@riocrypto/common 1.0.1950 → 1.0.1952
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.
|
@@ -2,14 +2,16 @@ import { Fiat } from "../types/fiat";
|
|
|
2
2
|
import { CustomError } from "./custom-error";
|
|
3
3
|
export declare class InvalidOrderSizeError extends CustomError {
|
|
4
4
|
private minAmount;
|
|
5
|
-
private minAmountFiat
|
|
5
|
+
private minAmountFiat?;
|
|
6
|
+
private minAmountCrypto?;
|
|
6
7
|
statusCode: number;
|
|
7
8
|
internalCode: number;
|
|
8
|
-
constructor(minAmount: number, minAmountFiat
|
|
9
|
+
constructor(minAmount: number, minAmountFiat?: Fiat | undefined, minAmountCrypto?: Crypto | undefined);
|
|
9
10
|
serializeErrors(): {
|
|
10
11
|
code: number;
|
|
11
12
|
message: string;
|
|
12
13
|
minAmount: number;
|
|
13
|
-
minAmountFiat: Fiat;
|
|
14
|
+
minAmountFiat: Fiat | undefined;
|
|
15
|
+
minAmountCrypto: Crypto | undefined;
|
|
14
16
|
}[];
|
|
15
17
|
}
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InvalidOrderSizeError = void 0;
|
|
4
4
|
const custom_error_1 = require("./custom-error");
|
|
5
5
|
class InvalidOrderSizeError extends custom_error_1.CustomError {
|
|
6
|
-
constructor(minAmount, minAmountFiat) {
|
|
6
|
+
constructor(minAmount, minAmountFiat, minAmountCrypto) {
|
|
7
7
|
super("Invalid order size");
|
|
8
8
|
this.minAmount = minAmount;
|
|
9
9
|
this.minAmountFiat = minAmountFiat;
|
|
10
|
+
this.minAmountCrypto = minAmountCrypto;
|
|
10
11
|
this.statusCode = 400;
|
|
11
12
|
this.internalCode = 12;
|
|
12
13
|
Object.setPrototypeOf(this, InvalidOrderSizeError.prototype);
|
|
@@ -18,6 +19,7 @@ class InvalidOrderSizeError extends custom_error_1.CustomError {
|
|
|
18
19
|
message: "Invalid order size",
|
|
19
20
|
minAmount: this.minAmount,
|
|
20
21
|
minAmountFiat: this.minAmountFiat,
|
|
22
|
+
minAmountCrypto: this.minAmountCrypto,
|
|
21
23
|
},
|
|
22
24
|
];
|
|
23
25
|
}
|