@rabbitio/ui-kit 1.0.0-beta.35 → 1.0.0-beta.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabbitio/ui-kit",
3
- "version": "1.0.0-beta.35",
3
+ "version": "1.0.0-beta.37",
4
4
  "description": "Rabbit.io react.js components kit",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -22,7 +22,7 @@ export class SwapspaceSwapProvider extends SwapProvider {
22
22
  ) {
23
23
  super();
24
24
  this._supportedCoins = [];
25
- this._URL = `${apiKeysProxyUrl}/swapspace`;
25
+ this._URL = `${apiKeysProxyUrl}`;
26
26
  this._maxRateDigits = 20;
27
27
  this.useRestrictedCoinsSet = useRestrictedCoinsSet;
28
28
  this._customCoinBuilder = customCoinBuilder;
@@ -859,10 +859,17 @@ export class SwapspaceSwapProvider extends SwapProvider {
859
859
  const assetData = this._supportedCoins.find(
860
860
  (i) => i.coin?.ticker === asset?.ticker
861
861
  );
862
- // We return "ID" if the extraIdName is empty
863
- return assetData?.hasExtraId
864
- ? assetData?.extraIdName ?? "ID"
865
- : null;
862
+ if (assetData?.hasExtraId) {
863
+ if (
864
+ assetData?.extraIdName == null ||
865
+ assetData?.extraIdName === ""
866
+ ) {
867
+ // We return some default name if the extraIdName is empty
868
+ return "ID";
869
+ }
870
+ return assetData?.extraIdName;
871
+ }
872
+ return null;
866
873
  } catch (e) {
867
874
  improveAndRethrow(e, "getExtraIdNameIfPresent");
868
875
  }