@riocrypto/common-server 1.0.1181 → 1.0.1183
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Processor } from "@riocrypto/common";
|
|
2
|
-
export declare const getProcessorFees: (processor: Processor, amountFiat: number, conversionRateFromUSD: number) => Promise<number>;
|
|
2
|
+
export declare const getProcessorFees: (processor: Processor, amountFiat: number, conversionRateFromUSD: number, USBankTransferMethod?: "wire" | "ach") => Promise<number>;
|
|
@@ -11,9 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.getProcessorFees = void 0;
|
|
13
13
|
const common_1 = require("@riocrypto/common");
|
|
14
|
-
const getProcessorFees = (processor, amountFiat, conversionRateFromUSD) => __awaiter(void 0, void 0, void 0, function* () {
|
|
14
|
+
const getProcessorFees = (processor, amountFiat, conversionRateFromUSD, USBankTransferMethod) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
15
|
if (processor === common_1.Processor.Bridge) {
|
|
16
|
-
const
|
|
16
|
+
const wireFee = USBankTransferMethod === "wire" ? 20 : 0;
|
|
17
|
+
const x = (amountFiat * (1 / conversionRateFromUSD) * 0.0015 + wireFee) *
|
|
17
18
|
conversionRateFromUSD;
|
|
18
19
|
return x;
|
|
19
20
|
}
|
package/build/models/quote.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ interface QuoteAttrs {
|
|
|
26
26
|
conversionRateUSDWithMarkups: number;
|
|
27
27
|
discount?: number;
|
|
28
28
|
markup?: number;
|
|
29
|
+
USBankTransferMethod?: "wire" | "ach";
|
|
29
30
|
}
|
|
30
31
|
interface QuoteDoc extends Document {
|
|
31
32
|
userId: string;
|
|
@@ -53,6 +54,7 @@ interface QuoteDoc extends Document {
|
|
|
53
54
|
conversionRateUSDWithMarkups: number;
|
|
54
55
|
discount?: number;
|
|
55
56
|
markup?: number;
|
|
57
|
+
USBankTransferMethod?: "wire" | "ach";
|
|
56
58
|
}
|
|
57
59
|
interface QuoteModel extends Model<QuoteDoc> {
|
|
58
60
|
build(attrs: QuoteAttrs): QuoteDoc;
|
package/build/models/quote.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1183",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
27
27
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
|
-
"@riocrypto/common": "^1.0.
|
|
29
|
+
"@riocrypto/common": "^1.0.1066",
|
|
30
30
|
"@types/express": "^4.17.13",
|
|
31
31
|
"axios": "^0.27.2",
|
|
32
32
|
"ccxt": "^3.0.30",
|