diff --git a/packages/synapse-interface/pages/state-managed-bridge/index.tsx b/packages/synapse-interface/pages/state-managed-bridge/index.tsx index 5cb882de61..fc86e9456e 100644 --- a/packages/synapse-interface/pages/state-managed-bridge/index.tsx +++ b/packages/synapse-interface/pages/state-managed-bridge/index.tsx @@ -437,7 +437,7 @@ const StateManagedBridge = () => { ? destinationAddress : address - const data = await synapseSDK.bridge( + const payload = await synapseSDK.bridge( toAddress, bridgeQuote.routerAddress, fromChainId, @@ -448,20 +448,6 @@ const StateManagedBridge = () => { bridgeQuote.destQuery ) - const payload = - fromToken?.addresses[fromChainId as keyof Token['addresses']] === - zeroAddress || - fromToken?.addresses[fromChainId as keyof Token['addresses']] === '' - ? { - data: data.data, - to: data.to, - value: stringToBigInt( - debouncedFromValue, - fromToken?.decimals[fromChainId] - ), - } - : data - /** Setting custom gas limit for only Polygon transactions */ let gasEstimate = undefined diff --git a/packages/synapse-interface/pages/swap/index.tsx b/packages/synapse-interface/pages/swap/index.tsx index 2e229b1d3c..812446171f 100644 --- a/packages/synapse-interface/pages/swap/index.tsx +++ b/packages/synapse-interface/pages/swap/index.tsx @@ -278,7 +278,7 @@ const StateManagedSwap = () => { chainId: swapChainId, }) - const data = await synapseSDK.swap( + const payload = await synapseSDK.swap( swapChainId, address, swapFromToken.addresses[swapChainId], @@ -286,20 +286,6 @@ const StateManagedSwap = () => { swapQuote.quote ) - const payload = - swapFromToken.addresses[swapChainId as keyof Token['addresses']] === - zeroAddress || - swapFromToken.addresses[swapChainId as keyof Token['addresses']] === '' - ? { - data: data.data, - to: data.to, - value: stringToBigInt( - swapFromValue, - swapFromToken.decimals[swapChainId] - ), - } - : data - const tx = await wallet.sendTransaction(payload) const originChainName = CHAINS_BY_ID[swapChainId]?.name diff --git a/packages/synapse-interface/utils/hooks/useGasEstimator.ts b/packages/synapse-interface/utils/hooks/useGasEstimator.ts index 3bca6a8f10..9f6adccd24 100644 --- a/packages/synapse-interface/utils/hooks/useGasEstimator.ts +++ b/packages/synapse-interface/utils/hooks/useGasEstimator.ts @@ -184,7 +184,7 @@ const getBridgePayload = async ( if (!bridgeQuote) return null try { - const data = await synapseSDK.bridge( + const payload = await synapseSDK.bridge( address, bridgeQuote.routerAddress, fromChainId, @@ -194,18 +194,6 @@ const getBridgePayload = async ( bridgeQuote.originQuery, bridgeQuote.destQuery ) - - const payload = - fromToken?.addresses[fromChainId as keyof Token['addresses']] === - zeroAddress || - fromToken?.addresses[fromChainId as keyof Token['addresses']] === '' - ? { - data: data.data, - to: data.to, - value: stringToBigInt(amount, fromToken?.decimals[fromChainId]), - } - : data - return payload } catch (error) { console.error('getBridgePayload: ', error)