@riocrypto/common-server 1.0.801 → 1.0.803
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,5 +2,6 @@ import { Fiat } from "@riocrypto/common";
|
|
|
2
2
|
export declare const getExchangeRates: (from: Fiat, to: Fiat) => Promise<{
|
|
3
3
|
conversionRate: number;
|
|
4
4
|
conversionRateWithVolatilityMarkup: number;
|
|
5
|
+
conversionRateWithRioMarkup: number;
|
|
5
6
|
conversionRateWithAllMarkups: number;
|
|
6
7
|
}>;
|
|
@@ -41,12 +41,14 @@ const getExchangeRates = (from, to) => __awaiter(void 0, void 0, void 0, functio
|
|
|
41
41
|
exchangeRateMultiplier = 0.997;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
const conversionRateWithRioMarkup = to === from ? conversionRate : conversionRate * exchangeRateMultiplier;
|
|
44
45
|
const conversionRateWithAllMarkups = to === from
|
|
45
46
|
? conversionRateWithVolatilityMarkup
|
|
46
47
|
: conversionRateWithVolatilityMarkup * exchangeRateMultiplier;
|
|
47
48
|
return {
|
|
48
49
|
conversionRate,
|
|
49
50
|
conversionRateWithVolatilityMarkup,
|
|
51
|
+
conversionRateWithRioMarkup,
|
|
50
52
|
conversionRateWithAllMarkups,
|
|
51
53
|
};
|
|
52
54
|
});
|
package/build/models/quote.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Country, Fees, Fiat, LiquidityProvider, PaymentMethod, PayoutMethod, Processor, Side, USState, Crypto } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface QuoteAttrs {
|
|
4
|
-
userId
|
|
4
|
+
userId: string;
|
|
5
5
|
crypto: Crypto;
|
|
6
6
|
side: Side;
|
|
7
7
|
fiat: Fiat;
|
|
@@ -26,7 +26,7 @@ interface QuoteAttrs {
|
|
|
26
26
|
markup?: number;
|
|
27
27
|
}
|
|
28
28
|
interface QuoteDoc extends Document {
|
|
29
|
-
userId
|
|
29
|
+
userId: string;
|
|
30
30
|
crypto: Crypto;
|
|
31
31
|
side: Side;
|
|
32
32
|
fiat: Fiat;
|
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.803",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
25
25
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
26
26
|
"@google-cloud/storage": "^6.9.5",
|
|
27
|
-
"@riocrypto/common": "^1.0.
|
|
27
|
+
"@riocrypto/common": "^1.0.695",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|