Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6.6 #879

Merged
merged 40 commits into from
May 30, 2023
Merged

1.6.6 #879

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c27cb3f
savepoint
llbartekll May 18, 2023
ad284c5
NotifyProposeResponseSubscriber savepoint
llbartekll May 19, 2023
7da99cf
Update notify propose responder
llbartekll May 22, 2023
8dc58d5
add dependencies to clients
llbartekll May 22, 2023
338ba42
UI improvements + Sign integration
radeknovis May 16, 2023
24b4e9d
Fetching and displaying Wallets
radeknovis May 16, 2023
6edd147
Use new endpoint + order field
radeknovis May 18, 2023
0463193
Fix AsyncImage animations
radeknovis May 18, 2023
bf5b182
Extract and reuse existing HTTPClient
radeknovis May 19, 2023
abbac6e
Remove unnecessary imports
radeknovis May 22, 2023
afdc8cd
Add HttpClient to podspec
radeknovis May 22, 2023
94a5ae1
add propose test
llbartekll May 23, 2023
62611e1
Merge branch 'develop' of github.com:WalletConnect/WalletConnectSwift…
llbartekll May 23, 2023
a6f8f73
savepoint
llbartekll May 23, 2023
c33dc00
Update podspec
radeknovis May 23, 2023
60b0c8b
update approve method
llbartekll May 23, 2023
cfe36b7
fix bug - subscribe scope
llbartekll May 23, 2023
4d7f70e
update rpc method according to spec change
llbartekll May 24, 2023
cfd488a
Remove unnecessary EnvironmentKey
radeknovis May 24, 2023
1862b95
Merge pull request #853 from WalletConnect/feature/w3m-networking
radeknovis May 24, 2023
49137f7
savepoint
llbartekll May 24, 2023
4081ca1
Pass propose rejection test
llbartekll May 25, 2023
67c1cb0
remove unused dapp services
llbartekll May 25, 2023
15e5cee
update proposal response publisher
llbartekll May 25, 2023
6a42ae3
fix sample apps
llbartekll May 25, 2023
2d32f54
Deeplink to wallets
radeknovis May 25, 2023
3e7aea3
present w3i only
llbartekll May 26, 2023
65c69ba
Merge pull request #870 from WalletConnect/feature/w3m-deeplinking
radeknovis May 26, 2023
d23fcfc
Update proposal response according to spec change
llbartekll May 26, 2023
9b0c317
Try using pull_request_target to allow access to secrets when approved
radeknovis May 26, 2023
b0f7a4f
fix proposal response
llbartekll May 29, 2023
6c486a7
Merge pull request #875 from WalletConnect/allow-external-PRs
radeknovis May 29, 2023
9e9cc13
fix wallet build
llbartekll May 29, 2023
c96ce48
fix propose response bug
llbartekll May 29, 2023
8e5f0e7
Merge 6c486a7cf66f631fff4a2af0c66de16a911d53ff into 545ae2ba5a4266076…
radeknovis May 29, 2023
1337945
Set User Agent
radeknovis May 29, 2023
cd04595
unsubscribe on error response
llbartekll May 29, 2023
60bcb15
Merge pull request #872 from WalletConnect/push-propose
llbartekll May 30, 2023
891b4ff
Merge 60bcb15e44ce95f39bc5134c5de898478ccc8080 into 545ae2ba5a4266076…
llbartekll May 30, 2023
9316bdc
Set User Agent
llbartekll May 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions .github/workflows/ci_v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: ci_v2

on:
pull_request_target:
branches:
- develop
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.event.pull_request.number || github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}

jobs:
authorize:
environment:
${{ (github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository) &&
'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: echo ✓

prepare:
needs: authorize
runs-on: macos-12
steps:
- uses: actions/checkout@v3

- uses: ./.github/actions/build
with:
project-id: ${{ secrets.PROJECT_ID }}

test:
needs: prepare
runs-on: macos-12
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
type: [relay-tests] # Put this back when verified it is working [integration-tests, relay-tests, unit-tests]

steps:
- uses: actions/checkout@v3

- uses: actions/cache/restore@v3
with:
path: |
products.tar
key: ${{ runner.os }}-deriveddata-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-deriveddata-${{ github.ref }}-

- name: Untar DerivedDataCache
shell: bash
run: test -f products.tar && tar xPpf products.tar || echo "No artifacts to untar"

# Package Unit tests
- name: Run tests
if: matrix.type == 'unit-tests'
shell: bash
run: make unit_tests

# Integration tests
- 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 }}

