@rabbitio/ui-kit 1.0.0-beta.20 → 1.0.0-beta.22

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 CHANGED
@@ -3040,7 +3040,8 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
3040
3040
  })) == null ? void 0 : _this$_supportedCoins.coin;
3041
3041
  }
3042
3042
  return (_this$_supportedCoins2 = (_this$_supportedCoins3 = this._supportedCoins.find(function (item) {
3043
- return item.coin === coin;
3043
+ var _item$coin2, _coin;
3044
+ return ((_item$coin2 = item.coin) == null ? void 0 : _item$coin2.ticker) === ((_coin = coin) == null ? void 0 : _coin.ticker);
3044
3045
  })) == null ? void 0 : _this$_supportedCoins3.iconURL) != null ? _this$_supportedCoins2 : FALLBACK_ICON_URL;
3045
3046
  } catch (e) {
3046
3047
  improveAndRethrow(e, loggerSource);
@@ -3170,11 +3171,11 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
3170
3171
  };
3171
3172
  _proto.getCoinByTickerIfPresent = function getCoinByTickerIfPresent(ticker) {
3172
3173
  try {
3173
- var _item$coin2;
3174
+ var _item$coin3;
3174
3175
  var item = this._supportedCoins.find(function (i) {
3175
3176
  return i.coin.ticker === ticker;
3176
3177
  });
3177
- return (_item$coin2 = item == null ? void 0 : item.coin) != null ? _item$coin2 : null;
3178
+ return (_item$coin3 = item == null ? void 0 : item.coin) != null ? _item$coin3 : null;
3178
3179
  } catch (e) {
3179
3180
  improveAndRethrow(e, "getCoinByTickerIfPresent");
3180
3181
  }
@@ -3329,8 +3330,8 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
3329
3330
  return Promise.resolve(_this8._fetchSupportedCurrenciesIfNeeded()).then(function () {
3330
3331
  var _this8$_supportedCoin, _this8$_supportedCoin2;
3331
3332
  var toCurrencyExtraId = (_this8$_supportedCoin = (_this8$_supportedCoin2 = _this8._supportedCoins.find(function (item) {
3332
- var _item$coin3;
3333
- return ((_item$coin3 = item.coin) == null ? void 0 : _item$coin3.ticker) === (toCoin == null ? void 0 : toCoin.ticker);
3333
+ var _item$coin4;
3334
+ return ((_item$coin4 = item.coin) == null ? void 0 : _item$coin4.ticker) === (toCoin == null ? void 0 : toCoin.ticker);
3334
3335
  })) == null ? void 0 : _this8$_supportedCoin2.extraId) != null ? _this8$_supportedCoin : "";
3335
3336
  var requestData = {
3336
3337
  partner: partner,
@@ -3481,7 +3482,7 @@ var SwapspaceSwapProvider = /*#__PURE__*/function (_SwapProvider) {
3481
3482
  return Date.parse(timeStr.match(/.+[Zz]$/) ? timeStr : timeStr + "Z");
3482
3483
  };
3483
3484
  var expiresAt = toUtcTimestamp(swap.timestamps.expiresAt);
3484
- var isExpiredByTime = expiresAt > Date.now();
3485
+ var isExpiredByTime = expiresAt < Date.now();
3485
3486
  var status = _this9._mapSwapspaceStatusToRabbitStatus(swap.status, isExpiredByTime);
3486
3487
  var toDigits = status === SwapProvider.SWAP_STATUSES.REFUNDED ? fromCoin.digits : toCoin.digits;
3487
3488
  var addressToSendCoinsToSwapspace = swap.from.address;