Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into version/0.37
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/build.gradle
  • Loading branch information
rafaelekol committed Nov 21, 2023
2 parents db53a35 + 19479be commit bfcc8a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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

0 comments on commit bfcc8a0

Please sign in to comment.