# Relay Integration tests
- name: Run Relay integration tests
if: matrix.type == 'relay-tests'
shell: bash
run: make relay_tests RELAY_HOST=relay.walletconnect.com PROJECT_ID=${{ secrets.PROJECT_ID }}

# Smoke tests
- name: Run smoke tests
if: matrix.type == 'smoke-tests'
shell: bash
run: make smoke_tests RELAY_HOST=relay.walletconnect.com PROJECT_ID=${{ secrets.PROJECT_ID }}

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: success() || failure()
with:
check_name: ${{ matrix.type }} junit report
report_paths: 'test_results/report.junit'

- name: Zip test artifacts
if: always()
shell: bash
run: test -d "test_results" && zip artifacts.zip -r ./test_results || echo "Nothing to zip"

- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.type }} test_results
path: ./artifacts.zip
if-no-files-found: warn

66 changes: 66 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/Web3Modal.xcscheme
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 = "Web3Modal"
BuildableName = "Web3Modal"
BlueprintName = "Web3Modal"
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 = "Web3Modal"
BuildableName = "Web3Modal"
BlueprintName = "Web3Modal"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
22 changes: 4 additions & 18 deletions Example/DApp/Sign/Accounts/AccountsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ final class AccountsViewController: UIViewController, UITableViewDataSource, UIT
action: #selector(disconnect)
)

navigationItem.leftBarButtonItem = UIBarButtonItem(
title: "Push Test",
style: .plain,
target: self,
action: #selector(pushTest)
)

accountsView.tableView.dataSource = self
accountsView.tableView.delegate = self
session.namespaces.values.forEach { namespace in
Expand All @@ -65,24 +58,17 @@ final class AccountsViewController: UIViewController, UITableViewDataSource, UIT
func proposePushSubscription() {
let account = session.namespaces.values.first!.accounts.first!

Task(priority: .high){ try! await Push.dapp.request(account: account, topic: session.pairingTopic)}
Push.dapp.responsePublisher.sink { (id: RPCID, result: Result<PushSubscriptionResult, PushError>) in
Task(priority: .high){ try! await Push.dapp.propose(account: account, topic: session.pairingTopic)}
Push.dapp.proposalResponsePublisher.sink { result in
switch result {
case .success(let subscriptionResult):
self.pushSubscription = subscriptionResult.pushSubscription
case .success(let subscription):
self.pushSubscription = subscription
case .failure(let error):
print(error)
}
}.store(in: &publishers)
}

@objc
private func pushTest() {
guard let pushTopic = pushSubscription?.topic else {return}
let message = PushMessage(title: "Push Message", body: "He,y this is a message from the swift client", icon: "", url: "")
Task(priority: .userInitiated) { try! await Push.dapp.notify(topic: pushTopic, message: message) }
}

@objc
private func disconnect() {
Task {
Expand Down
1 change: 1 addition & 0 deletions Example/ExampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2638,6 +2638,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 7;
Expand Down
6 changes: 3 additions & 3 deletions Example/IntegrationTests/Pairing/PairingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ final class PairingTests: XCTestCase {

try! await walletPairingClient.pair(uri: uri)

try! await appPushClient.request(account: Account.stub(), topic: uri.topic)
try! await appPushClient.propose(account: Account.stub(), topic: uri.topic)

wait(for: [expectation], timeout: InputConfig.defaultTimeout)
}
Expand All @@ -129,7 +129,7 @@ final class PairingTests: XCTestCase {
makeWalletPairingClient()
let expectation = expectation(description: "wallet responds unsupported method for unregistered method")

appPushClient.responsePublisher.sink { (_, response) in
appPushClient.proposalResponsePublisher.sink { (response) in
XCTAssertEqual(response, .failure(PushError(code: 10001)!))
expectation.fulfill()
}.store(in: &publishers)
Expand All @@ -138,7 +138,7 @@ final class PairingTests: XCTestCase {

try! await walletPairingClient.pair(uri: uri)

try! await appPushClient.request(account: Account.stub(), topic: uri.topic)
try! await appPushClient.propose(account: Account.stub(), topic: uri.topic)

wait(for: [expectation], timeout: InputConfig.defaultTimeout)
}
Expand Down
Loading