Skip to content

Commit

Permalink
Merge pull request #904 from WalletConnect/develop
Browse files Browse the repository at this point in the history
1.6.8
  • Loading branch information
llbartekll authored Jun 14, 2023
2 parents 2a6adfc + 3894cc1 commit b701691
Show file tree
Hide file tree
Showing 139 changed files with 3,835 additions and 858 deletions.
5 changes: 2 additions & 3 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ runs:
using: "composite"
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/cache@v3
with:
path: |
**/SourcePackagesCache
DerivedDataCache
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Build for testing
shell: bash
Expand Down
7 changes: 5 additions & 2 deletions .github/actions/run_tests_without_building/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
project-id:
description: 'WalletConnect project id'
required: true
slack-webhook-url:
description: 'Smoke tests slack webhoook url'
required: true

runs:
using: "composite"
Expand Down Expand Up @@ -53,13 +56,13 @@ runs:
run: make smoke_tests RELAY_HOST=${{ inputs.relay-endpoint }} PROJECT_ID=${{ inputs.project-id }}

- name: Slack Notification for Failure
if: failure() && matrix.type == 'smoke-tests'
if: failure() && (inputs.type == 'smoke-tests' || inputs.type == 'relay-tests')
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: The smoke tests failed in the CI pipeline. Check the logs for more details.
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_URL: ${{ inputs.slack-webhook-url }}

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ jobs:
with:
path: |
**/SourcePackagesCache
DerivedDataCache
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Build for testing on workflow_dispatch
if: ${{ github.event_name == 'workflow_dispatch' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:

- name: Lint CocoaPods
run: |
pod lib lint WalletConnectSwiftV2.podspec --verbose --allow-warnings
pod lib lint --verbose --no-clean --quick --allow-warnings --platforms=ios WalletConnectSwiftV2.podspec
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: ./.github/actions/build
with:
Expand All @@ -41,6 +43,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/cache/restore@v3
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ xcuserdata/
# Swift Package Manager
Packages/
Package.pins
Package.resolved
/*.xcodeproj

# Fastlane
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectHistory"
BuildableName = "WalletConnectHistory"
BlueprintName = "WalletConnectHistory"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</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">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectHistory"
BuildableName = "WalletConnectHistory"
BlueprintName = "WalletConnectHistory"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
10 changes: 10 additions & 0 deletions Example/DApp/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import UIKit
import Auth
import WalletConnectRelay
import WalletConnectNetworking
import Web3Modal

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

Expand All @@ -13,6 +14,15 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
Networking.configure(projectId: InputConfig.projectId, socketFactory: DefaultSocketFactory())
Auth.configure(crypto: DefaultCryptoProvider())

let metadata = AppMetadata(
name: "Swift Dapp",
description: "WalletConnect DApp sample",
url: "wallet.connect",
icons: ["https://avatars.githubusercontent.com/u/37784886"]
)

Web3Modal.configure(projectId: InputConfig.projectId, metadata: metadata)

setupWindow(scene: scene)
}
Expand Down
3 changes: 1 addition & 2 deletions Example/DApp/Sign/Connect/ConnectViewController.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Foundation
import UIKit
import WalletConnectSign
import WalletConnectPairing
import Web3Modal

class ConnectViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
let uri: WalletConnectURI
Expand Down
17 changes: 9 additions & 8 deletions Example/DApp/Sign/SelectChain/SelectChainViewController.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Foundation
import WalletConnectSign
import WalletConnectPairing
import Web3Modal
import UIKit
import Combine

Expand Down Expand Up @@ -70,16 +69,18 @@ class SelectChainViewController: UIViewController, UITableViewDataSource {
let sessionProperties: [String: String] = [
"caip154-mandatory": "true"
]

Task {
let uri = try await Pair.instance.create()
try await Sign.instance.connect(
Web3Modal.set(sessionParams: .init(
requiredNamespaces: namespaces,
optionalNamespaces: optionalNamespaces,
sessionProperties: sessionProperties,
topic: uri.topic
)
showConnectScreen(uri: uri)
sessionProperties: sessionProperties
))

let uri = try await Web3Modal.instance.connect(topic: nil)
}

Web3Modal.present(from: self)
}

@objc
Expand Down
3 changes: 2 additions & 1 deletion Example/ExampleApp.xcodeproj/IntegrationTests.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
{
"skippedTests" : [
"AuthTests\/testEIP1271RespondSuccess()",
"ChatTests"
"ChatTests",
"ENSResolverTests"
],
"target" : {
"containerPath" : "container:ExampleApp.xcodeproj",
Expand Down
Loading

0 comments on commit b701691

Please sign in to comment.