WalletConnect / kotlin-walletconnect-lib

library to use WalletConnect with Kotlin or Java
MIT License
147 stars 100 forks source link

how to implement sign transaction functionality? #54

Open ghost opened 2 years ago

Crysis21 commented 2 years ago

figure it out? callback doesn't fire

Serpivskyi commented 2 years ago

Any updates?

Abhi9454 commented 2 years ago

Check out signMessage in android

xiejingwen commented 2 years ago

ExampleApplication.session.performMethodCall(Session.MethodCall.Custom(System.currentTimeMillis(),"personal_sign", arrayListOf("test sign",session.approvedAccounts()!!.first())), ::handleResponse) val i = Intent(Intent.ACTION_VIEW) i.data = Uri.parse("wc:") startActivity(i)

jiaweio commented 2 years ago

ExampleApplication.session.performMethodCall(Session.MethodCall.Custom(System.currentTimeMillis(),"personal_sign", arrayListOf("test sign",session.approvedAccounts()!!.first())), ::handleResponse) val i = Intent(Intent.ACTION_VIEW) i.data = Uri.parse("wc:") startActivity(i)

I get no response with this method,This is the code I wrote

val from = ExampleApplication.session.approvedAccounts()?.first() ?: return Log.i(TAG, "---click-->$from") ExampleApplication.session.performMethodCall( Session.MethodCall.Custom( System.currentTimeMillis(), "personal_sign", arrayListOf( "0xdeadbeaf", from ) ) ) { response -> Log.d(TAG, "------>${response.result}--->${response.error}")

    }

No response at all