Skip to content

Commit

Permalink
Merge pull request #21 from wakumo/feature/ios-1-6-15
Browse files Browse the repository at this point in the history
feat: upgrade to the latest SDKs Android Bom 1.15.0, iOS 1.6.15
  • Loading branch information
ludowkm authored Aug 7, 2023
2 parents 5852c86 + 0117648 commit 2f82324
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 39 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@

* Upgrade to the latest SDKs Android Bom 1.13.1, iOS 1.6.12
* Support optional namespaces

## 1.0.7

* Upgrade to the latest SDKs Android Bom 1.15.0, iOS 1.6.15
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ android {

dependencies {
implementation 'com.google.code.gson:gson:2.10'
implementation(platform("com.walletconnect:android-bom:1.13.1"))
implementation(platform("com.walletconnect:android-bom:1.15.0"))
implementation("com.walletconnect:android-core")
implementation("com.walletconnect:sign")
}
Expand Down
40 changes: 20 additions & 20 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,44 @@ PODS:
- wallet_connect_v2 (0.0.1):
- Flutter
- Starscream (= 3.1.1)
- WalletConnectSwiftV2 (= 1.6.12)
- WalletConnectSwiftV2 (1.6.12):
- WalletConnectSwiftV2/WalletConnect (= 1.6.12)
- WalletConnectSwiftV2/Commons (1.6.12)
- WalletConnectSwiftV2/HTTPClient (1.6.12)
- WalletConnectSwiftV2/JSONRPC (1.6.12):
- WalletConnectSwiftV2 (= 1.6.15)
- WalletConnectSwiftV2 (1.6.15):
- WalletConnectSwiftV2/WalletConnect (= 1.6.15)
- WalletConnectSwiftV2/Commons (1.6.15)
- WalletConnectSwiftV2/HTTPClient (1.6.15)
- WalletConnectSwiftV2/JSONRPC (1.6.15):
- WalletConnectSwiftV2/Commons
- WalletConnectSwiftV2/WalletConnect (1.6.12):
- WalletConnectSwiftV2/WalletConnect (1.6.15):
- WalletConnectSwiftV2/WalletConnectAuth
- WalletConnectSwiftV2/WalletConnectEcho
- WalletConnectSwiftV2/WalletConnectSign
- WalletConnectSwiftV2/WalletConnectVerify
- WalletConnectSwiftV2/WalletConnectAuth (1.6.12):
- WalletConnectSwiftV2/WalletConnectAuth (1.6.15):
- WalletConnectSwiftV2/WalletConnectPairing
- WalletConnectSwiftV2/WalletConnectSigner
- WalletConnectSwiftV2/WalletConnectVerify
- WalletConnectSwiftV2/WalletConnectEcho (1.6.12):
- WalletConnectSwiftV2/WalletConnectEcho (1.6.15):
- WalletConnectSwiftV2/WalletConnectJWT
- WalletConnectSwiftV2/WalletConnectNetworking
- WalletConnectSwiftV2/WalletConnectJWT (1.6.12):
- WalletConnectSwiftV2/WalletConnectJWT (1.6.15):
- WalletConnectSwiftV2/WalletConnectKMS
- WalletConnectSwiftV2/WalletConnectKMS (1.6.12):
- WalletConnectSwiftV2/WalletConnectKMS (1.6.15):
- WalletConnectSwiftV2/WalletConnectUtils
- WalletConnectSwiftV2/WalletConnectNetworking (1.6.12):
- WalletConnectSwiftV2/WalletConnectNetworking (1.6.15):
- WalletConnectSwiftV2/HTTPClient
- WalletConnectSwiftV2/WalletConnectRelay
- WalletConnectSwiftV2/WalletConnectPairing (1.6.12):
- WalletConnectSwiftV2/WalletConnectPairing (1.6.15):
- WalletConnectSwiftV2/WalletConnectNetworking
- WalletConnectSwiftV2/WalletConnectRelay (1.6.12):
- WalletConnectSwiftV2/WalletConnectRelay (1.6.15):
- WalletConnectSwiftV2/WalletConnectJWT
- WalletConnectSwiftV2/WalletConnectSign (1.6.12):
- WalletConnectSwiftV2/WalletConnectSign (1.6.15):
- WalletConnectSwiftV2/WalletConnectPairing
- WalletConnectSwiftV2/WalletConnectVerify
- WalletConnectSwiftV2/WalletConnectSigner (1.6.12):
- WalletConnectSwiftV2/WalletConnectSigner (1.6.15):
- WalletConnectSwiftV2/WalletConnectNetworking
- WalletConnectSwiftV2/WalletConnectUtils (1.6.12):
- WalletConnectSwiftV2/WalletConnectUtils (1.6.15):
- WalletConnectSwiftV2/JSONRPC
- WalletConnectSwiftV2/WalletConnectVerify (1.6.12):
- WalletConnectSwiftV2/WalletConnectVerify (1.6.15):
- WalletConnectSwiftV2/WalletConnectNetworking
- WalletConnectSwiftV2/WalletConnectUtils

Expand Down Expand Up @@ -75,8 +75,8 @@ SPEC CHECKSUMS:
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
Starscream: 4bb2f9942274833f7b4d296a55504dcfc7edb7b0
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
wallet_connect_v2: ad634eb6588ce21fc2b51edb052bcd46dcd45601
WalletConnectSwiftV2: 6b96868cd4b46bfb2660b523e8a1441c0d9f3a5b
wallet_connect_v2: 78e20efdb3991c6658034d1b41c397fa65377555
WalletConnectSwiftV2: 1fe475684ebc12eff1c82dfec06c724abd6215e8

PODFILE CHECKSUM: cc1f88378b4bfcf93a6ce00d2c587857c6008d3b

Expand Down
30 changes: 15 additions & 15 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,15 @@ class _HomeViewState extends State<HomeView> with WidgetsBindingObserver {
));
if (isApprove == true) {
try {
final requiredMethods = proposal.namespaces['eip155']!.methods;
final requiredEvents = proposal.namespaces['eip155']!.events;
final requiredMethods =
proposal.namespaces['eip155']?.methods ?? <String>[];
final requiredEvents =
proposal.namespaces['eip155']?.events ?? <String>[];

final optionalMethods =
proposal.optionalNamespaces?['eip155']?.methods;
final optionalEvents = proposal.optionalNamespaces?['eip155']?.events;

final methods = optionalMethods != null &&
optionalMethods.length > requiredMethods.length
? optionalMethods
: requiredMethods;
final events = optionalEvents != null &&
optionalEvents.length > requiredEvents.length
? optionalEvents
: requiredEvents;
proposal.optionalNamespaces?['eip155']?.methods ?? <String>[];
final optionalEvents =
proposal.optionalNamespaces?['eip155']?.events ?? <String>[];

final List<String> chainList = [];
chainList.addAll(proposal.namespaces['eip155']!.chains!);
Expand All @@ -151,8 +145,12 @@ class _HomeViewState extends State<HomeView> with WidgetsBindingObserver {
final approval = SessionApproval(id: proposal.id, namespaces: {
'eip155': SessionNamespace(
accounts: chainIDs.map((e) => '$e:$_address').toList(),
methods: methods,
events: events)
methods: requiredMethods.isNotEmpty
? <String>{...requiredMethods, ...optionalMethods}.toList()
: [],
events: requiredEvents.isNotEmpty
? <String>{...requiredEvents, ...optionalEvents}.toList()
: [])
});

print(approval.toJson());
Expand Down Expand Up @@ -309,6 +307,8 @@ class _HomeViewState extends State<HomeView> with WidgetsBindingObserver {
}
break;
default:
_walletConnectV2Plugin.rejectRequest(
topic: request.topic, requestId: request.id);
_showDialog(child: Text('Unhandled method ${request.method}'));
break;
}
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.0.7"
watcher:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion ios/wallet_connect_v2.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Wallet Connect V2 for Flutter
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'WalletConnectSwiftV2', '1.6.12'
s.dependency 'WalletConnectSwiftV2', '1.6.15'
s.dependency 'Starscream', '3.1.1'
s.platform = :ios, '13.0'

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: wallet_connect_v2
description: Wallet Connect V2 for Flutter, available for both Wallet and DApp to interact easier
version: 1.0.6
version: 1.0.7
homepage: https://avacus.cc
repository: https://github.com/wakumo/flutter-wallet-connect-v2

Expand Down

0 comments on commit 2f82324

Please sign in to comment.