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

Add dapp application id to originator info #113

Merged
merged 3 commits into from
Apr 22, 2024
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 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"
}