@riocrypto/common-server 1.0.2143 → 1.0.2144
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.
|
@@ -50,7 +50,7 @@ class BridgeClient {
|
|
|
50
50
|
return data;
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
createTransfer(bridgeCustomerId, amountInUSD, source, destination,
|
|
53
|
+
createTransfer(bridgeCustomerId, amountInUSD, source, destination, developer_fee_percent) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
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.");
|
|
@@ -58,9 +58,15 @@ class BridgeClient {
|
|
|
58
58
|
const { data } = yield this.axiosClient.post(`${this.baseUrl}/v0/transfers`, {
|
|
59
59
|
amount: amountInUSD,
|
|
60
60
|
on_behalf_of: bridgeCustomerId,
|
|
61
|
-
|
|
61
|
+
developer_fee_percent,
|
|
62
62
|
source,
|
|
63
63
|
destination,
|
|
64
|
+
features: {
|
|
65
|
+
flexible_amount: true,
|
|
66
|
+
allow_any_from_address: ["usdc", "usdt"].includes(source.currency)
|
|
67
|
+
? true
|
|
68
|
+
: undefined,
|
|
69
|
+
},
|
|
64
70
|
}, {
|
|
65
71
|
headers: {
|
|
66
72
|
"Api-Key": this.apiKey,
|
|
@@ -70,7 +76,7 @@ class BridgeClient {
|
|
|
70
76
|
console.log({
|
|
71
77
|
amount: amountInUSD,
|
|
72
78
|
on_behalf_of: bridgeCustomerId,
|
|
73
|
-
|
|
79
|
+
developer_fee_percent,
|
|
74
80
|
source,
|
|
75
81
|
destination,
|
|
76
82
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2144",
|
|
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.3.0",
|
|
29
29
|
"@google-cloud/storage": "^6.9.5",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.7.0",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.1910",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|