Skip to content

attester/initial/legacy_submit and welcome message changes - #2012

Merged
ioanmo226 merged 13 commits into
masterfrom
issue_1984_replace_api
Oct 14, 2022
Merged

attester/initial/legacy_submit and welcome message changes#2012
ioanmo226 merged 13 commits into
masterfrom
issue_1984_replace_api

Conversation

@DenBond7

Copy link
Copy Markdown
Collaborator

This PR added API usage changes

close#1984


Tests(delete all except exactly one):

  • Tests added or updated

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities

@DenBond7DenBond7 added this to the 1.3.8 milestone Oct 12, 2022
@DenBond7
DenBond7 marked this pull request as ready for review October 13, 2022 12:19
@DenBond7
DenBond7 dismissed a stale review via 8161b74October 13, 2022 16:43

@tomholubtomholub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines -409 to -423
private suspend fun savePrivateKeyToDatabase(
accountEntity: AccountEntity,
pgpKeyDetails: PgpKeyDetails,
passphrase: String
) {
val keyEntity = pgpKeyDetails.toKeyEntity(accountEntity).copy(
source = KeyImportDetails.SourceType.NEW.toPrivateKeySourceTypeString(),
privateKey = KeyStoreCryptoManager.encryptSuspend(pgpKeyDetails.privateKey).toByteArray(),
storedPassphrase = KeyStoreCryptoManager.encryptSuspend(passphrase)
)

if (roomDatabase.keysDao().insertSuspend(keyEntity) == -1L) {
throw NullPointerException("Cannot save a generated private key")
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this unused?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It's unused. I kept this code for some time but after reviewing this class I've decided to remove it.

@ioanmo226
ioanmo226 merged commit 026c9d4 into masterOct 14, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

attester/initial/legacy_submit and welcome message changes

2 participants

@DenBond7@tomholub