Skip to content

Commit

Permalink
disable back migration
Browse files Browse the repository at this point in the history
  • Loading branch information
polstianka committed Nov 6, 2024
1 parent 1c011d0 commit 818430e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal class RNSeedStorage(context: Context) {

suspend fun setTonProof(id: String, token: String) = withContext(Dispatchers.IO) {
val key = keyTonProof(id)
kv.setItemImpl(key, token)
// kv.setItemImpl(key, token)
}

suspend fun getTonProof(id: String): String? = withContext(Dispatchers.IO) {
Expand All @@ -58,16 +58,16 @@ internal class RNSeedStorage(context: Context) {
}

suspend fun setupBiometry(passcode: String) = withContext(Dispatchers.IO) {
kv.setItemImpl(biometryKey, passcode, SecureStoreOptions(
/*kv.setItemImpl(biometryKey, passcode, SecureStoreOptions(
keychainService = keychainService,
requireAuthentication = true,
))
))*/
}

suspend fun removeBiometry() = withContext(Dispatchers.IO) {
kv.deleteItemImpl(biometryKey, SecureStoreOptions(
/*kv.deleteItemImpl(biometryKey, SecureStoreOptions(
keychainService = keychainService
))
))*/
}

suspend fun hasPinCode(): Boolean {
Expand All @@ -80,7 +80,7 @@ internal class RNSeedStorage(context: Context) {
}

suspend fun removeAll() {
kv.getSharedPreferences().edit().clear().apply()
// kv.getSharedPreferences().edit().clear().apply()
}

suspend fun save(passcode: String, state: RNVaultState) = withContext(Dispatchers.IO) {
Expand All @@ -95,7 +95,7 @@ internal class RNSeedStorage(context: Context) {
}

private suspend fun saveState(state: SeedState) {
val encryptedString = state.string
/*val encryptedString = state.string
val chunkSize = 2048
var index = 0
Expand All @@ -109,7 +109,7 @@ internal class RNSeedStorage(context: Context) {
val key = "${walletsKey}_chunks"
val count = ceil(encryptedString.length.toDouble() / chunkSize).toInt()
kv.setItemImpl(key, "$count")
kv.setItemImpl(key, "$count")*/
}

private suspend fun readState(): SeedState? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ class DevViewModel(
): BaseWalletVM(app) {

fun getLegacyStorage(callback: (result: String) -> Unit) {
viewModelScope.launch(Dispatchers.IO) {
/*viewModelScope.launch(Dispatchers.IO) {
val json = rnLegacy.getAllKeyValuesForDebug().toString()
withContext(Dispatchers.Main) {
callback(json)
}
}
}*/
}

fun importApps(callback: (result: String) -> Unit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/offsetMedium"
android:visibility="gone"
android:text="Values from legacy"
app:position="middle"/>

Expand Down

0 comments on commit 818430e

Please sign in to comment.