@huma-finance/widgets 0.0.62-beta.597 → 0.0.62-beta.601

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
@@ -23,8 +23,8 @@ import { NumericFormat } from 'react-number-format';
23
23
  import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
24
24
  import dayjs from 'dayjs';
25
25
  import Persona from 'persona';
26
- import moment from 'moment';
27
26
  import { drawdownWithReceivable, HumaContext, HumaReceivableFactory, makePaymentWithReceivable, makePrincipalPaymentAndDrawdownWithReceivable, SubgraphService } from '@huma-finance/sdk';
27
+ import moment from 'moment';
28
28
  import { gql, useQuery, ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client';
29
29
  import Table from '@mui/material/Table';
30
30
  import TableBody from '@mui/material/TableBody';
@@ -4518,10 +4518,11 @@ function ChooseAmount$6(_ref) {
4518
4518
  const lockupEndTime = depositRecord.lastDepositTime.toNumber() + lpConfig.withdrawalLockoutPeriodInDays * SECONDS_IN_A_DAY;
4519
4519
  if (nextEpochStartTime < lockupEndTime) {
4520
4520
  const lockupEndTimeDayjs = dayjs.unix(lockupEndTime).date(1);
4521
+ const withdrawTime = lockupEndTimeDayjs.add(1, 'month');
4521
4522
  dispatch(setStep(WIDGET_STEP.Error));
4522
4523
  dispatch(setError({
4523
4524
  errorReason: 'Redemption too soon',
4524
- errorMessage: "Your last deposit was on ".concat(timestampToLL(depositRecord.lastDepositTime.toNumber()), ". You can redeem on ").concat(timestampToLL(lockupEndTimeDayjs.unix()), ".")
4525
+ errorMessage: "Your last deposit was on ".concat(timestampToLL(depositRecord.lastDepositTime.toNumber()), ". You can begin submitting redemption requests on ").concat(timestampToLL(lockupEndTimeDayjs.unix()), ", which can be redeemed starting ").concat(timestampToLL(withdrawTime.unix()), ".")
4525
4526
  }));
4526
4527
  }
4527
4528
  }
@@ -6264,8 +6265,9 @@ function Success$4(_ref) {
6264
6265
  }, [campaign, dispatch, handleAction, isFirstTimeNotifiUser, notifiChainSupported]);
6265
6266
  const content = ["You successfully supplied ".concat(formatMoney(supplyAmount), " ").concat(symbol, ".")];
6266
6267
  const getSubContent = () => {
6267
- const currentTime = moment().add(lpConfig.withdrawalLockoutPeriodInDays, 'days');
6268
- return ["First redemption date: ".concat(timeUtil.timestampToLL(currentTime.unix()), ". You can redeem end of each month after.")];
6268
+ const redemptionTime = dayjs().add(lpConfig.withdrawalLockoutPeriodInDays, 'day').date(1);
6269
+ const withdrawTime = redemptionTime.add(1, 'month');
6270
+ return ["You can begin submitting redemption requests on ".concat(timeUtil.timestampToLL(redemptionTime.unix()), ", which can be redeemed starting ").concat(timeUtil.timestampToLL(withdrawTime.unix()), ".")];
6269
6271
  };
6270
6272
  const getButtonText = () => {
6271
6273
  if (hasNextStep) {