Wells Fargo bank has struck a settlement to reimburse customers who were harmed when bank employees created unwanted accounts in their names. A federal judge has granted a preliminary approval for the settlement in the class action case.

Wells Fargo says compensation will depend on the financial harm customers suffered. Someone who paid an improper $35 dollar fee likely will receive less money than someone whose credit score was damaged and had to accept a home loan with a higher interest rate.

That process of determining what to pay which customers will be overseen by an independent expert hired by class action lawyers. Wells Fargo, which is an NPR financial supporter, says it may end up paying more to customers if the $142 million isn't enough.

Wells Fargo CEO Tim Sloan said in a statement: "We are pleased that the court found the settlement to be fair, reasonable and adequate. This preliminary approval is a major milestone in our efforts to make things right for our customers." He added that the settlement is "fundamental to restoring trust."

The bank says it expects the settlement will resolve "substantially all claims" in 10 other pending class action cases. The settlement is still subject to final approval by U.S. District Judge Vince Chhabria.

The lawsuit stems from a consumer banking scandal in which a high-pressure sales culture pushed employees to open millions of unwanted checking and credit card accounts. Former employees have told NPR that if they didn't meet aggressive sales goals they were threatened with their jobs, and that many employees were pushed out or fired for not meeting sales quotas. Some former workers say after they called the bank's ethics line to report widespread fraud in the branches where they worked, they were fired by the bank.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.