Skip to content

Commit

Permalink
Merge pull request #62 from Web3Auth/update-session-manager-sdk
Browse files Browse the repository at this point in the history
update session-manager-android sdk and proguard rules for bouncycastle library
  • Loading branch information
chaitanyapotti authored Jul 21, 2023
2 parents 0f1cf3d + ba2ac6b commit d8305c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ dependencies {
implementation 'org.web3j:core:4.8.8-android'

//session-manager-sdk
implementation 'com.github.Web3Auth:session-manager-android:0.0.6'
implementation 'com.github.Web3Auth:session-manager-android:0.0.8'

// Test
testImplementation 'junit:junit:4.+'
Expand Down
3 changes: 3 additions & 0 deletions core/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
-dontwarn okhttp3.internal.platform.ConscryptPlatform
-keep class okhttp3.Headers { *; }
-keep class org.bouncycastle.jcajce.provider.** { *; }
-keep class org.bouncycastle.jce.provider.** { *; }
-keep class com.web3auth.session_manager_android.**

#### GSON
# Prevent proguard from stripping interface information from TypeAdapterFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ object KeyStoreManagerUtils {
* Method to encrypt data with key
*/
fun encryptData(key: String, data: String) {
sharedPreferences.edit().putString(key, data)?.apply()
encryptedPairData = getEncryptedDataPair(data)
encryptedPairData.second.toString(UTF_8)
if (this::sharedPreferences.isInitialized) {
sharedPreferences.edit().putString(key, data)?.apply()
encryptedPairData = getEncryptedDataPair(data)
encryptedPairData.second.toString(UTF_8)
}
}

/**
Expand Down

0 comments on commit d8305c6

Please sign in to comment.