Skip to content

Commit

Permalink
Merge pull request #466 from WalletConnect/develop
Browse files Browse the repository at this point in the history
v0.10.0
  • Loading branch information
llbartekll authored Aug 24, 2022
2 parents 73c3273 + 6aad276 commit 885eb32
Show file tree
Hide file tree
Showing 91 changed files with 1,732 additions and 835 deletions.
10 changes: 5 additions & 5 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme WalletConnect \
-clonedSourcePackagesDirPath SourcePackages \
-clonedSourcePackagesDirPath SourcePackagesCache \
-destination 'platform=iOS Simulator,name=iPhone 13' \
test"

Expand All @@ -26,7 +26,7 @@ runs:
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme IntegrationTests \
-clonedSourcePackagesDirPath SourcePackages \
-clonedSourcePackagesDirPath SourcePackagesCache \
-destination 'platform=iOS Simulator,name=iPhone 13' test"

# Wallet build
Expand All @@ -36,7 +36,7 @@ runs:
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme Wallet \
-clonedSourcePackagesDirPath SourcePackages \
-clonedSourcePackagesDirPath SourcePackagesCache \
-sdk iphonesimulator"

# DApp build
Expand All @@ -46,7 +46,7 @@ runs:
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme DApp \
-clonedSourcePackagesDirPath SourcePackages \
-clonedSourcePackagesDirPath SourcePackagesCache \
-sdk iphonesimulator"

# UI tests
Expand All @@ -56,6 +56,6 @@ runs:
run: "xcodebuild \
-project Example/ExampleApp.xcodeproj \
-scheme UITests \
-clonedSourcePackagesDirPath SourcePackages \
-clonedSourcePackagesDirPath SourcePackagesCache \
-destination 'platform=iOS Simulator,name=iPhone 13' test"
continue-on-error: true
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Setup Xcode Version
uses: maxim-lobanov/setup-xcode@v1

- name: Resolve Dependencies
shell: bash
run: "
xcodebuild -resolvePackageDependencies -project Example/ExampleApp.xcodeproj -scheme DApp -clonedSourcePackagesDirPath SourcePackagesCache; \
xcodebuild -resolvePackageDependencies -project Example/ExampleApp.xcodeproj -scheme WalletConnect -clonedSourcePackagesDirPath SourcePackagesCache"

- uses: actions/cache@v2
with:
path: |
.build
SourcePackages
SourcePackagesCache
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
Expand All @@ -58,7 +64,7 @@ jobs:
with:
path: |
.build
SourcePackages
SourcePackagesCache
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/intake.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow moves issues to the Swift board
# This workflow moves issues to the board
# when they receive the "accepted" label
# When WalletConnect Org members create issues they
# are automatically "accepted".
Expand Down Expand Up @@ -28,15 +28,20 @@ jobs:
if: github.event.action == 'opened'
runs-on: ubuntu-latest
steps:
- name: Check if organization member
id: is_organization_member
if: github.event.action == 'opened'
uses: JamesSingleton/[email protected]
- name: Check Core Team membership
uses: tspascoal/get-user-teams-membership@v1
id: is-core-team
with:
organization: WalletConnect
username: ${{ github.event_name != 'pull_request' && github.event.issue.user.login || github.event.sender.login }}
token: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }}
team: "Core Team"
GITHUB_TOKEN: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }}
- name: Print result
env:
CREATOR: ${{ github.event_name != 'pull_request' && github.event.issue.user.login || github.event.sender.login }}
IS_TEAM_MEMBER: ${{ steps.is-core-team.outputs.isTeamMember }}
run: echo "$CREATOR (Core Team Member $IS_TEAM_MEMBER) created this issue/PR"
- name: Label issues
if: ${{ steps.is-core-team.outputs.isTeamMember == 'true' }}
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
add-labels: "accepted"
Expand Down
10 changes: 10 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/WalletConnectAuth.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AuthTests"
BuildableName = "AuthTests"
BlueprintName = "AuthTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
3 changes: 2 additions & 1 deletion Example/DApp/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
url: "wallet.connect",
icons: ["https://avatars.githubusercontent.com/u/37784886"])

Sign.configure(metadata: metadata, projectId: "8ba9ee138960775e5231b70cc5ef1c3a", socketFactory: SocketFactory())
Relay.configure(projectId: "8ba9ee138960775e5231b70cc5ef1c3a", socketFactory: SocketFactory())
Sign.configure(metadata: metadata)

if CommandLine.arguments.contains("-cleanInstall") {
try? Sign.instance.cleanup()
Expand Down
19 changes: 18 additions & 1 deletion Example/DApp/SelectChain/SelectChainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import Foundation
import UIKit

class SelectChainView: UIView {

let tableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .insetGrouped)
tableView.backgroundColor = .tertiarySystemBackground
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "chain")
return tableView
}()

let connectButton: UIButton = {
let button = UIButton(type: .system)
button.setTitle("Connect", for: .normal)
Expand All @@ -17,12 +19,22 @@ class SelectChainView: UIView {
return button
}()

let openWallet: UIButton = {
let button = UIButton(type: .system)
button.setTitle("Open Wallet", for: .normal)
button.backgroundColor = .systemFill
button.tintColor = .white
button.layer.cornerRadius = 8
return button
}()

override init(frame: CGRect) {
super.init(frame: frame)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "chain_cell")
backgroundColor = .systemBackground
addSubview(tableView)
addSubview(connectButton)
addSubview(openWallet)

subviews.forEach { $0.translatesAutoresizingMaskIntoConstraints = false }

Expand All @@ -35,7 +47,12 @@ class SelectChainView: UIView {
connectButton.bottomAnchor.constraint(equalTo: safeAreaLayoutGuide.bottomAnchor, constant: -16),
connectButton.centerXAnchor.constraint(equalTo: safeAreaLayoutGuide.centerXAnchor),
connectButton.heightAnchor.constraint(equalToConstant: 44),
connectButton.widthAnchor.constraint(equalToConstant: 120)
connectButton.widthAnchor.constraint(equalToConstant: 120),

openWallet.bottomAnchor.constraint(equalTo: connectButton.topAnchor, constant: -16),
openWallet.centerXAnchor.constraint(equalTo: safeAreaLayoutGuide.centerXAnchor),
openWallet.heightAnchor.constraint(equalToConstant: 44),
openWallet.widthAnchor.constraint(equalToConstant: 120)
])
}

Expand Down
6 changes: 6 additions & 0 deletions Example/DApp/SelectChain/SelectChainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class SelectChainViewController: UIViewController, UITableViewDataSource {
navigationItem.title = "Available Chains"
selectChainView.tableView.dataSource = self
selectChainView.connectButton.addTarget(self, action: #selector(connect), for: .touchUpInside)
selectChainView.openWallet.addTarget(self, action: #selector(openWallet), for: .touchUpInside)
Sign.instance.sessionSettlePublisher.sink {[unowned self] session in
onSessionSettled?(session)
}.store(in: &publishers)
Expand All @@ -42,6 +43,11 @@ class SelectChainViewController: UIViewController, UITableViewDataSource {
}
}

@objc
private func openWallet() {
UIApplication.shared.open(URL(string: "walletconnectwallet://")!)
}

private func showConnectScreen(uriString: String) {
DispatchQueue.main.async { [unowned self] in
let vc = UINavigationController(rootViewController: ConnectViewController(uri: uriString))
Expand Down
Loading

0 comments on commit 885eb32

Please sign in to comment.