@riocrypto/common-server 1.0.2892 → 1.0.2894
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.
|
@@ -40,13 +40,14 @@ const getProcessor = ({ country, fiat, side, isBinanceRFQ, routingConfig, enable
|
|
|
40
40
|
? common_1.ProcessorRoutingPurpose.Buy
|
|
41
41
|
: common_1.ProcessorRoutingPurpose.Sell;
|
|
42
42
|
const excludedProcessors = (0, exports.getEnvironmentExcludedProcessors)(purpose);
|
|
43
|
-
// Applied
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
43
|
+
// Applied inside the country branches rather than up here, so it cannot bypass
|
|
44
|
+
// the checks below that decide whether the corridor is supported at all. Answers
|
|
45
|
+
// even when no rule is configured, because the corridor default is only safe to
|
|
46
|
+
// use once the rails the customer will not accept are out of the running.
|
|
47
|
+
// Candidates come from the corridor table, so a stray rule cannot introduce a
|
|
48
|
+
// rail the corridor does not serve. Undefined is left for the one case that
|
|
49
|
+
// genuinely belongs to structural routing: a custom Rio bank account whose rail
|
|
50
|
+
// we do not know.
|
|
50
51
|
const trySplit = () => {
|
|
51
52
|
const routed = (0, resolve_processor_1.resolveProcessor)({
|
|
52
53
|
country,
|
|
@@ -102,7 +103,11 @@ const getProcessor = ({ country, fiat, side, isBinanceRFQ, routingConfig, enable
|
|
|
102
103
|
};
|
|
103
104
|
if (fiat === common_1.Fiat.COP) {
|
|
104
105
|
if (country === common_1.Country.Colombia) {
|
|
105
|
-
|
|
106
|
+
// Through the split even with one rail, because the enablement gate lives
|
|
107
|
+
// there and a customer who has switched their only account off means it as
|
|
108
|
+
// much as one who had a choice. Nothing to divide, so the rail itself is the
|
|
109
|
+
// same either way.
|
|
110
|
+
return trySplit() || structural();
|
|
106
111
|
}
|
|
107
112
|
else {
|
|
108
113
|
throw new common_1.GenericInputError("COP is not supported in your country");
|
|
@@ -126,10 +131,13 @@ const getProcessor = ({ country, fiat, side, isBinanceRFQ, routingConfig, enable
|
|
|
126
131
|
}
|
|
127
132
|
else if (fiat === common_1.Fiat.USD) {
|
|
128
133
|
if (country === common_1.Country.UnitedStates) {
|
|
134
|
+
// The one corridor left outside the gate. It is not on the payment accounts
|
|
135
|
+
// page, so there is no switch a customer could have thrown and nothing for
|
|
136
|
+
// the gate to read.
|
|
129
137
|
return structural();
|
|
130
138
|
}
|
|
131
139
|
else if (country === common_1.Country.Mexico) {
|
|
132
|
-
return structural();
|
|
140
|
+
return trySplit() || structural();
|
|
133
141
|
}
|
|
134
142
|
else if (country === common_1.Country.Peru) {
|
|
135
143
|
return trySplit() || structural();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2894",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/secret-manager": "^5.6.0",
|
|
29
29
|
"@google-cloud/storage": "^7.19.0",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.10.3",
|
|
31
|
-
"@riocrypto/common": "1.0.
|
|
31
|
+
"@riocrypto/common": "1.0.2708",
|
|
32
32
|
"@slack/web-api": "^7.15.0",
|
|
33
33
|
"@types/express": "^4.17.25",
|
|
34
34
|
"axios": "1.18.1",
|