Skip to content

Commit

Permalink
Upgrade wallet connect
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcmz committed Jul 10, 2023
1 parent b0b4c0c commit 876871f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@
"version": "1.6.0"
}
},
{
"package": "CryptoSwift",
"repositoryURL": "https://github.com/krzyzanowskim/CryptoSwift.git",
"state": {
"branch": null,
"revision": "19b3c3ceed117c5cc883517c4e658548315ba70b",
"version": "1.6.0"
}
},
{
"package": "Curry",
"repositoryURL": "https://github.com/thoughtbot/Curry.git",
Expand Down Expand Up @@ -56,21 +47,12 @@
}
},
{
"package": "PromiseKit",
"repositoryURL": "https://github.com/mxcl/PromiseKit.git",
"state": {
"branch": null,
"revision": "43772616c46a44a9977e41924ae01d0e55f2f9ca",
"version": "6.18.1"
}
},
{
"package": "secp256k1",
"repositoryURL": "https://github.com/Boilertalk/secp256k1.swift.git",
"package": "QRCode",
"repositoryURL": "https://github.com/WalletConnect/QRCode",
"state": {
"branch": null,
"revision": "45e458ec3be46cf0a6eb68bc947f797852dc65d8",
"version": "0.1.6"
"revision": "263f280d2c8144adfb0b6676109846cfc8dd552b",
"version": "14.3.1"
}
},
{
Expand All @@ -91,6 +73,24 @@
"version": "1.0.0"
}
},
{
"package": "swift-qrcode-generator",
"repositoryURL": "https://github.com/dagronf/swift-qrcode-generator",
"state": {
"branch": null,
"revision": "5ca09b6a2ad190f94aa3d6ddef45b187f8c0343b",
"version": "1.0.3"
}
},
{
"package": "SwiftImageReadWrite",
"repositoryURL": "https://github.com/dagronf/SwiftImageReadWrite",
"state": {
"branch": null,
"revision": "5596407d1cf61b953b8e658fa8636a471df3c509",
"version": "1.1.6"
}
},
{
"package": "SwiftParamTest",
"repositoryURL": "https://github.com/YusukeHosonuma/SwiftParamTest.git",
Expand All @@ -114,17 +114,8 @@
"repositoryURL": "https://github.com/WalletConnect/WalletConnectSwiftV2",
"state": {
"branch": null,
"revision": "41966b44442a0f77378ab55f70d89ec3f1c35c66",
"version": "1.0.6"
}
},
{
"package": "Web3",
"repositoryURL": "https://github.com/WalletConnect/Web3.swift",
"state": {
"branch": null,
"revision": "bdaaed96eee3a9bf7f341165f89a94288961d14c",
"version": "1.0.0"
"revision": "84b09a13b48d08f1092a7494e2ad70cbb92545c2",
"version": "1.6.11"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/outblock/flow-swift.git", .exact("0.3.1")),
.package(url: "https://github.com/daltoniam/Starscream", .exact("3.1.1")),
.package(url: "https://github.com/WalletConnect/WalletConnectSwiftV2", .exact("1.0.6")),
.package(url: "https://github.com/WalletConnect/WalletConnectSwiftV2", .exact("1.6.11")),
.package(url: "https://github.com/1024jp/GzipSwift", .exact("5.2.0")),
],
targets: [
Expand Down
6 changes: 3 additions & 3 deletions Sources/Provider/WalletConnect/WalletConnectProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ extension FCL {
}

let blockchains: Set<Blockchain> = Set([blockchain])
let namespaces: [String: ProposalNamespace] = [blockchain.namespace: ProposalNamespace(chains: blockchains, methods: methods, events: [], extensions: nil)]
let namespaces: [String: ProposalNamespace] = [blockchain.namespace: ProposalNamespace(chains: blockchains, methods: methods, events: [])]

if let topic {
try await Sign.instance.connect(requiredNamespaces: namespaces, topic: topic)
Expand Down Expand Up @@ -275,9 +275,9 @@ extension FCL {

Sign.instance.sessionProposalPublisher
.receive(on: DispatchQueue.main)
.sink { [weak self] sessionProposal in
.sink { [weak self] data in
print("[RESPONDER] WC: Did receive session proposal")
self?.currentProposal = sessionProposal
self?.currentProposal = data.proposal
self?.reloadSessionAndPair()
}.store(in: &publishers)

Expand Down

0 comments on commit 876871f

Please sign in to comment.