Skip to content

Commit

Permalink
Minor bug fix during preferences clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
quetool committed Feb 7, 2024
1 parent 25dc665 commit 28da149
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 22 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.1.1-beta02

- Minor bug fix during preferences clearing

## 3.1.1-beta01

- Better Smart Contract interactions
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
versionName=3.1.1
versionCode=31
versionCode=32
12 changes: 6 additions & 6 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = W5R8AG9K22;
ENABLE_BITCODE = NO;
Expand All @@ -496,7 +496,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.web3modal.flutterExample.RunnerTests;
Expand All @@ -514,7 +514,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.web3modal.flutterExample.RunnerTests;
Expand All @@ -530,7 +530,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.web3modal.flutterExample.RunnerTests;
Expand Down Expand Up @@ -655,7 +655,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = W5R8AG9K22;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -686,7 +686,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = W5R8AG9K22;
ENABLE_BITCODE = NO;
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>31</string>
<string>32</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1073,10 +1073,10 @@ packages:
dependency: transitive
description:
name: walletconnect_flutter_v2
sha256: f3c90f6eceb130fefcc6b6e22a28ecc971612c90e91fbfaaafbd73c2178db8c1
sha256: "1e4d437baac68519fc1fb8eca17075673ee55c8aad1ed1d8cec95f60dcf6b512"
url: "https://pub.dev"
source: hosted
version: "2.2.0-beta01"
version: "2.2.0-beta02"
watcher:
dependency: transitive
description:
Expand Down Expand Up @@ -1107,7 +1107,7 @@ packages:
path: ".."
relative: true
source: path
version: "3.1.1-beta01"
version: "3.1.1-beta02"
web_socket_channel:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion lib/services/storage_service/i_storage_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ abstract class IStorageService {
Future<void> init();
String? getString(String key, {String? defaultValue});
Future<bool> setString(String key, String value);
Future<bool> clearAll();
Future<void> clearAll();
Future<bool> clearKey(String key);
}
9 changes: 7 additions & 2 deletions lib/services/storage_service/storage_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ class StorageService implements IStorageService {
}

@override
Future<bool> clearAll() async {
return await _prefs!.clear();
Future<void> clearAll() async {
final keys = _prefs!.getKeys();
for (var key in keys) {
if (key.startsWith('w3m_')) {
await _prefs!.remove(key);
}
}
}

@override
Expand Down
2 changes: 1 addition & 1 deletion lib/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1049,10 +1049,10 @@ packages:
dependency: "direct main"
description:
name: walletconnect_flutter_v2
sha256: f3c90f6eceb130fefcc6b6e22a28ecc971612c90e91fbfaaafbd73c2178db8c1
sha256: "1e4d437baac68519fc1fb8eca17075673ee55c8aad1ed1d8cec95f60dcf6b512"
url: "https://pub.dev"
source: hosted
version: "2.2.0-beta01"
version: "2.2.0-beta02"
watcher:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: web3modal_flutter
description: "WalletConnect Web3Modal: Simple, intuitive wallet login. With this drop-in UI SDK, enable any wallet's users to seamlessly log in to your app and enjoy a unified experience"
version: 3.1.1-beta01
version: 3.1.1-beta02
repository: https://github.com/WalletConnect/Web3ModalFlutter

environment:
Expand All @@ -23,7 +23,7 @@ dependencies:
shimmer: ^3.0.0
url_launcher: ^6.2.3
# walletconnect_flutter_v2: ^2.1.14
walletconnect_flutter_v2: ^2.2.0-beta01
walletconnect_flutter_v2: ^2.2.0-beta02

dev_dependencies:
build_runner: ^2.4.7
Expand Down
7 changes: 4 additions & 3 deletions test/mock_classes.mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2482,13 +2482,14 @@ class MockStorageService extends _i1.Mock implements _i33.StorageService {
returnValue: _i14.Future<bool>.value(false),
) as _i14.Future<bool>);
@override
_i14.Future<bool> clearAll() => (super.noSuchMethod(
_i14.Future<void> clearAll() => (super.noSuchMethod(
Invocation.method(
#clearAll,
[],
),
returnValue: _i14.Future<bool>.value(false),
) as _i14.Future<bool>);
returnValue: _i14.Future<void>.value(),
returnValueForMissingStub: _i14.Future<void>.value(),
) as _i14.Future<void>);
@override
_i14.Future<bool> clearKey(String? key) => (super.noSuchMethod(
Invocation.method(
Expand Down

0 comments on commit 28da149

Please sign in to comment.