@@ -146,11 +146,20 @@ const SwapForm = ({
146146 } , [ btcAccount , balances . assets ] ) ;
147147
148148 const toAssets = useMemo ( ( ) => {
149- return fromAssets . filter (
150- ( asset ) =>
151- asset . aggregatedAssetId !== fromAssetId &&
152- asset . aggregatedAssetId !== "BTC"
153- ) ;
149+ return fromAssets . filter ( ( asset ) => {
150+ const isBTC = asset . aggregatedAssetId === "BTC" ;
151+ const isFromAsset = asset . aggregatedAssetId === fromAssetId ;
152+ const isBTCFromAsset = fromAsset ?. aggregatedAssetId === "BTC" ;
153+
154+ // if BTC is the fromAsset, disable AVAX, USDC, APE
155+ const disableUSDC = isBTCFromAsset && asset . symbol === "USDC" ;
156+ const disableAVAX = isBTCFromAsset && asset . symbol === "AVAX" ;
157+ const disableAPE = isBTCFromAsset && asset . symbol === "APE" ;
158+
159+ return (
160+ ! isFromAsset && ! isBTC && ! disableUSDC && ! disableAVAX && ! disableAPE
161+ ) ;
162+ } ) ;
154163 } , [ fromAssetId , fromAssets ] ) ;
155164
156165 if ( mutation . status === "success" ) {
@@ -277,7 +286,7 @@ const SwapForm = ({
277286 : "This is an EVM network swap, make sure to use your [MAIN] Passkey when signing" }
278287 </ p >
279288 < p className = "text-sm text-gray text-center mb-4" >
280- This is a demo app. Transactions are capped at $500
289+ This is a demo app. Transactions are capped at $500.
281290 </ p >
282291 < button
283292 type = "submit"
0 commit comments