Skip to content

Commit

Permalink
Merge pull request #1058 from WalletConnect/develop
Browse files Browse the repository at this point in the history
1.7.0
  • Loading branch information
flypaper0 authored Aug 25, 2023
2 parents 10efd24 + 3946d26 commit a150963
Show file tree
Hide file tree
Showing 191 changed files with 2,626 additions and 2,404 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Run integration tests
if: matrix.type == 'integration-tests'
shell: bash
run: make integration_tests RELAY_HOST=relay.walletconnect.com PROJECT_ID=${{ secrets.PROJECT_ID }} CAST_HOST=cast.walletconnect.com GM_DAPP_PROJECT_ID=${{ secrets.GM_DAPP_PROJECT_ID }} GM_DAPP_PROJECT_SECRET=${{ secrets.GM_DAPP_PROJECT_SECRET }} JS_CLIENT_API_HOST=test-automation-api.walletconnect.com
run: make integration_tests RELAY_HOST=relay.walletconnect.com PROJECT_ID=${{ secrets.PROJECT_ID }} CAST_HOST=notify.walletconnect.com GM_DAPP_PROJECT_ID=${{ secrets.GM_DAPP_PROJECT_ID }} GM_DAPP_PROJECT_SECRET=${{ secrets.GM_DAPP_PROJECT_SECRET }} JS_CLIENT_API_HOST=test-automation-api.walletconnect.com

# Relay Integration tests
- name: Run Relay integration tests
Expand Down
53 changes: 53 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/NotifyTests.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NotifyTests"
BuildableName = "NotifyTests"
BlueprintName = "NotifyTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
version = "1.3">
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -14,24 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectPush"
BuildableName = "WalletConnectPush"
BlueprintName = "WalletConnectPush"
ReferencedContainer = "container:..">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "NO"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NotifyTests"
BuildableName = "NotifyTests"
BlueprintName = "NotifyTests"
ReferencedContainer = "container:..">
BlueprintIdentifier = "WalletConnectNotify"
BuildableName = "WalletConnectNotify"
BlueprintName = "WalletConnectNotify"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -40,19 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "NotifyTests"
BuildableName = "NotifyTests"
BlueprintName = "NotifyTests"
ReferencedContainer = "container:..">
</BuildableReference>
</TestableReference>
</Testables>
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -74,10 +49,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectPush"
BuildableName = "WalletConnectPush"
BlueprintName = "WalletConnectPush"
ReferencedContainer = "container:..">
BlueprintIdentifier = "WalletConnectNotify"
BuildableName = "WalletConnectNotify"
BlueprintName = "WalletConnectNotify"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
version = "1.3">
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -14,10 +14,10 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectEcho"
BuildableName = "WalletConnectEcho"
BlueprintName = "WalletConnectEcho"
ReferencedContainer = "container:..">
BlueprintIdentifier = "WalletConnectPush"
BuildableName = "WalletConnectPush"
BlueprintName = "WalletConnectPush"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -26,9 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -50,10 +49,10 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectEcho"
BuildableName = "WalletConnectEcho"
BlueprintName = "WalletConnectEcho"
ReferencedContainer = "container:..">
BlueprintIdentifier = "WalletConnectPush"
BuildableName = "WalletConnectPush"
BlueprintName = "WalletConnectPush"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
Expand Down
2 changes: 1 addition & 1 deletion Configuration.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ RELAY_HOST = relay.walletconnect.com

// WALLETAPP_SENTRY_DSN = WALLETAPP_SENTRY_DSN

CAST_HOST = cast.walletconnect.com
CAST_HOST = notify.walletconnect.com
9 changes: 9 additions & 0 deletions Example/DApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>metamask</string>
<string>trust</string>
<string>safe</string>
<string>zerion</string>
<string>rainbow</string>
<string>spot</string>
</array>
<key>CFBundleVersion</key>
<string>7</string>
<key>CFBundleShortVersionString</key>
Expand Down
20 changes: 3 additions & 17 deletions Example/DApp/Sign/Accounts/AccountsViewController.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit
import WalletConnectSign
import WalletConnectPush
import WalletConnectNotify
import Combine

struct AccountDetails {
Expand All @@ -14,7 +14,7 @@ final class AccountsViewController: UIViewController, UITableViewDataSource, UIT
let session: Session
var accountsDetails: [AccountDetails] = []
var onDisconnect: (() -> Void)?
var pushSubscription: PushSubscription?
var notifySubscription: NotifySubscription?

private var publishers = [AnyCancellable]()
private let accountsView: AccountsView = {
Expand Down Expand Up @@ -54,21 +54,7 @@ final class AccountsViewController: UIViewController, UITableViewDataSource, UIT
}
}
}

func proposePushSubscription() {
let account = session.namespaces.values.first!.accounts.first!

Task(priority: .high){ try! await Push.dapp.propose(account: account, topic: session.pairingTopic)}
Push.dapp.proposalResponsePublisher.sink { result in
switch result {
case .success(let subscription):
self.pushSubscription = subscription
case .failure(let error):
print(error)
}
}.store(in: &publishers)
}


@objc
private func disconnect() {
Task {
Expand Down
7 changes: 0 additions & 7 deletions Example/DApp/Sign/SignCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ final class SignCoordinator {
presentResponse(for: response)
}.store(in: &publishers)

Sign.instance.sessionSettlePublisher
.receive(on: DispatchQueue.main)
.sink { [unowned self] session in
let vc = showAccountsScreen(session)
vc.proposePushSubscription()
}.store(in: &publishers)

if let session = Sign.instance.getSessions().first {
_ = showAccountsScreen(session)
} else {
Expand Down
Loading

0 comments on commit a150963

Please sign in to comment.