diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ImportBrainkeyActivity.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ImportBrainkeyActivity.kt index a33cd68..92d7c49 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ImportBrainkeyActivity.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/activities/ImportBrainkeyActivity.kt @@ -284,12 +284,14 @@ class ImportBrainkeyActivity : ConnectedActivity() { */ private fun addAuthorityToDatabase(userId: String, authorityType: Int, brainKey: BrainKey) { val brainKeyWords = brainKey.brainKey + val wif = brainKey.walletImportFormat val sequenceNumber = brainKey.sequenceNumber val encryptedBrainKey = CryptoUtils.encrypt(this, brainKeyWords) val encryptedSequenceNumber = CryptoUtils.encrypt(this, sequenceNumber.toString()) + val encryptedWIF = CryptoUtils.encrypt(this, wif) - val authority = Authority(0, userId, authorityType, encryptedBrainKey, encryptedSequenceNumber) + val authority = Authority(0, userId, authorityType, encryptedWIF, encryptedBrainKey, encryptedSequenceNumber) val authorityRepository = AuthorityRepository(application) authorityRepository.insert(authority) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/entities/Authority.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/entities/Authority.kt index 40827b5..7ea9c74 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/entities/Authority.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/entities/Authority.kt @@ -10,6 +10,7 @@ data class Authority ( @ColumnInfo(name = "id") val id: Long, @ColumnInfo(name = "user_id") val userId: String, @ColumnInfo(name = "authority_type") val authorityType: Int, + @ColumnInfo(name = "encrypted_wif") val encryptedWIF: String, @ColumnInfo(name = "encrypted_brain_key") val encryptedBrainKey: String, @ColumnInfo(name = "encrypted_sequence_number") val encryptedSequenceNumber: String ) \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt index 94cf9a5..40286ef 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt @@ -191,6 +191,11 @@ class TransfersLoader(private var mContext: Context?, private val mLifeCycle: Li // all its stored request ids will now be reset responseMap.clear() } + // According to Nelson this is better than doing it in onServiceConnected, but here it does not get called +// else if (message.updateCode == ConnectionStatusUpdate.CONNECTED) { +// // Start the transfers update +// startTransfersUpdateProcedure() +// } } }) } else {