@kimafinance/kima-transaction-widget 1.2.57-beta.1 → 1.2.58-beta.1

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.js CHANGED
@@ -7923,12 +7923,13 @@ function useCurrencyOptions() {
7923
7923
  var _useState = React.useState('USDK'),
7924
7924
  options = _useState[0],
7925
7925
  setOptions = _useState[1];
7926
+ var mode = reactRedux.useSelector(selectMode);
7926
7927
  var transactionOption = reactRedux.useSelector(selectTransactionOption);
7927
7928
  var nodeProviderQuery = reactRedux.useSelector(selectNodeProviderQuery);
7928
7929
  var originNetwork = reactRedux.useSelector(selectSourceChain);
7929
7930
  var targetNetwork = reactRedux.useSelector(selectTargetChain);
7930
7931
  React.useEffect(function () {
7931
- if (!nodeProviderQuery || !originNetwork || !targetNetwork || !transactionOption) return;
7932
+ if (!nodeProviderQuery || !originNetwork || !targetNetwork || !transactionOption && mode === exports.ModeOptions.payment) return;
7932
7933
  (function () {
7933
7934
  try {
7934
7935
  return _catch(function () {
@@ -7943,7 +7944,7 @@ function useCurrencyOptions() {
7943
7944
  if (originNetwork === exports.SupportNetworks.BTC || targetNetwork === exports.SupportNetworks.BTC) {
7944
7945
  tokenList = ['WBTC'];
7945
7946
  }
7946
- if (transactionOption.currency && tokenList.findIndex(function (item) {
7947
+ if (transactionOption !== null && transactionOption !== void 0 && transactionOption.currency && tokenList.findIndex(function (item) {
7947
7948
  return item === transactionOption.currency;
7948
7949
  }) >= 0) {
7949
7950
  dispatch(setSelectedToken(transactionOption.currency));
@@ -7962,7 +7963,7 @@ function useCurrencyOptions() {
7962
7963
  Promise.reject(e);
7963
7964
  }
7964
7965
  })();
7965
- }, [nodeProviderQuery, originNetwork, targetNetwork, transactionOption]);
7966
+ }, [nodeProviderQuery, originNetwork, targetNetwork, transactionOption, mode]);
7966
7967
  return React.useMemo(function () {
7967
7968
  return {
7968
7969
  options: options