diff --git a/chain-registry b/chain-registry index 5d657626..db73b240 160000 --- a/chain-registry +++ b/chain-registry @@ -1 +1 @@ -Subproject commit 5d657626086f156c08ebf92831c31e1d40346b54 +Subproject commit db73b2409bb83281430850bdea6787094426daf4 diff --git a/initia-registry b/initia-registry index a25fc5e6..7ddb1548 160000 --- a/initia-registry +++ b/initia-registry @@ -1 +1 @@ -Subproject commit a25fc5e6d676b0e3d6dc1ee899c6b854ed0ae148 +Subproject commit 7ddb15484218d2104fd40b9687580b394d602ba7 diff --git a/src/components/SwapWidget/SwapDetails.tsx b/src/components/SwapWidget/SwapDetails.tsx index 4f157680..1047a680 100644 --- a/src/components/SwapWidget/SwapDetails.tsx +++ b/src/components/SwapWidget/SwapDetails.tsx @@ -69,11 +69,11 @@ export const SwapDetails = ({ } }, [axelarTransferOperation, hyperlaneTransferOperation]); - const isRapidRelay = route.estimatedFees?.some((fee) => fee.feeType === "RAPID_RELAY"); + const isSmartRelay = route.estimatedFees?.some((fee) => fee.feeType === "SMART_RELAY"); - const rapidRelayFee = useMemo(() => { - if (!isRapidRelay) return; - const fee = route.estimatedFees.filter((fee) => fee.feeType === "RAPID_RELAY"); + const smartRelayFee = useMemo(() => { + if (!isSmartRelay) return; + const fee = route.estimatedFees.filter((fee) => fee.feeType === "SMART_RELAY"); const sameAsset = fee.every((fee, i, arr) => fee.originAsset.symbol === arr[0].originAsset.symbol); if (!sameAsset) return; const computedAmount = fee.reduce((acc, fee) => acc + Number(fee.amount), 0); @@ -87,14 +87,14 @@ export const SwapDetails = ({ inAsset: `${inAsset} ${fee[0].originAsset.symbol}`, inUSD: `${formatUSD(computedUsd)}`, }; - }, [isRapidRelay, route.estimatedFees]); + }, [isSmartRelay, route.estimatedFees]); const totalAmountOut = useMemo(() => { - if (isRapidRelay) { - return String(parseFloat(amountOut) + (rapidRelayFee?.amount || 0)); + if (isSmartRelay) { + return String(parseFloat(amountOut) + (smartRelayFee?.amount || 0)); } return amountOut; - }, [amountOut, isRapidRelay, rapidRelayFee?.amount]); + }, [amountOut, isSmartRelay, smartRelayFee?.amount]); if (!(sourceChain && sourceAsset && destinationChain && destinationAsset)) { return null; @@ -231,12 +231,12 @@ export const SwapDetails = ({ )} - {rapidRelayFee && ( + {smartRelayFee && ( <>
Relayer Fee
- {rapidRelayFee?.inAsset ?? "-"}{" "} - {rapidRelayFee?.inUSD ?? "-"} + {smartRelayFee?.inAsset ?? "-"}{" "} + {smartRelayFee?.inUSD ?? "-"}
)} diff --git a/src/solve/queries.ts b/src/solve/queries.ts index 42f11240..0b57a138 100644 --- a/src/solve/queries.ts +++ b/src/solve/queries.ts @@ -132,7 +132,7 @@ export function useRoute({ allowMultiTx: true, allowUnsafe: true, experimentalFeatures, - rapidRelay: true, + smartRelay: true, } : { amountOut: amount, @@ -144,7 +144,7 @@ export function useRoute({ allowMultiTx: true, allowUnsafe: true, experimentalFeatures, - rapidRelay: true, + smartRelay: true, }, );