-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
582 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,181 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle.kts. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile | ||
-optimizationpasses 5 | ||
-dontusemixedcaseclassnames | ||
-flattenpackagehierarchy | ||
-adaptclassstrings | ||
-verbose | ||
|
||
# firebase | ||
-keep public class com.google.firebase.** { *; } | ||
-keep class com.google.android.gms.internal.** { *; } | ||
-keepclasseswithmembers class com.google.firebase.FirebaseException | ||
|
||
# hedera sdk | ||
-keep class com.hedera.hashgraph.sdk.** { *; } | ||
-keep interface com.hedera.hashgraph.sdk.** { *; } | ||
-dontwarn com.esaulpaugh.headlong.** | ||
-dontwarn edu.umd.cs.findbugs.annotations.SuppressFBWarnings | ||
-dontwarn io.grpc.stub.** | ||
|
||
# trustwallet sdk | ||
-keep class wallet.core.jni.** { *; } | ||
|
||
# solana | ||
-keep class org.p2p.solanaj.** { *; } | ||
|
||
# kethereum | ||
-keep class org.kethereum.bip32.model.ExtendedKey** | ||
-keepclassmembers class org.kethereum.bip32.model.ExtendedKey** { *; } | ||
|
||
# some crypto | ||
-dontwarn net.i2p.crypto.** | ||
-dontwarn java.net.http.** | ||
-dontwarn lombok.** | ||
|
||
-dontwarn org.apache.hc.core5.** | ||
-dontwarn org.apache.hc.client5.** | ||
-dontwarn org.apache.log4j.config.** | ||
|
||
-dontwarn javax.xml.stream.** | ||
-dontwarn javax.script.** | ||
|
||
-dontwarn aQute.bnd.annotation.spi.ServiceProvider | ||
|
||
-dontwarn org.threeten.bp.** | ||
-keep class org.threeten.bp.zone.* | ||
-keep class org.threeten.bp.* | ||
-keepclassmembers class org.threeten.bp.** { *; } | ||
|
||
# joda time | ||
# These aren't necessary if including joda-convert | ||
-dontwarn org.joda.convert.FromString | ||
-dontwarn org.joda.convert.ToString | ||
|
||
-keepnames class org.joda.** implements java.io.Serializable | ||
-keepclassmembers class org.joda.** implements java.io.Serializable { | ||
static final long serialVersionUID; | ||
private static final java.io.ObjectStreamField[] serialPersistentFields; | ||
!static !transient <fields>; | ||
private void writeObject(java.io.ObjectOutputStream); | ||
private void readObject(java.io.ObjectInputStream); | ||
java.lang.Object writeReplace(); | ||
java.lang.Object readResolve(); | ||
} | ||
# joda time | ||
|
||
# Enum field names are used by the integrated EnumJsonAdapter. | ||
# values() is synthesized by the Kotlin compiler and is used by EnumJsonAdapter indirectly | ||
# Annotate enums with @JsonClass(generateAdapter = false) to use them with Moshi. | ||
-keepclassmembers @com.squareup.moshi.JsonClass class * extends java.lang.Enum { | ||
<fields>; | ||
**[] values(); | ||
} | ||
|
||
# Keep helper method to avoid R8 optimisation that would keep all Kotlin Metadata when unwanted | ||
-keepclassmembers class com.squareup.moshi.internal.Util { | ||
private static java.lang.String getKotlinMetadataClassName(); | ||
} | ||
|
||
-keep class kotlin.Metadata { *; } | ||
-keepclassmembers class kotlin.Metadata { | ||
public <methods>; | ||
} | ||
|
||
-keepclasseswithmembers class * { | ||
@com.squareup.moshi.* <methods>; | ||
} | ||
|
||
-keep @com.squareup.moshi.JsonQualifier interface * | ||
|
||
-keepclassmembers class * { | ||
@com.squareup.moshi.FromJson <methods>; | ||
@com.squareup.moshi.ToJson <methods>; | ||
} | ||
|
||
# Proguard configuration for Jackson 2.x | ||
-keep class com.fasterxml.** { *; } | ||
-keep class com.fasterxml.jackson.databind.ObjectMapper { | ||
public <methods>; | ||
protected <methods>; | ||
} | ||
-keep class com.fasterxml.jackson.databind.ObjectWriter { | ||
public ** writeValueAsString(**); | ||
} | ||
-keepnames class com.fasterxml.jackson.** { *; } | ||
-dontwarn com.fasterxml.jackson.databind.** | ||
-keep class * implements com.fasterxml.jackson.core.type.TypeReference | ||
|
||
-keep class kotlin.reflect.** | ||
-keep public class kotlin.reflect.jvm.internal.impl.** { public *; } | ||
|
||
# Kotlin serialization looks up the generated serializer classes through a function on companion | ||
# objects. The companions are looked up reflectively so we need to explicitly keep these functions. | ||
-keepclasseswithmembers class **.*$Companion { | ||
kotlinx.serialization.KSerializer serializer(...); | ||
} | ||
# If a companion has the serializer function, keep the companion field on the original type so that | ||
# the reflective lookup succeeds. | ||
-if class **.*$Companion { | ||
kotlinx.serialization.KSerializer serializer(...); | ||
} | ||
-keepclassmembers class <1>.<2> { | ||
<1>.<2>$Companion Companion; | ||
} | ||
|
||
-keepnames class * implements android.os.Parcelable { | ||
public static final ** CREATOR; | ||
} | ||
-keep class * implements android.os.Parcelable { | ||
public static final android.os.Parcelable$Creator *; | ||
} | ||
|
||
-dontwarn okhttp3.** | ||
-dontwarn okio.** | ||
|
||
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and | ||
# EnclosingMethod is required to use InnerClasses. | ||
-keepattributes Signature, InnerClasses, EnclosingMethod, *Annotation*, Exceptions | ||
|
||
# Retrofit does reflection on method and parameter annotations. | ||
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations | ||
|
||
# Keep annotation default values (e.g., retrofit2.http.Field.encoded). | ||
-keepattributes AnnotationDefault | ||
|
||
# Retain service method parameters when optimizing. | ||
-keepclassmembers,allowshrinking,allowobfuscation interface * { | ||
@retrofit2.http.* <methods>; | ||
} | ||
|
||
-keepclasseswithmembers class * { | ||
@retrofit2.http.* <methods>; | ||
} | ||
-keepclassmembernames interface * { | ||
@retrofit.http.* <methods>; | ||
} | ||
|
||
# Ignore annotation used for build tooling. | ||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement | ||
|
||
# Ignore JSR 305 annotations for embedding nullability information. | ||
-dontwarn javax.annotation.** | ||
|
||
# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath. | ||
-dontwarn kotlin.Unit | ||
|
||
# Top-level functions that can only be used by Kotlin. | ||
-dontwarn retrofit2.KotlinExtensions | ||
-dontwarn retrofit2.KotlinExtensions.* | ||
|
||
# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy | ||
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this. | ||
-if interface * { @retrofit2.http.* <methods>; } | ||
-keep,allowobfuscation interface <1> | ||
|
||
# Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items). | ||
-keep,allowobfuscation,allowshrinking interface retrofit2.Call | ||
-keep,allowobfuscation,allowshrinking class retrofit2.Response | ||
|
||
# With R8 full mode generic signatures are stripped for classes that are not | ||
# kept. Suspend functions are wrapped in continuations where the type argument | ||
# is used. | ||
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/tangem/tap/domain/userWalletList/model/UserWalletInformation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
package com.tangem.tap.domain.userWalletList.model | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
import com.tangem.domain.models.scan.CardDTO | ||
import com.tangem.domain.models.scan.ScanResponse | ||
import com.tangem.domain.wallets.models.UserWalletId | ||
|
||
@JsonClass(generateAdapter = true) | ||
internal data class UserWalletSensitiveInformation( | ||
@Json(name = "wallets") | ||
val wallets: List<CardDTO.Wallet>, | ||
) | ||
|
||
@JsonClass(generateAdapter = true) | ||
internal data class UserWalletPublicInformation( | ||
@Json(name = "name") | ||
val name: String, | ||
@Json(name = "walletId") | ||
val walletId: UserWalletId, | ||
@Json(name = "artworkUrl") | ||
val artworkUrl: String, | ||
@Json(name = "cardsInWallet") | ||
val cardsInWallet: Set<String>, | ||
@Json(name = "scanResponse") | ||
val scanResponse: ScanResponse, | ||
@Json(name = "isMultiCurrency") | ||
val isMultiCurrency: Boolean, | ||
@Json(name = "hasBackupError") | ||
val hasBackupError: Boolean = false, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 14 additions & 1 deletion
15
app/src/main/java/com/tangem/tap/domain/walletconnect2/domain/models/Account.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
package com.tangem.tap.domain.walletconnect2.domain.models | ||
|
||
data class Account(val chainId: String, val walletAddress: String, val derivationPath: String?) | ||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class Account( | ||
@Json(name = "chainId") | ||
val chainId: String, | ||
|
||
@Json(name = "walletAddress") | ||
val walletAddress: String, | ||
|
||
@Json(name = "derivationPath") | ||
val derivationPath: String?, | ||
) |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/tangem/tap/domain/walletconnect2/domain/models/Session.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
package com.tangem.tap.domain.walletconnect2.domain.models | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class Session( | ||
@Json(name = "topic") | ||
val topic: String, | ||
|
||
@Json(name = "accounts") | ||
val accounts: List<Account>, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
...rc/main/java/com/tangem/tap/domain/walletconnect2/domain/models/binance/WcBinanceOrder.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.