@huma-finance/widgets 0.0.61-beta.544 → 0.0.61-beta.547

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
@@ -6263,6 +6263,7 @@ function PointsEarned(_ref) {
6263
6263
  const theme = useTheme();
6264
6264
  const isDev = checkIsDev();
6265
6265
  const dispatch = useDispatch();
6266
+ const reset = useResetAtom(txAtom);
6266
6267
  const {
6267
6268
  account,
6268
6269
  chainId
@@ -6326,6 +6327,11 @@ function PointsEarned(_ref) {
6326
6327
  };
6327
6328
  updateWalletPoints();
6328
6329
  }, [account, chainId, dispatch, isDev, pointsTestnetExperience, transactionHash, walletOwnership]);
6330
+ const handleCloseModal = useCallback(() => {
6331
+ reset();
6332
+ dispatch(resetState());
6333
+ handleAction();
6334
+ }, [dispatch, handleAction, reset]);
6329
6335
  const styles = {
6330
6336
  wrapper: css(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteral(["\n height: 518px;\n position: relative;\n "]))),
6331
6337
  congrats: css(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral(["\n margin: ", ";\n "])), theme.spacing(-4, -4.5, 0, -4.5)),
@@ -6373,7 +6379,7 @@ function PointsEarned(_ref) {
6373
6379
  }), " for", ' ', monthText, " straight. Plus, If you keep your investment till after", ' ', monthText, ", you\u2019ll gain extra points daily."]
6374
6380
  }), jsx(BottomButton, {
6375
6381
  variant: "contained",
6376
- onClick: handleAction,
6382
+ onClick: handleCloseModal,
6377
6383
  children: "GREAT"
6378
6384
  })]
6379
6385
  });