@rabbitio/ui-kit 1.0.0-beta.22 → 1.0.0-beta.23
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.
- package/dist/index.cjs +4 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +6 -0
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +4 -5
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +4 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/swaps-lib/external-apis/swapProvider.js +20 -1
- package/src/swaps-lib/external-apis/swapspaceSwapProvider.js +32 -0
- package/src/swaps-lib/services/publicSwapService.js +25 -5
package/dist/index.module.js
CHANGED
|
@@ -3196,11 +3196,10 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
|
|
|
3196
3196
|
if (!fromCoinSwapspaceDetails || !toCoinSwapspaceDetails) {
|
|
3197
3197
|
throw new Error("Failed to find swapspace coin details for: " + fromCoin.ticker + " -> " + toCoin.ticker);
|
|
3198
3198
|
}
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
return Promise.resolve(axios.get(_this7._URL + "/api/v2/amounts?fromCurrency=" + fromCoinSwapspaceDetails.code + "&fromNetwork=" + fromCoinSwapspaceDetails.network + "&toNetwork=" + toCoinSwapspaceDetails.network + "&toCurrency=" + toCoinSwapspaceDetails.code + "&amount=" + amountCoins + "&float=true&estimated=false")).then(function (response) {
|
|
3199
|
+
return !fromCoinSwapspaceDetails.deposit || !toCoinSwapspaceDetails.withdrawal ? {
|
|
3200
|
+
result: false,
|
|
3201
|
+
reason: SwapProvider.NO_SWAPS_REASONS.NOT_SUPPORTED
|
|
3202
|
+
} : Promise.resolve(axios.get(_this7._URL + "/api/v2/amounts?fromCurrency=" + fromCoinSwapspaceDetails.code + "&fromNetwork=" + fromCoinSwapspaceDetails.network + "&toNetwork=" + toCoinSwapspaceDetails.network + "&toCurrency=" + toCoinSwapspaceDetails.code + "&amount=" + amountCoins + "&float=true&estimated=false")).then(function (response) {
|
|
3204
3203
|
var _response$data;
|
|
3205
3204
|
Logger.log("Retrieved " + (response == null || (_response$data = response.data) == null ? void 0 : _response$data.length) + " options", loggerSource);
|
|
3206
3205
|
var options = Array.isArray(response.data) ? response.data : [];
|