File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
app/src/main/java/to/bitkit Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change 11package to.bitkit.repositories
22
33import android.content.Context
4- import com.synonym.vssclient.VssItem
54import dagger.hilt.android.qualifiers.ApplicationContext
65import kotlinx.coroutines.CoroutineDispatcher
76import kotlinx.coroutines.CoroutineScope
@@ -218,7 +217,7 @@ class BackupRepo @Inject constructor(
218217 it.copy(running = true , required = System .currentTimeMillis())
219218 }
220219
221- encryptAndUpload( category)
220+ vssBackupClient.putObject(key = category.name, data = getBackupDataBytes(category) )
222221 .onSuccess {
223222 cacheStore.updateBackupStatus(category) {
224223 it.copy(
@@ -236,15 +235,6 @@ class BackupRepo @Inject constructor(
236235 }
237236 }
238237
239- private suspend fun encryptAndUpload (category : BackupCategory ): Result <VssItem > = runCatching {
240- val dataBytes = getBackupDataBytes(category)
241-
242- // TODO encrypt data before upload
243- val encrypted = dataBytes
244-
245- return vssBackupClient.putObject(category.name, encrypted)
246- }
247-
248238 private suspend fun getBackupDataBytes (category : BackupCategory ): ByteArray = when (category) {
249239 BackupCategory .SETTINGS -> {
250240 val data = settingsStore.data.first().resetPin()
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ class LightningService @Inject constructor(
113113
114114 ServiceQueue .LDK .background {
115115 node = try {
116- if (Env .lnurlAuthSeverUrl.isNotBlank ()) {
116+ if (Env .lnurlAuthSeverUrl.isNotEmpty ()) {
117117 builder.buildWithVssStore(
118118 vssUrl = Env .vssServerUrl,
119119 storeId = vssStoreId,
You can’t perform that action at this time.
0 commit comments