UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

17 lines 617 B
import { getChainTypeFromAddress } from '../../utils/chainType.js'; export const attemptToFindMatchingToAddressInConfig = (address, config) => { if (config.toAddress && config.toAddress.address === address) { return config.toAddress; } if (config.toAddresses?.length) { const matchingToAddress = config.toAddresses.find((toAddress) => toAddress.address === address); if (matchingToAddress) { return matchingToAddress; } } return { address: address, chainType: getChainTypeFromAddress(address), }; }; //# sourceMappingURL=utils.js.map