@riocrypto/common-server 1.0.1550 → 1.0.1552

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.
@@ -29,6 +29,9 @@ class BitsoClient {
29
29
  }
30
30
  createClabe() {
31
31
  return __awaiter(this, void 0, void 0, function* () {
32
+ if (process.env.RIO_ENV === common_1.RioEnv.Sandbox) {
33
+ throw new Error("Bitso create clabe not allowed in sandbox");
34
+ }
32
35
  const requestConfig = {
33
36
  method: "POST",
34
37
  url: `${this.baseUrl}/spei/v1/clabes`,
@@ -43,6 +46,9 @@ class BitsoClient {
43
46
  }
44
47
  createReceivingAccount(user, bankAccount, bitsoBankAccountCode) {
45
48
  return __awaiter(this, void 0, void 0, function* () {
49
+ if (process.env.RIO_ENV === common_1.RioEnv.Sandbox) {
50
+ throw new Error("Bitso create receiving account not allowed in sandbox");
51
+ }
46
52
  const requestConfig = {
47
53
  method: "POST",
48
54
  url: `${this.baseUrl}/api/v3/consumer-contacts`,
@@ -220,6 +226,9 @@ class BitsoClient {
220
226
  }
221
227
  cancelOrder(oid) {
222
228
  return __awaiter(this, void 0, void 0, function* () {
229
+ if (process.env.RIO_ENV === common_1.RioEnv.Sandbox) {
230
+ throw new Error("Bitso cancel order not allowed in sandbox");
231
+ }
223
232
  const requestConfig = {
224
233
  method: "DELETE",
225
234
  url: `${this.baseUrl}/api/v3/orders/${oid}`,
@@ -23,10 +23,10 @@ const getProcessorFees = (processor, amountFiat, conversionRateFromUSD, side, fi
23
23
  }
24
24
  else if (processor === common_1.Processor.Interbank) {
25
25
  if (side === common_1.Side.Buy) {
26
- return amountFiat * 0.015;
26
+ return amountFiat * 0.005;
27
27
  }
28
28
  else {
29
- let baseFee = amountFiat * 0.015;
29
+ let baseFee = amountFiat * 0.005;
30
30
  if (fiat === common_1.Fiat.PEN) {
31
31
  baseFee += 4.47;
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1550",
3
+ "version": "1.0.1552",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/storage": "^6.9.5",
29
29
  "@google-cloud/vision": "^4.0.2",
30
30
  "@hyperdx/node-opentelemetry": "^0.4.2",
31
- "@riocrypto/common": "^1.0.1381",
31
+ "@riocrypto/common": "^1.0.1382",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.6.0",
34
34
  "ccxt": "^3.0.30",