@rabbitio/ui-kit 1.0.0-beta.17 → 1.0.0-beta.18
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 +57 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +16 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +57 -34
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +57 -34
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/swaps-lib/services/publicSwapService.js +19 -6
package/package.json
CHANGED
|
@@ -45,14 +45,27 @@ export class PublicSwapService {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
async
|
|
48
|
+
async getDepositCurrenciesListForPublicSwap() {
|
|
49
|
+
try {
|
|
50
|
+
return await this._getCurrenciesListForPublicSwap(false);
|
|
51
|
+
} catch (e) {
|
|
52
|
+
improveAndRethrow(e, "getDepositCurrenciesListForPublicSwap");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async getWithdrawCurrenciesListForPublicSwap() {
|
|
57
|
+
try {
|
|
58
|
+
return await this._getCurrenciesListForPublicSwap(true);
|
|
59
|
+
} catch (e) {
|
|
60
|
+
improveAndRethrow(e, "getWithdrawCurrenciesListForPublicSwap");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async _getCurrenciesListForPublicSwap(withdraw = false) {
|
|
49
65
|
const loggerSource = "getCurrenciesListForPublicSwap";
|
|
50
66
|
try {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
? await this._swapProvider.getWithdrawalCurrencies(
|
|
54
|
-
currencyThatShouldNotBeFirst
|
|
55
|
-
)
|
|
67
|
+
const result = withdraw
|
|
68
|
+
? await this._swapProvider.getWithdrawalCurrencies()
|
|
56
69
|
: await this._swapProvider.getDepositCurrencies();
|
|
57
70
|
if (
|
|
58
71
|
result.reason ===
|