From c881794c5b8deee64722117129b639f707adc567 Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Wed, 22 May 2024 19:19:59 +0200 Subject: [PATCH] fix on cbRequest --- lib/services/coinbase_service/coinbase_service.dart | 7 ++----- test/mock_classes.mocks.dart | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/services/coinbase_service/coinbase_service.dart b/lib/services/coinbase_service/coinbase_service.dart index 6b427216..f76f8926 100644 --- a/lib/services/coinbase_service/coinbase_service.dart +++ b/lib/services/coinbase_service/coinbase_service.dart @@ -111,14 +111,11 @@ class CoinbaseService implements ICoinbaseService { @protected @override Future cbRequest({ - String? chainId, + required String chainId, required SessionRequestParams request, }) async { await _checkInstalled(); - String? cid; - if (chainId != null) { - cid = chainId.contains(':') ? chainId.split(':').last : chainId; - } + final cid = chainId.contains(':') ? chainId.split(':').last : chainId; try { final req = Request(actions: [request.toCoinbaseRequest(cid)]); final result = (await CoinbaseWalletSDK.shared.makeRequest(req)).first; diff --git a/test/mock_classes.mocks.dart b/test/mock_classes.mocks.dart index 89588269..9de96b1e 100644 --- a/test/mock_classes.mocks.dart +++ b/test/mock_classes.mocks.dart @@ -939,7 +939,7 @@ class MockW3MService extends _i1.Mock implements _i3.W3MService { ) as _i14.Future); @override _i14.Future cbRequest({ - String? chainId, + required String? chainId, required _i3.SessionRequestParams? request, }) => (super.noSuchMethod(