The OpenPGP code uses sqlite to store the key acceptance decisions made by the user.
When working with the security info dialog in composer (composeKeyStatus, oneRecipientStatus, keyDetailsDlg), I experience a race.
For example, oneRecipientStatus calls keyDetailsDlg, and waits for its result. (Using console.debug statements, I can confirm that the code in oneRecipientStatus that opens keyDetailsDlg waits until after keyDetailsDlg closes, before it proceeds its processing).
If a change is made then keyDetailsDlg will update the database.
After keyDetailsDlg is done and the execution returns to oneRecipientStatus, then oneRecipientStatus will query the database to obtain the new values and update the display.
That doesn't work as expected.
The value that oneRecipientStatus reads the the database is still the old value - not the one that keyDetailsDlg just wrote to the database.
We get the old value, despite using await statements, in an attempt to ensure that we wait until the update is done, prior to attempting to read from the database.