Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Houn committed Dec 3, 2024
1 parent afb2bf3 commit b542fcc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion particle-auth-core/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
def sdkVersion = "2.1.20"
def sdkVersion = "2.1.21"
implementation("network.particle:connect-common:$sdkVersion")
implementation("network.particle:base-service:$sdkVersion")
implementation("network.particle:mpc-core:$sdkVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.connect.common.model.*
import com.connect.common.utils.AppUtils
import com.evm.adapter.EVMConnectAdapter
import com.google.gson.reflect.TypeToken
import com.particle.auth.AuthCore
import com.particle.base.Env
import com.particle.base.ParticleNetwork
import com.particle.base.data.ErrorInfo
Expand Down Expand Up @@ -543,8 +544,15 @@ object ConnectBridge {
)
return
}
val typedData = MessageProcess.processTypedData(signData.message)
val escapedJson = typedData.replace("\"", "\\\"")

val escapedJson =if(connectAdapter is AuthCoreAdapter){
val typedData = MessageProcess.start(signData.message)
typedData
}else{
val typedData = MessageProcess.processTypedData(signData.message)
typedData.replace("\"", "\\\"")
}

connectAdapter.signTypedData(signData.publicAddress, escapedJson, object : SignCallback {
override fun onError(error: ConnectError) {
LogUtils.d("onError", error.toString())
Expand Down

0 comments on commit b542fcc

Please sign in to comment.