Skip to content

Commit

Permalink
Merge pull request #113 from MetaMask/dapp-id
Browse files Browse the repository at this point in the history
Add dapp application id to originator info
  • Loading branch information
elefantel authored Apr 22, 2024
2 parents 16888f9 + 52263f1 commit da5ee69
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ add the following entry to the `dependencies` block:

```gradle title="build.gradle"
dependencies {
implementation 'io.metamask.androidsdk:metamask-android-sdk:0.5.3'
implementation 'io.metamask.androidsdk:metamask-android-sdk:0.5.4'
}
```

Expand Down
4 changes: 2 additions & 2 deletions metamask-android-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {
targetSdk 33

ext.versionCode = 1
ext.versionName = "0.5.3"
ext.versionName = "0.5.4"

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
consumerProguardFiles 'consumer-rules.pro'
Expand Down Expand Up @@ -62,7 +62,7 @@ dependencies {

ext {
PUBLISH_GROUP_ID = 'io.metamask.androidsdk'
PUBLISH_VERSION = '0.5.3'
PUBLISH_VERSION = '0.5.4'
PUBLISH_ARTIFACT_ID = 'metamask-android-sdk'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ internal class CommunicationClient(context: Context, callback: EthereumEventCall
title = dappMetadata?.name,
url = dappMetadata?.url,
icon = dappMetadata?.iconUrl ?: dappMetadata?.base64Icon,
dappId = appContextRef.get()?.packageName,
platform = SDKInfo.PLATFORM,
apiVersion = SDKInfo.VERSION)
val requestInfo = RequestInfo("originator_info", originatorInfo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import java.lang.ref.WeakReference

private const val METAMASK_DEEPLINK = "https://metamask.app.link"
private const val METAMASK_BIND_DEEPLINK = "$METAMASK_DEEPLINK/bind"
private const val DEFAULT_SESSION_DURATION: Long = 7 * 24 * 3600 // 7 days default
private const val DEFAULT_SESSION_DURATION: Long = 30 * 24 * 3600 // 30 days default

class Ethereum (
private val context: Context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ data class OriginatorInfo(
val title: String?,
val url: String?,
val icon: String?,
val dappId: String?,
val platform: String,
val apiVersion: String
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.metamask.androidsdk

object SDKInfo {
const val VERSION = "0.5.3"
const val VERSION = "0.5.4"
const val PLATFORM = "android"
}

0 comments on commit da5ee69

Please sign in to comment.