diff --git a/Sources/Core/Methods/RequestAccountMethod.swift b/Sources/Core/Methods/RequestAccountMethod.swift index 1f88e43..d610030 100644 --- a/Sources/Core/Methods/RequestAccountMethod.swift +++ b/Sources/Core/Methods/RequestAccountMethod.swift @@ -39,7 +39,7 @@ public struct RequestAccountMethod: CallbackMethod { var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) else { return nil } - var queryItems = URLEncoding.queryItems( + var queryItems = URLEncoding.queryGeneralItems( appId: appId, requestId: id.uuidString, blockchain: blockchain diff --git a/Sources/Core/Models/QueryName.swift b/Sources/Core/Models/QueryName.swift index b2d601c..84044e4 100644 --- a/Sources/Core/Models/QueryName.swift +++ b/Sources/Core/Models/QueryName.swift @@ -40,4 +40,6 @@ public enum QueryName: String { // error case error + + case platform } diff --git a/Sources/Core/Utilities/URLEncoding.swift b/Sources/Core/Utilities/URLEncoding.swift index 10bb9e2..5f03723 100644 --- a/Sources/Core/Utilities/URLEncoding.swift +++ b/Sources/Core/Utilities/URLEncoding.swift @@ -9,15 +9,19 @@ import Foundation public enum URLEncoding { - static func queryItems( + static func queryGeneralItems( appId: String, requestId: String, blockchain: Blockchain ) -> [QueryItem] { + + let platform: String = "sdk_ios" + let queryItems = [ QueryItem(name: .appId, value: appId), QueryItem(name: .requestId, value: requestId), QueryItem(name: .blockchain, value: blockchain.rawValue), + QueryItem(name: .platform, value: platform) ] return queryItems } diff --git a/Sources/EVMBase/Methods/SendEVMBasedTransactionMethod.swift b/Sources/EVMBase/Methods/SendEVMBasedTransactionMethod.swift index 5242620..1574a9e 100644 --- a/Sources/EVMBase/Methods/SendEVMBasedTransactionMethod.swift +++ b/Sources/EVMBase/Methods/SendEVMBasedTransactionMethod.swift @@ -40,7 +40,7 @@ public struct SendEVMBasedTransactionMethod: CallbackMethod { var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) else { return nil } - var queryItems = URLEncoding.queryItems( + var queryItems = URLEncoding.queryGeneralItems( appId: appId, requestId: id.uuidString, blockchain: blockchain diff --git a/Sources/EVMBase/Methods/SignEVMBaseMessageMethod.swift b/Sources/EVMBase/Methods/SignEVMBaseMessageMethod.swift index b2ca575..104b5f9 100644 --- a/Sources/EVMBase/Methods/SignEVMBaseMessageMethod.swift +++ b/Sources/EVMBase/Methods/SignEVMBaseMessageMethod.swift @@ -49,7 +49,7 @@ public struct SignEVMBaseMessageMethod: CallbackMethod { var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) else { return nil } - var queryItems = URLEncoding.queryItems( + var queryItems = URLEncoding.queryGeneralItems( appId: appId, requestId: id.uuidString, blockchain: blockchain diff --git a/Sources/Flow/Methods/AuthenticateMethod.swift b/Sources/Flow/Methods/AuthenticateMethod.swift index f30358d..5e9468c 100644 --- a/Sources/Flow/Methods/AuthenticateMethod.swift +++ b/Sources/Flow/Methods/AuthenticateMethod.swift @@ -36,7 +36,7 @@ public struct AuthenticateMethod: CallbackMethod { var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) else { return nil } - var queryItems = URLEncoding.queryItems( + var queryItems = URLEncoding.queryGeneralItems( appId: appId, requestId: id.uuidString, blockchain: blockchain diff --git a/Sources/Flow/Methods/SendFlowTransactionMethod.swift b/Sources/Flow/Methods/SendFlowTransactionMethod.swift index 60adf1a..614ed7e 100644 --- a/Sources/Flow/Methods/SendFlowTransactionMethod.swift +++ b/Sources/Flow/Methods/SendFlowTransactionMethod.swift @@ -43,7 +43,7 @@ public struct SendFlowTransactionMethod: CallbackMethod { var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: false) else { return nil } - var queryItems: [QueryItem] = URLEncoding.queryItems( + var queryItems: [QueryItem] = URLEncoding.queryGeneralItems( appId: appId, requestId: id.uuidString, blockchain: blockchain diff --git a/Sources/Flow/Methods/SignFlowMessageMethod.swift b/Sources/Flow/Methods/SignFlowMessageMethod.swift index 19d9883..57e4d46 100644 --- a/Sources/Flow/Methods/SignFlowMessageMethod.swift +++ b/Sources/Flow/Methods/SignFlowMessageMethod.swift @@ -44,7 +44,7 @@ public struct SignFlowMessageMethod: CallbackMethod { var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) else { return nil } - var queryItems = URLEncoding.queryItems( + var queryItems = URLEncoding.queryGeneralItems( appId: appId, requestId: id.uuidString, blockchain: blockchain diff --git a/Sources/Solana/Methods/SignAndSendSolanaTransactionMethod.swift b/Sources/Solana/Methods/SignAndSendSolanaTransactionMethod.swift index e922747..54a0aa4 100644 --- a/Sources/Solana/Methods/SignAndSendSolanaTransactionMethod.swift +++ b/Sources/Solana/Methods/SignAndSendSolanaTransactionMethod.swift @@ -45,7 +45,7 @@ public struct SignAndSendSolanaTransactionMethod: CallbackMethod { var components = URLComponents(url: baseURL, resolvingAgainstBaseURL: true) else { return nil } - var queryItems: [QueryItem] = URLEncoding.queryItems( + var queryItems: [QueryItem] = URLEncoding.queryGeneralItems( appId: appId, requestId: id.uuidString, blockchain: blockchain