Former president spent millions in 2020 on legal challenges disputing election results