@riocrypto/common 1.0.887 → 1.0.889
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.
|
@@ -62,7 +62,7 @@ export declare class RioClient {
|
|
|
62
62
|
createOrder(order: OrderInput): Promise<Order>;
|
|
63
63
|
cancelOrder(id?: string): Promise<Order>;
|
|
64
64
|
getOrder(id: string): Promise<Order>;
|
|
65
|
-
createBankPayout(oid: string,
|
|
65
|
+
createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
|
|
66
66
|
getBankPayout(orderId: string): Promise<BankPayout>;
|
|
67
67
|
getBridgeOnboardingLinks(userId: string): Promise<{
|
|
68
68
|
tosLink: string;
|
|
@@ -197,12 +197,11 @@ class RioClient {
|
|
|
197
197
|
return response.data;
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
createBankPayout(oid,
|
|
200
|
+
createBankPayout(oid, bankAccountId) {
|
|
201
201
|
return __awaiter(this, void 0, void 0, function* () {
|
|
202
202
|
const response = yield this.axios.post(`/api/payouts/bank`, {
|
|
203
203
|
orderId: oid,
|
|
204
|
-
|
|
205
|
-
swiftCode,
|
|
204
|
+
bankAccountId,
|
|
206
205
|
});
|
|
207
206
|
return response.data;
|
|
208
207
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatTransactionHash = void 0;
|
|
4
|
+
const crypto_1 = require("../types/crypto");
|
|
5
|
+
const formatTransactionHash = (hash, crypto) => {
|
|
6
|
+
if ([crypto_1.Crypto.USDC, crypto_1.Crypto.USDTEthereum].includes(crypto)) {
|
|
7
|
+
return `https://etherscan.io/tx/${hash}`;
|
|
8
|
+
}
|
|
9
|
+
else if ([crypto_1.Crypto.USDCPolygon, crypto_1.Crypto.USDCPolygon].includes(crypto)) {
|
|
10
|
+
return `https://polygonscan.com/tx/${hash}`;
|
|
11
|
+
}
|
|
12
|
+
else if ([crypto_1.Crypto.USDCSolana].includes(crypto)) {
|
|
13
|
+
return `https://explorer.solana.com/tx/${hash}`;
|
|
14
|
+
}
|
|
15
|
+
else if ([crypto_1.Crypto.USDTTron].includes(crypto)) {
|
|
16
|
+
return `https://tronscan.org/#/transaction/${hash}`;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return "N/A";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.formatTransactionHash = formatTransactionHash;
|
package/build/index.d.ts
CHANGED
|
@@ -172,6 +172,7 @@ export * from "./helpers/validate-address";
|
|
|
172
172
|
export * from "./helpers/round-down-to-two-decimal-places";
|
|
173
173
|
export * from "./helpers/humanize-order-status";
|
|
174
174
|
export * from "./helpers/humanize-kyc-status";
|
|
175
|
+
export * from "./helpers/format-transaction-hash";
|
|
175
176
|
export * from "./clients/rio-client";
|
|
176
177
|
export * from "./clients/rio-admin-client";
|
|
177
178
|
export * from "./constants/mexico-fiscal-regimens";
|
package/build/index.js
CHANGED
|
@@ -188,6 +188,7 @@ __exportStar(require("./helpers/validate-address"), exports);
|
|
|
188
188
|
__exportStar(require("./helpers/round-down-to-two-decimal-places"), exports);
|
|
189
189
|
__exportStar(require("./helpers/humanize-order-status"), exports);
|
|
190
190
|
__exportStar(require("./helpers/humanize-kyc-status"), exports);
|
|
191
|
+
__exportStar(require("./helpers/format-transaction-hash"), exports);
|
|
191
192
|
__exportStar(require("./clients/rio-client"), exports);
|
|
192
193
|
__exportStar(require("./clients/rio-admin-client"), exports);
|
|
193
194
|
__exportStar(require("./constants/mexico-fiscal-regimens"), exports);
|