@riocrypto/common 1.0.81 → 1.0.82
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.
|
@@ -21,7 +21,7 @@ declare class WyreClient {
|
|
|
21
21
|
}>;
|
|
22
22
|
private getBlockchainNetwork;
|
|
23
23
|
getQuote(side: Side, crypto: Crypto, amount: number, fiat: Fiat, paymentMethod: PaymentMethod, country: Country): Promise<Quote>;
|
|
24
|
-
getProcessingFeeNumeric(subtotal: number, paymentMethod: PaymentMethod,
|
|
24
|
+
getProcessingFeeNumeric(subtotal: number, paymentMethod: PaymentMethod, country: Country): number;
|
|
25
25
|
getTransferFeeNumberic(crypto: Crypto): number;
|
|
26
26
|
getPlatformFeeRate(): number;
|
|
27
27
|
getCurrencyConversion(amount: number, from: Fiat, to: Fiat): Promise<Number>;
|
|
@@ -189,7 +189,7 @@ class WyreClient {
|
|
|
189
189
|
const key = `${fiat}${crypto}`;
|
|
190
190
|
const price = response.data[key];
|
|
191
191
|
const platformRate = this.getPlatformFeeRate();
|
|
192
|
-
const processingFeeFiat = this.getProcessingFeeNumeric(amount, paymentMethod, country
|
|
192
|
+
const processingFeeFiat = this.getProcessingFeeNumeric(amount, paymentMethod, country);
|
|
193
193
|
const platformFeeFiat = platformRate * amount;
|
|
194
194
|
const TransferFeeFiat = this.getTransferFeeNumberic(crypto);
|
|
195
195
|
return {
|
|
@@ -211,10 +211,10 @@ class WyreClient {
|
|
|
211
211
|
};
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
-
getProcessingFeeNumeric(subtotal, paymentMethod,
|
|
214
|
+
getProcessingFeeNumeric(subtotal, paymentMethod, country) {
|
|
215
215
|
switch (paymentMethod) {
|
|
216
216
|
case payment_method_1.PaymentMethod.Card:
|
|
217
|
-
if (
|
|
217
|
+
if (country === country_1.Country.UnitedStates)
|
|
218
218
|
return subtotal * 0.029 + 0.3;
|
|
219
219
|
else
|
|
220
220
|
return subtotal * 0.039 + 0.3;
|