@huma-finance/widgets 0.0.51-beta.385 → 0.0.51-beta.393
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/cjs/index.cjs +5 -6
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/Lend/cancelRedemptionV2 /2-Done.tsx +2 -4
- package/src/components/Lend/supply/2-ChooseAmount.tsx +6 -8
- package/src/components/Lend/supply/4-Transfer.tsx +6 -2
- package/src/components/Lend/supplyV2/index.tsx +0 -2
package/dist/index.js
CHANGED
|
@@ -4623,7 +4623,7 @@ function Done$1(_ref) {
|
|
|
4623
4623
|
handleAction
|
|
4624
4624
|
} = _ref;
|
|
4625
4625
|
const shares = ethers.utils.formatUnits(redemptionInfo.shares, poolUnderlyingToken.decimals);
|
|
4626
|
-
const content = ["
|
|
4626
|
+
const content = ["You successfully canceled ".concat(shares, " shares redemption request.")];
|
|
4627
4627
|
return jsx(TxDoneModal, {
|
|
4628
4628
|
handleAction: handleAction,
|
|
4629
4629
|
content: content
|
|
@@ -5098,8 +5098,8 @@ function ChooseAmount$5(_ref) {
|
|
|
5098
5098
|
decimals
|
|
5099
5099
|
} = poolUnderlyingToken;
|
|
5100
5100
|
const [currentAmount, setCurrentAmount] = useState(0);
|
|
5101
|
-
const depositAmount = upScale(currentAmount, decimals);
|
|
5102
|
-
const needApprove =
|
|
5101
|
+
const depositAmount = upScale(BigNumber.from(currentAmount), decimals);
|
|
5102
|
+
const needApprove = depositAmount.gt(allowance);
|
|
5103
5103
|
const withdrawlLockoutDays = timeUtil.secondsToDays(withdrawlLockoutSeconds);
|
|
5104
5104
|
const handleChangeAmount = useCallback(newAmount => {
|
|
5105
5105
|
setCurrentAmount(newAmount);
|
|
@@ -5150,7 +5150,7 @@ function Transfer$6(_ref) {
|
|
|
5150
5150
|
const {
|
|
5151
5151
|
decimals
|
|
5152
5152
|
} = poolInfo.poolUnderlyingToken;
|
|
5153
|
-
const supplyBigNumber =
|
|
5153
|
+
const supplyBigNumber = upScale(BigNumber.from(supplyAmount), decimals);
|
|
5154
5154
|
const handleSuccess = useCallback(() => {
|
|
5155
5155
|
dispatch(setStep(WIDGET_STEP.Done));
|
|
5156
5156
|
}, [dispatch]);
|
|
@@ -5816,10 +5816,9 @@ function LendSupplyV2(_ref) {
|
|
|
5816
5816
|
}
|
|
5817
5817
|
if (poolInfo.supplyLink) {
|
|
5818
5818
|
openInNewTab(poolInfo.supplyLink);
|
|
5819
|
-
handleClose();
|
|
5820
5819
|
}
|
|
5821
5820
|
}
|
|
5822
|
-
}, [dispatch,
|
|
5821
|
+
}, [dispatch, lenderApproveStatusFetched, lenderApprovedJunior, lenderApprovedSenior, poolInfo, step]);
|
|
5823
5822
|
if (!poolInfo || !poolUnderlyingToken || !lenderApproveStatusFetched) {
|
|
5824
5823
|
return jsx(WidgetWrapper, {
|
|
5825
5824
|
isOpen: true,
|