Debt (Tables)
12 Months Ended
Dec. 31, 2021
Debt Disclosure [Abstract]  
Schedule of carrying value of convertible notes
As of December 31, 2020, the carrying value of the Convertible Notes consisted of (in thousands):
 
    
December 31,
2020
 
Principal amount
   $ 61,300  
Accrued and unpaid interest
     17,287  
Unamortized debt discount
     (676
    
 
 
 
Total
   $ 77,911  
    
 
 
 
Schedule of carrying value of senior notes
The carrying value of the Company’s senior secured notes consisted of the following as of December 31, 2021 and 2020 (in thousands):
 
    
December 31,
2021
    
December 31,
2020
 
Principal amount
   $ 43,125      $ 50,000  
Accrued and unpaid interest
     4,354        1,278  
Unamortized debt discount
     (5,210      (9,376
    
 
 
    
 
 
 
Total
   $ 42,269      $ 41,902  
    
 
 
    
 
 
 
Schedule of future principal payments of the senior secured notes
Future principal payments of the senior secured notes are as follows (in thousands):
 
Years ended December 31,
  
Amount
 
2022
   $ 6,000  
2023
     15,125  
2024
     14,000  
2025
     8,000  
    
 
 
 
Total
   $ 43,125