Skip to content

Commit

Permalink
minor changes in walletkit
Browse files Browse the repository at this point in the history
  • Loading branch information
quetool committed Oct 22, 2024
1 parent 53ecb3a commit 15cab9d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 23 deletions.
6 changes: 5 additions & 1 deletion packages/reown_walletkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
## 1.0.2

- Minor dependency update

## 1.0.1

- Update readme

## 1.0.0

Initial release.
- Initial release
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class WalletKitService extends IWalletKitService {
_walletKit = ReownWalletKit(
core: ReownCore(
projectId: DartDefines.projectId,
logLevel: LogLevel.error,
logLevel: LogLevel.info,
),
metadata: PairingMetadata(
name: 'FL WalletKit Sample',
Expand All @@ -66,8 +66,6 @@ class WalletKitService extends IWalletKitService {
),
);

_walletKit!.core.addLogListener(_logListener);

// Setup our listeners
debugPrint('[SampleWallet] create');
_walletKit!.core.pairing.onPairingInvalid.subscribe(_onPairingInvalid);
Expand Down Expand Up @@ -148,18 +146,8 @@ class WalletKitService extends IWalletKitService {
}
}

void _logListener(LogEvent event) {
if (event.level == Level.debug) {
// TODO send to mixpanel
log('${event.message}');
} else {
debugPrint('${event.message}');
}
}

@override
FutureOr onDispose() {
_walletKit!.core.removeLogListener(_logListener);
_walletKit!.core.pairing.onPairingInvalid.unsubscribe(_onPairingInvalid);
_walletKit!.core.pairing.onPairingCreate.unsubscribe(_onPairingCreate);
_walletKit!.core.relayClient.onRelayClientError.unsubscribe(
Expand Down
2 changes: 1 addition & 1 deletion packages/reown_walletkit/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
http: ^1.2.2
json_annotation: ^4.8.1
kadena_dart_sdk: ^2.3.2
package_info_plus: ^7.0.0
package_info_plus: ^8.0.2
pointycastle: ^3.9.1
polkadart: ^0.4.6
polkadart_keyring: ^0.4.3
Expand Down
2 changes: 1 addition & 1 deletion packages/reown_walletkit/lib/version.dart

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

10 changes: 5 additions & 5 deletions packages/reown_walletkit/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: reown_walletkit
description: "Reown is the onchain UX platform that provides toolkits built on top of the WalletConnect Network"
version: 1.0.1
version: 1.0.2
homepage: https://github.com/reown-com/reown_flutter
repository: https://github.com/reown-com/reown_flutter/tree/master/packages/reown_walletkit
documentation: https://docs.reown.com/walletkit/flutter/installation
Expand All @@ -12,8 +12,8 @@ dependencies:
event: ^2.1.2
flutter:
sdk: flutter
reown_core: ^1.0.0
reown_sign: ^1.0.0
reown_core: ^1.0.2
reown_sign: ^1.0.2

dev_dependencies:
build_runner: ^2.4.7
Expand All @@ -25,8 +25,8 @@ dev_dependencies:
http: ^1.2.2
logger: ^2.2.0
mockito: ^5.4.3
package_info_plus: ^7.0.0
reown_appkit: ^1.0.0
package_info_plus: ^8.0.2
reown_appkit: ^1.0.1

platforms:
android:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ class MockReownCore extends _i1.Mock implements _i28.ReownCore {
) as _i19.Logger);

@override
void addLogListener(_i19.LogCallback? callback) => super.noSuchMethod(
void addLogListener(dynamic Function(String)? callback) => super.noSuchMethod(
Invocation.method(
#addLogListener,
[callback],
Expand All @@ -1463,7 +1463,8 @@ class MockReownCore extends _i1.Mock implements _i28.ReownCore {
);

@override
bool removeLogListener(_i19.LogCallback? callback) => (super.noSuchMethod(
bool removeLogListener(dynamic Function(String)? callback) =>
(super.noSuchMethod(
Invocation.method(
#removeLogListener,
[callback],
Expand Down

0 comments on commit 15cab9d

Please sign in to comment.