Skip to content

Commit 932414d

Browse files
committed
fix: fallback needs to be sdk action
1 parent 6400f6e commit 932414d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/transactions/Supply/SupplyModalContentSDK.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ import { AAVEWarning } from '../Warnings/AAVEWarning';
5353
import { IsolationModeWarning } from '../Warnings/IsolationModeWarning';
5454
import { SNXWarning } from '../Warnings/SNXWarning';
5555
import { USDTResetWarning } from '../Warnings/USDTResetWarning';
56-
import { SupplyActions } from './SupplyActions';
5756
import { SupplyActionsSDK } from './SupplyActionsSDK';
5857
import { SupplyWrappedTokenActionsSDK } from './SupplyWrappedTokenActionsSDK';
5958

@@ -116,7 +115,9 @@ export const SupplyModalContentWrapperSDK = (
116115
(r) => r.tokenOut.underlyingAsset === params.underlyingAsset
117116
),
118117
};
119-
118+
// Decide which Supply Modal Content to render
119+
// Wrapped-token flow (sDAI/DAI wrapper) uses a dedicated Actions component
120+
// For other assets, the standard SupplyModalContentSDK is used
120121
return canSupplyAsWrappedToken ? (
121122
<SupplyWrappedTokenModalContentSDK {...props} />
122123
) : (
@@ -581,7 +582,8 @@ export const SupplyWrappedTokenModalContentSDK = ({
581582
</TxModalDetails>
582583

583584
{txError && <GasEstimationError txError={txError} />}
584-
585+
{/* dedicated Actions component for wrapped token supply
586+
fallback to standard SupplyActionsSDK for plain ERC20 supply */}
585587
{supplyingWrappedToken ? (
586588
<SupplyWrappedTokenActionsSDK
587589
tokenWrapperAddress={wrappedTokenConfig.tokenWrapperAddress}
@@ -593,7 +595,7 @@ export const SupplyWrappedTokenModalContentSDK = ({
593595
reserve={poolReserve}
594596
/>
595597
) : (
596-
<SupplyActions
598+
<SupplyActionsSDK
597599
isWrongNetwork={isWrongNetwork}
598600
amountToSupply={amount}
599601
poolAddress={poolReserve.underlyingToken.address}

0 commit comments

Comments
 (0)