The post Crypto News: Bankman-Fried’s Family Seeks Trump Pardon After Ulbricht’s Release appeared first on Coinpedia Fintech News The parents of Sam Bankman-Fried, the founder of FTX who was sentenced to 25 years for fraud, are reportedly seeking a possible pardon from President Donald Trump. According to Bloomberg, they have met with lawyers and figures connected to Trump’s circle to explore their options. Bankman-Fried, who is also appealing his conviction, argues that his sentence is excessive, especially considering that most FTX customers have managed to recover their funds. This push for clemency follows a trend set by Trump’s previous pardons, including that of Ross Ulbricht, the founder of the Silk Road marketplace. Ulbricht was convicted in 2015 for running an online platform Silk Road that facilitated over $200 million in illegal transactions. Trump granted Ulbricht a pardon, citing his libertarian views and the belief that his sentence was excessive. This move has sparked growing support for Ulbricht, particularly within libertarian circles. While Bankman-Fried’s case lacks broad public support, his legal team is pushing for a pardon by leveraging Trump’s history of granting clemency, which has often been based on informal appeals rather than traditional Justice Department channels. Bankman-Fried is not alone in his pursuit; Ryan Salame, another former FTX executive, is also reportedly exploring similar efforts for a pardon. As Trump’s administration has been more open to considering clemency for controversial cases, including Ulbricht’s, the push for a pardon signals a shift in the broader landscape of white-collar criminal justice. However, no formal outreach to the White House regarding Bankman-Fried’s case has been confirmed as of now.
coinpedia
You can visit the page to read the article.
Source: coinpedia
Disclaimer: The opinion expressed here is not investment advice – it is provided for informational purposes only. It does not necessarily reflect the opinion of BitMaden. Every investment and all trading involves risk, so you should always perform your own research prior to making decisions. We do not recommend investing money you cannot afford to lose.
Cardano (ADA) at Risk: Breakdown Signal Suggests Further Decline
Cardano price started a fresh decline from the $1.00 zone. ADA is consolidating and might continue to move down below the $0.9350 support. ADA price started a fresh decline from the $1.00 zone. The price is trading below $0.950 and the 100-hourly simple moving average. There was a break below a key bullish trend line with support at $0.950 on the hourly chart of the ADA/USD pair (data source from Kraken). The pair could start another decline if it trades below the $0.9350 support zone. Cardano Price Turns Red After struggling to stay above the $1.00 level, Cardano started a fresh decline unlike Bitcoin and Ethereum . ADA declined below the $0.9650 and $0.950 support levels. There was a clear move below the $0.950 support zone. Besides, there was a break below a key bullish trend line with support at $0.950 on the hourly chart of the ADA/USD pair. The pair even traded below the 50% Fib retracement level of the upward move from the $0.9007 swing low to the $0.9881 high. Cardano price is now trading below $0.950 and the 100-hourly simple moving average. On the upside, the price might face resistance near the $0.950 zone. The first resistance is near $0.9650. The next key resistance might be $0.9880. If there is a close above the $0.9880 resistance, the price could start a strong rally. In the stated case, the price could rise toward the $1.00 region. Any more gains might call for a move toward $1.050 in the near term. Another Decline in ADA? If Cardano’s price fails to climb above the $0.950 resistance level, it could start another decline. Immediate support on the downside is near the $0.940 level and the 100-hourly simple moving average. The next major support is near the $0.9350 level or the 61.8% Fib retracement level of the upward move from the $0.9007 swing low to the $0.9881 high. A downside break below the $0.9350 level could open the doors for a test of $0.9040. The next major support is near the $0.8550 level where the bulls might emerge. Technical Indicators Hourly MACD – The MACD for ADA/USD is gaining momentum in the bearish zone. Hourly RSI (Relative Strength Index) – The RSI for ADA/USD is now below the 50 level. Major Support Levels – $0.9400 and $0.9350. Major Resistance Levels – $0.9500 and $0.9880. coinpedia
{ if (listofcategory.subscribe_status === 1) { if (!listOfSubscribed.includes(listofcategory._id)) { listOfSubscribed.push(listofcategory._id); } if (!idstosubscribed.includes(listofcategory.news_cp_category_row_id)) { idstosubscribed.push(listofcategory.news_cp_category_row_id); } } }); idstosubscribed.forEach(id => { var subscribeButton = document.getElementById(`subscribe_` + id); var unsubscribeButton = document.getElementById(`unsubscribe_` + id); if (subscribeButton && unsubscribeButton) { subscribeButton.style.display = `none`; unsubscribeButton.style.display = `block`; var showDownloadReport = document.getElementById(`download_report`); if (showDownloadReport) { showDownloadReport.style.display = `block`; } } }); } }, error: function(xhr, status, error) { console.error(`Error:`, error); } }); } function subscribe_unsubscribe_status(getcategoryId) { var elementTounsubscribe = parent.document.getElementById(`unsubscribe_` + getcategoryId); var elementTosubscribe = parent.document.getElementById(`subscribe_` + getcategoryId); jQuery.ajax({ url: `https://coinpedia.org/wp-admin/admin-ajax.php`, type: `POST`, data: { action: `subscribe_api_ajax_request`, apiurl: `/app/email_newsletter/list?category_row_id=` + getcategoryId, }, success: function(response) { var result = JSON.parse(response.message); if (result.status === true) { parent.jQuery(`.skeliton-loader-block`).hide(); var hasSubscribeStatusOne = false; result.message.forEach(subscribeStatus => { if (listOfSubscribed.includes(subscribeStatus._id) && subscribeStatus.subscribe_status === 1) { hasSubscribeStatusOne = true; } if (subscribeStatus.notification_type === 3) { parent.document.getElementById(`monthlySelected_` + getcategoryId).style.display = `block`; parent.document.getElementById(`monthly_` + getcategoryId).setAttribute(`data-id`, subscribeStatus._id); if (subscribeStatus.subscribe_status === 1) { parent.document.getElementById(`monthly_` + getcategoryId).checked = true; } } else if (subscribeStatus.notification_type === 2) { parent.document.getElementById(`weeklySelected_` + getcategoryId).style.display = `block`; parent.document.getElementById(`weekly_` + getcategoryId).setAttribute(`data-id`, subscribeStatus._id); if (subscribeStatus.subscribe_status === 1) { parent.document.getElementById(`weekly_` + getcategoryId).checked = true; } } else if (subscribeStatus.notification_type === 1) { parent.document.getElementById(`dailySelected_` + getcategoryId).style.display = `block`; parent.document.getElementById(`daily_` + getcategoryId).setAttribute(`data-id`, subscribeStatus._id); if (subscribeStatus.subscribe_status === 1) { parent.document.getElementById(`daily_` + getcategoryId).checked = true; } } if (subscribeStatus.subscribe_status === 1) { listOfSubscribed.push(subscribeStatus._id); } }); if (hasSubscribeStatusOne) { elementTosubscribe.style.display = `none`; elementTounsubscribe.style.display = `block`; } else { elementTosubscribe.style.display = `block`; elementTounsubscribe.style.display = `none`; } } }, error: function(xhr, status, error) { console.error(`Error:`, error); } }); } function logSelectedSubscriptions(categoryid) { var unsubscribemodal = document.querySelector(`.unsubscribed-popup-modal .modal`); var subscribedmodal = document.querySelector(`.subscribed-popup-modal .modal`); unsubscribemodal.innerHTML=``; subscribedmodal.innerHTML=``; var selectedSubscriptions = []; var storeCheckedId = []; var checkboxes = document.querySelectorAll(`#subscription-options-` + categoryid + ` input[type="checkbox"]`); var errorMessage = document.getElementById(`error-message-select`); // Use a Set to handle unique data-ids var uniqueSubscribedIds = new Set(listOfSubscribed); checkboxes.forEach(function(checkbox) { var dataId = parseInt(checkbox.getAttribute(`data-id`)); if (checkbox.checked) { selectedSubscriptions.push(checkbox.id); storeCheckedId.push(dataId); } else { uniqueSubscribedIds.delete(dataId); // Remove unchecked data-id } }); // Update listOfSubscribed with unique values listOfSubscribed = Array.from(uniqueSubscribedIds); var selectedSubscriptionsString = selectedSubscriptions.join(`, `); var concatinateSubscribeId = [...new Set(storeCheckedId.concat(listOfSubscribed))]; var categoryData = { `subscribed_categories`: concatinateSubscribeId }; var requestSubscriberData = { action: `handle_dynamic_api_request_with_headers`, security: `6845842805`, endpoint: `/app/email_newsletter/update_categories`, token: ``, data: categoryData }; jQuery.ajax({ url: `https://coinpedia.org/wp-admin/admin-ajax.php`, type: `POST`, data: requestSubscriberData, beforeSend: function(xhr) { xhr.setRequestHeader(`X-Requested-With`, `XMLHttpRequest`); }, success: function(response) { try { response = response.data; if (storeCheckedId.length === 0) { var unsubcribedPopUpmodal = ` You’ve Unsubscribed Successfully We`re sorry to see you go! Your subscription has been canceled. If you change your mind, you can re-subscribe anytime. Thank you for being part of our community! `; unsubscribemodal.innerHTML = unsubcribedPopUpmodal; document.querySelector(`#subscribe-modal-design .modal`).style.display = `none`; unsubscribemodal.style.display = `block`; unsubscribemodal.classList.remove(`hide`); unsubscribemodal.classList.add(`show`); document.getElementById(`subscribe_` + categoryid).style.display = `block`; document.getElementById(`unsubscribe_` + categoryid).style.display = `none`; var showDownloadReport = document.getElementById(`download_report`); if (showDownloadReport) { showDownloadReport.style.display = `none`; } } else { var subscribedPopupModal = ` Thank you for subscribing! Thank you for subscribing to our crypto and blockchain newsletter! You’ll now receive the latest news, insights, and updates straight to your inbox. Welcome to our community! `; let selectedSubscriptionsArray = selectedSubscriptionsString.split(`,`); let subscribedCategories = selectedSubscriptionsArray.map(subscription => subscription.split(`_`)[0]); let subscribedCategoriesString = subscribedCategories.join(`, `); subscribedmodal.innerHTML = subscribedPopupModal; if (document.getElementById(`selectidname`)) { document.getElementById(`selectidname`).textContent = subscribedCategoriesString; } document.querySelector(`#subscribe-modal-design .modal`).style.display = `none`; subscribedmodal.style.display = `block`; subscribedmodal.classList.remove(`hide`); subscribedmodal.classList.add(`show`); document.getElementById(`subscribe_` + categoryid).style.display = `none`; document.getElementById(`unsubscribe_` + categoryid).style.display = `block`; var showDownloadReport = document.getElementById(`download_report`); if (showDownloadReport) { showDownloadReport.style.display = `block`; } } } catch (e) { console.error(`Error parsing response:`, e); } }, }); } function closeModal(template_id) { var modalId = template_id; var modal = document.querySelector(`#` + modalId); // Using querySelector to find the modal if (modal) { modal.classList.add(`hide`); modal.classList.remove(`show`); setTimeout(function() { modal.style.display = `none`; }, 500); } else { console.warn(`Modal not found:`, modalId); } } function closeunsubscribemodal() { var unsubscribemodal = document.querySelector(`.unsubscribed-popup-modal .modal`); if (unsubscribemodal) { unsubscribemodal.classList.add(`hide`); unsubscribemodal.classList.remove(`show`); } setTimeout(function() { unsubscribemodal.style.display = `none`; }, 500); } function closesubscribemodal() { var subscribedmodal = document.querySelector(`.subscribed-popup-modal .modal`); setTimeout(function() { subscribedmodal.style.display = `none`; }, 500); if (subscribedmodal) { subscribedmodal.classList.add(`hide`); subscribedmodal.classList.remove(`show`); } } function withoutLoginClicked(withoutlogin_id) { localStorage.setItem(`subscribe_without_Login`, `true`); localStorage.setItem(`subscribe_clicked_id`, withoutlogin_id); } document.addEventListener(`DOMContentLoaded`, function() { const subscribewithoutData = localStorage.getItem(`subscribe_without_Login`); const subscribe_clicked_cat_id = localStorage.getItem(`subscribe_clicked_id`); // Function to get cookies function getCookie(name) { let value = "; " + document.cookie; let parts = value.split("; " + name + "="); if (parts.length == 2) return parts.pop().split(";").shift(); } // Get user token from cookies const userToken = getCookie(`user_token`); if (subscribewithoutData === `true` && userToken) { // Call the modal function with the category ID subscribed_popupmodal(subscribe_clicked_cat_id); // Remove the flag and category ID from localStorage localStorage.removeItem(`subscribe_without_Login`); localStorage.removeItem(`subscribe_clicked_id`); } }); /************************** update susbcriber content **************************** */ function initializeSubscriptionButton() { var initialListItems = document.querySelectorAll(`.subscription-options input[type="checkbox"]`); initialListItems.forEach(function(item) { console.log(item.checked, `Initial Checkbox checked status`); }); var listItems = document.querySelectorAll(`.subscription-options li`); if (listItems.length === 0) return; var anyActive = false; listItems.forEach(function(item) { var checkbox = item.querySelector(`input[type="checkbox"]`); if (checkbox) { if (checkbox.checked) { item.classList.add(`active`); anyActive = true; // Set anyActive to true } else { item.classList.remove(`active`); // Remove `active` class if checkbox is unchecked } } }); } function updateButtonText(anyActive) { var subscribeButtonSpan = document.querySelector(`.subscribe-submit .changeBtnText`); if (subscribeButtonSpan) { if (anyActive) { subscribeButtonSpan.textContent = `Subscribe Now`; } else { subscribeButtonSpan.textContent = `Unsubscribe`; } } } function updateSubscriptionButton() { var listItems = document.querySelectorAll(`.subscription-options li`); if (listItems.length === 0) return; var anyActive = false; listItems.forEach(function(item) { var checkbox = item.querySelector(`input[type="checkbox"]`); if (checkbox) { if (checkbox.checked) { item.classList.add(`active`); anyActive = true; // Set anyActive to true } else { item.classList.remove(`active`); // Remove `active` class if checkbox is unchecked } } }); // Update the button text based on whether any list item has the `active` class updateButtonText(anyActive); } document.addEventListener(`click`, function(event) { var clickedItem = event.target.closest(`.subscription-options li`); if (clickedItem) { var checkbox = clickedItem.querySelector(`input[type="checkbox"]`); if (checkbox) { checkbox.checked = !checkbox.checked; updateSubscriptionButton(); } } });" class="img-fluid">
Pump.fun Faces $500M Lawsuit: Are Memecoins Securities?
The post Pump.fun Faces $500M Lawsuit: Are Memecoins Securities? appeared first on Coinpedia Fintech News Memecoin platform Pump.fun is once again in legal scoop as a proposed class action lawsuit accuses it of violating U.S. securities laws. The lawsuit claims that all tokens are created on Pump. fun’s platform qualifies as securities, and the company has raked in nearly $500 million in fees by enabling users to launch memecoins . Filed in the Southern District of New York, the case brings up the ongoing debate of when a token is considered a security. Legal Battle Heats Up The lead plaintiff, Diego Aguilar, alleges he suffered financial losses trading Pump. fun-created tokens FWOG, FRED, and GRIFFAIN. Although Pump.fun doesn’t directly create tokens, the lawsuit argues that by providing an automated launchpad for memecoins, the company acts as a “joint issuer.” The suit targets the U.K.-registered Baton Corporation, believed to operate Pump.fun, along with its co-founders. **LAWSUIT ALERT** Burwick Law and @WolfPopperLLP have filed a second federal class action lawsuit on behalf of investors against the PumpdotFun platform. Full complaint available below. — Burwick Law (@BurwickLaw) January 30, 2025 Protecting the investor interest, Burwick Law and Wolf Pepper LLP jointly filed a lawsuit against the platform for harming investors with memecoin scams and broken promises. The firm says it has been working with people who lost money due to rug pulls and fraud. It also criticized Pump.fun for making hundreds of millions in fees while allowing harmful and offensive content on its platform. However, an X user in his post shared his thoughts on the securities controversy, known as Apate pointing out that memecoins were explicitly excluded from being classified as securities under the 1987 Securities Exchange Act amendment. He also highlights that the SEC lost a similar case in 2019 involving Dogecoin derivatives, suggesting a tough legal road ahead for regulators trying to label memecoins as securities. Not Their First Lawsuit This isn’t the first legal battle for Pump.fun. The same law firm, Wolf Popper LLP, previously sued the company over the PNUT token , which once hit a $1 billion market cap but has since plummeted by 89%. Another suit targeted the HAWK token, associated with influencer Hailey Welch. .article-inside-link { margin-left: 0 !important; border: 1px solid #0052CC4D; border-left: 0; border-right: 0; padding: 10px 0; text-align: left; } .entry ul.article-inside-link li { font-size: 14px; line-height: 21px; font-weight: 600; list-style-type: none; margin-bottom: 0; display: inline-block; } .entry ul.article-inside-link li:last-child { display: none; } Also Read : Crypto News: Bankman-Fried’s Family Seeks Trump Pardon After Ulbricht’s Release , Market sentiment Despite the controversy and lawsuits, memecoins have seen massive growth in early 2025. A clear sign of this is Pump.fun’s record transaction volume, surpassing even major networks like Solana and Ethereum. In the past month, Pump.fun made $116.72 million in revenue, beating Solana’s $116.46 million and Ethereum’s $107.64 million. In just 24 hours, trading volume hit $295.53 million, with fees soaring to $1.45 billion. Regulatory Challenges Loom Pump.fun has faced scrutiny since its launch, including a warning from the U.K. financial regulator and criticism for its now-disabled livestream feature, which some users misused. Meanwhile, the SEC under the Trump administration is shifting its approach to crypto regulation , which might change the crypto game for violators. .article_register_shortcode { padding: 18px 24px; border-radius: 8px; display: flex; align-items: center; margin: 6px 0 22px; border: 1px solid #0052CC4D; background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 82, 204, 0.1) 100%); } .article_register_shortcode .media-body h5 { color: #000000; font-weight: 600; font-size: 20px; line-height: 22px; } .article_register_shortcode .media-body h5 span { color: #0052CC; } .article_register_shortcode .media-body p { font-weight: 400; font-size: 14px; line-height: 22px; color: #171717B2; margin-top: 4px; } .article_register_shortcode .media-body{ padding-right: 14px; } .article_register_shortcode .media-button a { float: right; } .article_register_shortcode .primary-button img{ vertical-align: middle; } @media (min-width: 581px) and (max-width: 991px) { .article_register_shortcode .media-body p { margin-bottom: 0; } } @media (max-width: 580px) { .article_register_shortcode { display: block; padding: 20px; } .article_register_shortcode img { max-width: 50px; } .article_register_shortcode .media-body h5 { font-size: 16px; } .article_register_shortcode .media-body { margin-left: 0px; } .article_register_shortcode .media-body p { font-size: 13px; line-height: 20px; margin-top: 6px; margin-bottom: 14px; } .article_register_shortcode .media-button a { float: unset; } .article_register_shortcode .secondary-button { margin-bottom: 0; } } Never Miss a Beat in the Crypto World! Stay ahead with breaking news, expert analysis, and real-time updates on the latest trends in Bitcoin, altcoins, DeFi, NFTs, and more. .subscription-options li { display: none; } .research-report-subscribe{ background-color: #0052CC; padding: 12px 20px; border-radius: 8px; color: #fff; font-weight: 500; font-size: 14px; width: 96%; } .research-report-subscribe img{ vertical-align: sub; margin-right: 2px; } Subscribe to News var templateIds = "6"; var listOfSubscribed = []; function subscribed_popupmodal(template_id) { var templateId = `6`; getAllSubscriberCategoryList([templateId]); var subcribemodal = window.parent.document.getElementById(`subscribe-modal-design`); if (subcribemodal) { var modalContent = ` Never Miss a Beat in the Crypto World! Stay informed and gain the edge you need to navigate the crypto world. Select your subscription now Daily Get real-time crypto news, market insights, and blockchain updates. Weekly Stay updated with major trends, funding news, and price analysis. Monthly Receive a detailed report with market analysis and expert predictions. Subscribe Now `; subcribemodal.innerHTML = modalContent; } subscribe_unsubscribe_status(template_id); //getAllSubscriberCategoryList(template_id); } function toggleSubscription(subscription, template_id) { var subscriptionCheckbox = document.getElementById(subscription + `_` + template_id); var li = document.getElementById(subscription + `Selected_` + template_id); if (subscriptionCheckbox.checked) { li.classList.add(`active`); } else { li.classList.remove(`active`); } } function getAllSubscriberCategoryList(getcategoryId) { jQuery.ajax({ url: `https://coinpedia.org/wp-admin/admin-ajax.php`, type: `GET`, data: { action: `subscribe_api_ajax_request`, apiurl: `/app/email_newsletter/list`, }, success: function(response) { var result = JSON.parse(response.message); if (result.status === true) { var idstosubscribed = [] // Populate listOfSubscribed with subscribed category IDs result.message.forEach(listofcategory => { if (listofcategory.subscribe_status === 1) { if (!listOfSubscribed.includes(listofcategory._id)) { listOfSubscribed.push(listofcategory._id); } if (!idstosubscribed.includes(listofcategory.news_cp_category_row_id)) { idstosubscribed.push(listofcategory.news_cp_category_row_id); } } }); idstosubscribed.forEach(id => { var subscribeButton = document.getElementById(`subscribe_` + id); var unsubscribeButton = document.getElementById(`unsubscribe_` + id); if (subscribeButton && unsubscribeButton) { subscribeButton.style.display = `none`; unsubscribeButton.style.display = `block`; var showDownloadReport = document.getElementById(`download_report`); if (showDownloadReport) { showDownloadReport.style.display = `block`; } } }); } }, error: function(xhr, status, error) { console.error(`Error:`, error); } }); } function subscribe_unsubscribe_status(getcategoryId) { var elementTounsubscribe = parent.document.getElementById(`unsubscribe_` + getcategoryId); var elementTosubscribe = parent.document.getElementById(`subscribe_` + getcategoryId); jQuery.ajax({ url: `https://coinpedia.org/wp-admin/admin-ajax.php`, type: `POST`, data: { action: `subscribe_api_ajax_request`, apiurl: `/app/email_newsletter/list?category_row_id=` + getcategoryId, }, success: function(response) { var result = JSON.parse(response.message); if (result.status === true) { parent.jQuery(`.skeliton-loader-block`).hide(); var hasSubscribeStatusOne = false; result.message.forEach(subscribeStatus => { if (listOfSubscribed.includes(subscribeStatus._id) && subscribeStatus.subscribe_status === 1) { hasSubscribeStatusOne = true; } if (subscribeStatus.notification_type === 3) { parent.document.getElementById(`monthlySelected_` + getcategoryId).style.display = `block`; parent.document.getElementById(`monthly_` + getcategoryId).setAttribute(`data-id`, subscribeStatus._id); if (subscribeStatus.subscribe_status === 1) { parent.document.getElementById(`monthly_` + getcategoryId).checked = true; } } else if (subscribeStatus.notification_type === 2) { parent.document.getElementById(`weeklySelected_` + getcategoryId).style.display = `block`; parent.document.getElementById(`weekly_` + getcategoryId).setAttribute(`data-id`, subscribeStatus._id); if (subscribeStatus.subscribe_status === 1) { parent.document.getElementById(`weekly_` + getcategoryId).checked = true; } } else if (subscribeStatus.notification_type === 1) { parent.document.getElementById(`dailySelected_` + getcategoryId).style.display = `block`; parent.document.getElementById(`daily_` + getcategoryId).setAttribute(`data-id`, subscribeStatus._id); if (subscribeStatus.subscribe_status === 1) { parent.document.getElementById(`daily_` + getcategoryId).checked = true; } } if (subscribeStatus.subscribe_status === 1) { listOfSubscribed.push(subscribeStatus._id); } }); if (hasSubscribeStatusOne) { elementTosubscribe.style.display = `none`; elementTounsubscribe.style.display = `block`; } else { elementTosubscribe.style.display = `block`; elementTounsubscribe.style.display = `none`; } } }, error: function(xhr, status, error) { console.error(`Error:`, error); } }); } function logSelectedSubscriptions(categoryid) { var unsubscribemodal = document.querySelector(`.unsubscribed-popup-modal .modal`); var subscribedmodal = document.querySelector(`.subscribed-popup-modal .modal`); unsubscribemodal.innerHTML=``; subscribedmodal.innerHTML=``; var selectedSubscriptions = []; var storeCheckedId = []; var checkboxes = document.querySelectorAll(`#subscription-options-` + categoryid + ` input[type="checkbox"]`); var errorMessage = document.getElementById(`error-message-select`); // Use a Set to handle unique data-ids var uniqueSubscribedIds = new Set(listOfSubscribed); checkboxes.forEach(function(checkbox) { var dataId = parseInt(checkbox.getAttribute(`data-id`)); if (checkbox.checked) { selectedSubscriptions.push(checkbox.id); storeCheckedId.push(dataId); } else { uniqueSubscribedIds.delete(dataId); // Remove unchecked data-id } }); // Update listOfSubscribed with unique values listOfSubscribed = Array.from(uniqueSubscribedIds); var selectedSubscriptionsString = selectedSubscriptions.join(`, `); var concatinateSubscribeId = [...new Set(storeCheckedId.concat(listOfSubscribed))]; var categoryData = { `subscribed_categories`: concatinateSubscribeId }; var requestSubscriberData = { action: `handle_dynamic_api_request_with_headers`, security: `6845842805`, endpoint: `/app/email_newsletter/update_categories`, token: ``, data: categoryData }; jQuery.ajax({ url: `https://coinpedia.org/wp-admin/admin-ajax.php`, type: `POST`, data: requestSubscriberData, beforeSend: function(xhr) { xhr.setRequestHeader(`X-Requested-With`, `XMLHttpRequest`); }, success: function(response) { try { response = response.data; if (storeCheckedId.length === 0) { var unsubcribedPopUpmodal = ` You’ve Unsubscribed Successfully We`re sorry to see you go! Your subscription has been canceled. If you change your mind, you can re-subscribe anytime. Thank you for being part of our community! `; unsubscribemodal.innerHTML = unsubcribedPopUpmodal; document.querySelector(`#subscribe-modal-design .modal`).style.display = `none`; unsubscribemodal.style.display = `block`; unsubscribemodal.classList.remove(`hide`); unsubscribemodal.classList.add(`show`); document.getElementById(`subscribe_` + categoryid).style.display = `block`; document.getElementById(`unsubscribe_` + categoryid).style.display = `none`; var showDownloadReport = document.getElementById(`download_report`); if (showDownloadReport) { showDownloadReport.style.display = `none`; } } else { var subscribedPopupModal = ` Thank you for subscribing! Thank you for subscribing to our crypto and blockchain newsletter! You’ll now receive the latest news, insights, and updates straight to your inbox. Welcome to our community! `; let selectedSubscriptionsArray = selectedSubscriptionsString.split(`,`); let subscribedCategories = selectedSubscriptionsArray.map(subscription => subscription.split(`_`)[0]); let subscribedCategoriesString = subscribedCategories.join(`, `); subscribedmodal.innerHTML = subscribedPopupModal; if (document.getElementById(`selectidname`)) { document.getElementById(`selectidname`).textContent = subscribedCategoriesString; } document.querySelector(`#subscribe-modal-design .modal`).style.display = `none`; subscribedmodal.style.display = `block`; subscribedmodal.classList.remove(`hide`); subscribedmodal.classList.add(`show`); document.getElementById(`subscribe_` + categoryid).style.display = `none`; document.getElementById(`unsubscribe_` + categoryid).style.display = `block`; var showDownloadReport = document.getElementById(`download_report`); if (showDownloadReport) { showDownloadReport.style.display = `block`; } } } catch (e) { console.error(`Error parsing response:`, e); } }, }); } function closeModal(template_id) { var modalId = template_id; var modal = document.querySelector(`#` + modalId); // Using querySelector to find the modal if (modal) { modal.classList.add(`hide`); modal.classList.remove(`show`); setTimeout(function() { modal.style.display = `none`; }, 500); } else { console.warn(`Modal not found:`, modalId); } } function closeunsubscribemodal() { var unsubscribemodal = document.querySelector(`.unsubscribed-popup-modal .modal`); if (unsubscribemodal) { unsubscribemodal.classList.add(`hide`); unsubscribemodal.classList.remove(`show`); } setTimeout(function() { unsubscribemodal.style.display = `none`; }, 500); } function closesubscribemodal() { var subscribedmodal = document.querySelector(`.subscribed-popup-modal .modal`); setTimeout(function() { subscribedmodal.style.display = `none`; }, 500); if (subscribedmodal) { subscribedmodal.classList.add(`hide`); subscribedmodal.classList.remove(`show`); } } function withoutLoginClicked(withoutlogin_id) { localStorage.setItem(`subscribe_without_Login`, `true`); localStorage.setItem(`subscribe_clicked_id`, withoutlogin_id); } document.addEventListener(`DOMContentLoaded`, function() { const subscribewithoutData = localStorage.getItem(`subscribe_without_Login`); const subscribe_clicked_cat_id = localStorage.getItem(`subscribe_clicked_id`); // Function to get cookies function getCookie(name) { let value = "; " + document.cookie; let parts = value.split("; " + name + "="); if (parts.length == 2) return parts.pop().split(";").shift(); } // Get user token from cookies const userToken = getCookie(`user_token`); if (subscribewithoutData === `true` && userToken) { // Call the modal function with the category ID subscribed_popupmodal(subscribe_clicked_cat_id); // Remove the flag and category ID from localStorage localStorage.removeItem(`subscribe_without_Login`); localStorage.removeItem(`subscribe_clicked_id`); } }); /************************** update susbcriber content **************************** */ function initializeSubscriptionButton() { var initialListItems = document.querySelectorAll(`.subscription-options input[type="checkbox"]`); initialListItems.forEach(function(item) { console.log(item.checked, `Initial Checkbox checked status`); }); var listItems = document.querySelectorAll(`.subscription-options li`); if (listItems.length === 0) return; var anyActive = false; listItems.forEach(function(item) { var checkbox = item.querySelector(`input[type="checkbox"]`); if (checkbox) { if (checkbox.checked) { item.classList.add(`active`); anyActive = true; // Set anyActive to true } else { item.classList.remove(`active`); // Remove `active` class if checkbox is unchecked } } }); } function updateButtonText(anyActive) { var subscribeButtonSpan = document.querySelector(`.subscribe-submit .changeBtnText`); if (subscribeButtonSpan) { if (anyActive) { subscribeButtonSpan.textContent = `Subscribe Now`; } else { subscribeButtonSpan.textContent = `Unsubscribe`; } } } function updateSubscriptionButton() { var listItems = document.querySelectorAll(`.subscription-options li`); if (listItems.length === 0) return; var anyActive = false; listItems.forEach(function(item) { var checkbox = item.querySelector(`input[type="checkbox"]`); if (checkbox) { if (checkbox.checked) { item.classList.add(`active`); anyActive = true; // Set anyActive to true } else { item.classList.remove(`active`); // Remove `active` class if checkbox is unchecked } } }); // Update the button text based on whether any list item has the `active` class updateButtonText(anyActive); } document.addEventListener(`click`, function(event) { var clickedItem = event.target.closest(`.subscription-options li`); if (clickedItem) { var checkbox = clickedItem.querySelector(`input[type="checkbox"]`); if (checkbox) { checkbox.checked = !checkbox.checked; updateSubscriptionButton(); } } }); coinpedia