Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Master into Development branch #6841

Merged
merged 6 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
compileSdk compile_sdk_version
minSdkVersion min_sdk_version
targetSdkVersion compile_sdk_version
versionCode 92
versionCode 93
versionName "0.37.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,18 @@ class WC2Service : SignClient.WalletDelegate {
}

fun approve(proposal: Sign.Model.SessionProposal, blockchains: List<WCBlockchain>) {
val supportedMethods = listOf(
"personal_sign",
"eth_signTypedData",
"eth_sendTransaction",
"eth_sign",
)

val namespaces = proposal.requiredNamespaces + proposal.optionalNamespaces
val methods = namespaces.values.flatMap { it.methods }.distinct()
val methods = namespaces.values
.flatMap { it.methods }
.distinct()
.filter { supportedMethods.contains(it) }
val events = namespaces.values.flatMap { it.events }.distinct()

val sessionNamespaces = blockchains
Expand Down
Loading