@riocrypto/common-server 1.0.2145 → 1.0.2146
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.
|
@@ -55,17 +55,19 @@ class BridgeClient {
|
|
|
55
55
|
if ([common_1.RioEnv.Sandbox, common_1.RioEnv.Local, common_1.RioEnv.Test].includes(process.env.RIO_ENV)) {
|
|
56
56
|
throw new Error("Bridge transfers are disabled in sandbox mode.");
|
|
57
57
|
}
|
|
58
|
+
let features = undefined;
|
|
59
|
+
if (["usdc", "usdt"].includes(source.currency)) {
|
|
60
|
+
features = {
|
|
61
|
+
allow_any_from_address: true,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
58
64
|
const { data } = yield this.axiosClient.post(`${this.baseUrl}/v0/transfers`, {
|
|
59
65
|
amount: amountInUSD,
|
|
60
66
|
on_behalf_of: bridgeCustomerId,
|
|
61
67
|
developer_fee: developerFee,
|
|
62
68
|
source,
|
|
63
69
|
destination,
|
|
64
|
-
features
|
|
65
|
-
allow_any_from_address: ["usdc", "usdt"].includes(source.currency)
|
|
66
|
-
? true
|
|
67
|
-
: undefined,
|
|
68
|
-
},
|
|
70
|
+
features,
|
|
69
71
|
}, {
|
|
70
72
|
headers: {
|
|
71
73
|
"Api-Key": this.apiKey,
|