const StyledContainer = styled.div` padding-top: 34px; width: 1244px; margin: 0 auto; `; const StyledHeader = styled.div` display: flex; align-items: center; justify-content: space-between; `; const BridgeWrap = styled.div` display: flex; align-items: center; margin: 15px auto 0; padding: 0 18px; gap: 15px; width: 478px; height: 70px; border-radius: 16px; background: rgba(97, 223, 255, 0.15); cursor: pointer; .bridge-icon { width: 26px; height: 26px; } .bridge-body { flex-grow: 1; color: #61dfff; } .bridge-title { font-size: 16px; font-weight: 600; } .bridge-des { font-size: 14px; font-weight: 400; } .bridge-arrow { } `; const networks = { // Linea 59144: { ZeroContract: "0x78354f8DcCB269a615A7e0a24f9B0718FDC3C7A7", LockedZeroTokens: "0x08D5FEA625B1dBf9Bae0b97437303a0374ee02F8", ZeroVotingPower: "0xf374229a18ff691406f99CCBD93e8a3f16B68888", DepositPool: "0xD676c56A93Fe2a05233Ce6EAFEfDe2bd4017B3eA", StakeTokens: [ { name: "ZeroLend", symbol: "ZERO", icon: "https://ipfs.near.social/ipfs/bafkreie3wxdo473yqrrnqnk27iqyy6xbtlq4hojm6kjbmdpnv2cqeit5he", decimals: 18, address: "0x78354f8dccb269a615a7e0a24f9b0718fdc3c7a7", }, ], }, }; State.init({ chainId: -1, // loading: true, isSupport: false, }); const { CHAIN_LIST, curChain, dexConfig, wethAddress, multicallAddress, multicall, prices, onSwitchChain, switchingChain, addAction, toast, chainId, nativeCurrency, isChainSupported, account, windowOpen, selectTab, } = props; const { type } = dexConfig; const supportChainId = 59144; const { StakeTokens } = state; if (!Ethers.provider()) return ( <Widget src="bluebiu.near/widget/Swap.ChainWarnigBox" props={{ chain: curChain, onSwitchChain: onSwitchChain, switchingChain: switchingChain, theme: dexConfig.theme?.button, }} /> ); useEffect(() => { Ethers.provider() .getNetwork() .then((res) => { State.update({ isSupport: supportChainId === res.chainId, chainId: res.chainId, ...networks[res.chainId], }); }) .catch((err) => { console.log("catch-getNetwork-error--", err); }); }, []); return ( <StyledContainer style={dexConfig.theme}> {state.loading ? ( <Widget src="bluebiu.near/widget/Lending.Spinner" /> ) : ( <Widget src="bluebiu.near/widget/AAVE.Stake.Content" props={{ ...props, ...state, supportChainId, }} /> )} </StyledContainer> );