Skip to content

Commit

Permalink
chore: provide api version override in app metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
elefantel committed Sep 5, 2024
1 parent 4f29750 commit 6bd5ab7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public extension CommClient {
icon: appMetadata?.iconUrl ?? appMetadata?.base64Icon,
dappId: SDKInfo.bundleIdentifier,
platform: SDKInfo.platform,
apiVersion: SDKInfo.version
apiVersion: appMetadata?.apiVersion ?? SDKInfo.version
)

return RequestInfo(
Expand Down
6 changes: 5 additions & 1 deletion Sources/metamask-ios-sdk/Classes/Ethereum/AppMetadata.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ public struct AppMetadata {
public let url: String
public let iconUrl: String?
public let base64Icon: String?
public let apiVersion: String?

var platform: String = "ios"

public init(name: String,
url: String,
iconUrl: String? = nil,
base64Icon: String? = nil) {
base64Icon: String? = nil,
apiVersion: String? = nil
) {
self.name = name
self.url = url
self.iconUrl = iconUrl
self.apiVersion = apiVersion
self.base64Icon = base64Icon
}
}

0 comments on commit 6bd5ab7

Please sign in to comment.