@riocrypto/common 1.0.80 → 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,9 +21,9 @@ 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
- private getProcessingFeeNumeric;
25
- private getTransferFeeNumberic;
26
- private getPlatformFeeRate;
24
+ getProcessingFeeNumeric(subtotal: number, paymentMethod: PaymentMethod, country: Country): number;
25
+ getTransferFeeNumberic(crypto: Crypto): number;
26
+ getPlatformFeeRate(): number;
27
27
  getCurrencyConversion(amount: number, from: Fiat, to: Fiat): Promise<Number>;
28
28
  }
29
29
  export declare const wyreClient: WyreClient;
@@ -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 === country_1.Country.UnitedStates);
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, unitedStates) {
214
+ getProcessingFeeNumeric(subtotal, paymentMethod, country) {
215
215
  switch (paymentMethod) {
216
216
  case payment_method_1.PaymentMethod.Card:
217
- if (unitedStates)
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;
@@ -222,7 +222,7 @@ class WyreClient {
222
222
  return subtotal * 0.039 + 0.3;
223
223
  }
224
224
  }
225
- getTransferFeeNumberic(asset) {
225
+ getTransferFeeNumberic(crypto) {
226
226
  return 3;
227
227
  }
228
228
  getPlatformFeeRate() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.80",
3
+ "version": "1.0.82",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",