import type {
	FormattedAutoQuote,
	FormattedQuoteResponse,
} from "@hooks/apis/common/quote/types";

export function isWrapUnwrapCase(quoteData?: FormattedQuoteResponse) {
	if (!quoteData) return false;

	// txData is returned if source token is native & in case of wrap/unwrap
	const { txData, requestHash } = quoteData as FormattedAutoQuote;
	return (
		txData &&
		requestHash ===
			"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" // wrap/unwrap identifier
	);
}
