@riocrypto/common 1.0.1019 → 1.0.1021
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.
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.humanizeChainedOrderStatus = void 0;
|
|
4
|
+
const order_status_1 = require("../types/order-status");
|
|
5
|
+
const humanizeChainedOrderStatus = (originOrderStatus, destinationOrderStatus) => {
|
|
6
|
+
if (originOrderStatus.toLowerCase().includes("faled")) {
|
|
7
|
+
return "Send failed";
|
|
8
|
+
}
|
|
9
|
+
else if (destinationOrderStatus.toLowerCase().includes("faled")) {
|
|
10
|
+
return "Receival failed";
|
|
11
|
+
}
|
|
12
|
+
else if (originOrderStatus === order_status_1.OrderStatus.AwaitingPayment) {
|
|
13
|
+
return "Awaiting payment";
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return "Processing";
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
exports.humanizeChainedOrderStatus = humanizeChainedOrderStatus;
|
package/build/index.d.ts
CHANGED
|
@@ -188,6 +188,7 @@ export * from "./helpers/get-user-from-client-helper";
|
|
|
188
188
|
export * from "./helpers/validate-address";
|
|
189
189
|
export * from "./helpers/round-down-to-two-decimal-places";
|
|
190
190
|
export * from "./helpers/humanize-order-status";
|
|
191
|
+
export * from "./helpers/humanize-chained-order-status";
|
|
191
192
|
export * from "./helpers/humanize-kyc-status";
|
|
192
193
|
export * from "./helpers/format-transaction-hash";
|
|
193
194
|
export * from "./helpers/round-to-decimals";
|
package/build/index.js
CHANGED
|
@@ -204,6 +204,7 @@ __exportStar(require("./helpers/get-user-from-client-helper"), exports);
|
|
|
204
204
|
__exportStar(require("./helpers/validate-address"), exports);
|
|
205
205
|
__exportStar(require("./helpers/round-down-to-two-decimal-places"), exports);
|
|
206
206
|
__exportStar(require("./helpers/humanize-order-status"), exports);
|
|
207
|
+
__exportStar(require("./helpers/humanize-chained-order-status"), exports);
|
|
207
208
|
__exportStar(require("./helpers/humanize-kyc-status"), exports);
|
|
208
209
|
__exportStar(require("./helpers/format-transaction-hash"), exports);
|
|
209
210
|
__exportStar(require("./helpers/round-to-decimals"), exports);
|