It’s been nearly a year since Coinbase embarked on a legal journey to stop the U.S. Internal Revenue Service (IRS) from getting its hands on customer transaction records, and recent proceedings do not bode well for the San Francisco-based startup.

Last week, several news outlets reported that U.S. Magistrate Judge Jacqueline Scott Corley indicated that the U.S. tax agency may be allowed a “limited investigation” into Coinbase customers who may have made money from cryptocurrency-based transactions.

After hearing the arguments brought forth by IRS lawyers, Corley reportedly said “it’s legitimate for them to investigate whether people are making money on their bitcoin purchases and paying taxes on any gains,” according to Bloomberg.

“I have to give tremendous discretion to the agency as to how they investigate,” the judge said, adding that Coinbase will likely be given time to appeal any decision that will be announced.

For the past 12 months, the tax agency has been vigorously pursuing Coinbase to submit records of all transactions that took place on its platform from 2013 to 2015 as part of the government’s investigation into possible tax fraud activities committed by U.S. residents who engaged in business with or through the exchange.

The U.S. government doesn’t suspect Coinbase of engaging in any wrongdoing, but the IRS argued in a court filing that “U.S. taxpayers, including Coinbase users, have made use of virtual currencies to avoid the reporting and payment of taxes,” hence the summons.

However, Coinbase not only refused to turn over the records—it also took the fight to block the “unjustified and invasive” summons back to court, where it was joined by two anonymous customers. Lawmakers including Sen. Orrin Hatch (R-Utah), chairman of the Senate Finance Committee, and Vern Buchanan and Kevin Brady, heads of the House Committee on Ways and Means, also called the attention of IRS Commissioner Josh Koskinen, telling him that the tax agency may have been overstepping its powers in the probe.

In July, the IRS announced that it will narrow down the summons to apply to users involved in at least the equivalent of $20,000 in any cryptocurrency-related transaction during the 2013-2015 period. The amended summons are also limited to name, address, tax identification number, date of birth, account opening records, copies of passport or driver’s license, all wallet addresses as well as the customer’s public keys for all of his or her accounts, wallets or vaults.

The fight is far from over, although the IRS’s decision to scale down its requests is already considered “a big win” for both Coinbase and its customers.

“The government initially sought private financial records of approximately 500,000 account holders. In response to Coinbase’s continuing fight, the IRS significantly reduced the scope of the summons to approximately 14,000 customers. Although this 97% reduction in impacted customers is a big win for our customers, the IRS still took Coinbase to court to obtain a sweeping set of customer records,” David Farmer, director of communications at Coinbase, wrote in a blog post.