Skip to content

Commit

Permalink
Merge pull request #33 from reown-com/develop
Browse files Browse the repository at this point in the history
1.0.4
  • Loading branch information
llbartekll authored Oct 10, 2024
2 parents 812139f + 87b8c58 commit 8c1a43e
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 60 deletions.
2 changes: 1 addition & 1 deletion Example/DApp/Modules/Sign/SignView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct SignView: View {
Button {
presenter.connectWalletWithW3M()
} label: {
Text("Connect with Web3Modal")
Text("Connect with AppKit")
.font(.system(size: 16, weight: .semibold))
.foregroundColor(.white)
.padding(.horizontal, 16)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,11 @@
},
{
"package": "CoinbaseWalletSDK",
"repositoryURL": "https://github.com/WalletConnect/wallet-mobile-sdk",
"repositoryURL": "https://github.com/MobileWalletProtocol/wallet-mobile-sdk",
"state": {
"branch": null,
"revision": "b6dfb7d6b8447c7c5b238a10443a1ac28223f38f",
"version": "1.0.0"
"revision": "4aa89e682f8d7ab1515d85d0797f0d25306bb56a",
"version": "1.0.5"
}
},
{
Expand Down
5 changes: 2 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
.package(url: "https://github.com/WalletConnect/QRCode", from: "14.3.1"),
.package(name: "CoinbaseWalletSDK", url: "https://github.com/WalletConnect/wallet-mobile-sdk", from: "1.0.0"),
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", .upToNextMinor(from: "1.10.0")
),
.package(name: "CoinbaseWalletSDK", url: "https://github.com/MobileWalletProtocol/wallet-mobile-sdk", .upToNextMinor(from: "1.0.0")),
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", .upToNextMinor(from: "1.10.0")),
],
targets: [
.target(
Expand Down
11 changes: 1 addition & 10 deletions Sources/ReownAppKit/Core/AppKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,7 @@ public class AppKit {

struct Config {
static let sdkVersion: String = {
guard
let fileURL = Bundle.coreModule.url(forResource: "PackageConfig", withExtension: "json"),
let data = try? Data(contentsOf: fileURL),
let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any],
let version = jsonObject["version"] as? String
else {
return "undefined"
}

return "swift-\(version)"
return EnvironmentInfo.sdkName
}()

static let sdkType = "appkit"
Expand Down
1 change: 0 additions & 1 deletion Sources/ReownAppKit/Core/BlockchainAPIInteractor.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Foundation
import WalletConnectNetworking

class BlockchainAPIInteractor: ObservableObject {
let store: Store
Expand Down
2 changes: 1 addition & 1 deletion Sources/ReownAppKit/Core/W3MAPIInteractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,6 @@ extension URLRequest {
setValue(AppKit.config.projectId, forHTTPHeaderField: "x-project-id")
setValue(AppKit.Config.sdkType, forHTTPHeaderField: "x-sdk-type")
setValue(AppKit.Config.sdkVersion, forHTTPHeaderField: "x-sdk-version")
setValue(EnvironmentInfo.sdkVersion, forHTTPHeaderField: "User-Agent")
setValue(EnvironmentInfo.sdkName, forHTTPHeaderField: "User-Agent")
}
}
3 changes: 1 addition & 2 deletions Sources/ReownAppKit/Core/W3MJSONRPC+Coinbase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ extension W3MJSONRPC {
maxFeePerGas: maxFeePerGas,
maxPriorityFeePerGas: maxPriorityFeePerGas,
gasLimit: gasLimit,
chainId: chainId,
actionSource: nil
chainId: chainId
)
case let .wallet_switchEthereumChain(chainId):
return .wallet_switchEthereumChain(chainId: chainId)
Expand Down
34 changes: 0 additions & 34 deletions Sources/ReownAppKit/Helpers/EnvironmentInfo.swift

This file was deleted.

1 change: 0 additions & 1 deletion Sources/ReownAppKit/Store.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Combine
import SwiftUI
import WalletConnectUtils

enum ConnectionProviderType {
case wc
Expand Down
1 change: 1 addition & 0 deletions Sources/ReownAppKit/Web3ModalImports.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
@_exported import ReownAppKitUI
@_exported import ReownAppKitBackport
@_exported import WalletConnectSign
@_exported import WalletConnectUtils
#endif
2 changes: 1 addition & 1 deletion Sources/WalletConnectRelay/PackageConfig.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "1.0.3"}
{"version": "1.0.4"}
34 changes: 31 additions & 3 deletions reown-swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Pod::Spec.new do |spec|

spec.name = "reown-swift"
spec.version = package["version"]
spec.summary = "Reown WalletKit"
spec.description = "Implementation of WalletKit"
spec.summary = "Reown Swift WalletKit & AppKit"
spec.description = "Implementation of WalletKit and AppKit"
spec.homepage = "https://reown.com"
spec.license = { :type => 'Apache-2.0', :file => 'LICENSE' }
spec.authors = "Reown, Inc."
Expand All @@ -17,7 +17,7 @@ Pod::Spec.new do |spec|
}

spec.platform = :ios, '13.0'
spec.swift_versions = '5.3'
spec.swift_versions = '5.9'
spec.pod_target_xcconfig = {
'OTHER_SWIFT_FLAGS' => '-DCocoaPods'
}
Expand All @@ -31,6 +31,34 @@ Pod::Spec.new do |spec|
ss.dependency 'reown-swift/WalletConnectVerify'
end

spec.subspec 'ReownAppKitBackport' do |ss|
ss.source_files = 'Sources/ReownAppKitBackport/**/*.{h,m,swift}'
end

spec.subspec 'ReownAppKitUI' do |ss|
ss.source_files = 'Sources/ReownAppKitUI/**/*.{h,m,swift}'
ss.dependency 'reown-swift/ReownAppKitBackport'
ss.resource_bundles = {
'ReownAppKitUI' => [
'Sources/ReownAppKitUI/Resources/*'
]
}
end

spec.subspec 'ReownAppKit' do |ss|
ss.source_files = 'Sources/ReownAppKit/**/*.{h,m,swift}'
ss.dependency 'reown-swift/WalletConnectSign'
ss.dependency 'reown-swift/ReownAppKitUI'
ss.dependency 'reown-swift/ReownAppKitBackport'
ss.dependency 'DSF_QRCode', '~> 16.1.1'
ss.dependency 'CoinbaseWalletSDK', '~> 1.0.0'
ss.resource_bundles = {
'ReownAppKit' => [
'Sources/ReownAppKit/Resources/*'
]
}
end

spec.subspec 'WalletConnectSign' do |ss|
ss.source_files = 'Sources/WalletConnectSign/**/*.{h,m,swift}'
ss.dependency 'reown-swift/WalletConnectPairing'
Expand Down

0 comments on commit 8c1a43e

Please sign in to comment.