@kimafinance/kima-transaction-widget 1.0.3 → 1.0.5

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.
@@ -626,9 +626,10 @@ const optionSlice = createSlice({
626
626
  name: 'option',
627
627
  initialState,
628
628
  reducers: {
629
- init: state => {
630
- state.submitted = initialState.submitted;
629
+ initialize: state => {
630
+ state.submitted = false;
631
631
  state.isConfirming = false;
632
+ state.isApproving = false;
632
633
  state.txId = -1;
633
634
  state.serviceFee = -1;
634
635
  state.amount = 0;
@@ -712,7 +713,7 @@ const optionSlice = createSlice({
712
713
  }
713
714
  });
714
715
  const {
715
- init,
716
+ initialize,
716
717
  setTheme,
717
718
  setOriginNetwork,
718
719
  setTargetNetwork,
@@ -2025,7 +2026,7 @@ const StepBox = ({
2025
2026
  }) : step >= index ? index === errorStep ? React.createElement(Warning, null) : React.createElement(Check, null) : null, React.createElement("p", null, item.title)), index === 0 && data !== null && data !== void 0 && data.kimaTxHash ? React.createElement("div", {
2026
2027
  className: 'info-item'
2027
2028
  }, React.createElement("p", null, "Kima TX ID:", ' ', React.createElement(ExternalLink, {
2028
- to: `https://explorer.kima.finance/transactions/${data === null || data === void 0 ? void 0 : data.kimaTxHash}`
2029
+ to: `https://explorer.kima.finance/transfers`
2029
2030
  }, getShortenedAddress((data === null || data === void 0 ? void 0 : data.kimaTxHash) || '')), React.createElement(CopyButton, {
2030
2031
  text: data === null || data === void 0 ? void 0 : data.kimaTxHash
2031
2032
  }))) : null, index === 1 && data !== null && data !== void 0 && data.tssPullHash ? React.createElement("div", {
@@ -2180,7 +2181,6 @@ const TransactionWidget = ({
2180
2181
  const [percent, setPercent] = useState(0);
2181
2182
  const [data, setData] = useState();
2182
2183
  const dispatch = useDispatch();
2183
- const mode = useSelector(selectMode);
2184
2184
  const txId = useSelector(selectTxId);
2185
2185
  const closeHandler = useSelector(selectCloseHandler);
2186
2186
  const successHandler = useSelector(selectSuccessHandler);
@@ -2272,7 +2272,7 @@ const TransactionWidget = ({
2272
2272
  })), loadingStep < 0 ? React.createElement("button", {
2273
2273
  className: 'icon-button',
2274
2274
  onClick: () => {
2275
- if (mode === ModeOptions.bridge) dispatch(init());
2275
+ dispatch(initialize());
2276
2276
  closeHandler();
2277
2277
  }
2278
2278
  }, React.createElement(Cross, {
@@ -6525,6 +6525,7 @@ const TransferWidget = ({
6525
6525
  }, "I need help")), React.createElement("button", {
6526
6526
  className: 'icon-button',
6527
6527
  onClick: () => {
6528
+ dispatch(initialize());
6528
6529
  closeHandler();
6529
6530
  }
6530
6531
  }, React.createElement(Cross, {