diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index d79adc3fc..6230bebe1 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -180,7 +180,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -237,10 +237,12 @@ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", "${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.xcframework/ios-arm64/GoogleMaps.framework/Resources/GoogleMaps.bundle", "${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.xcframework/ios-arm64_x86_64-simulator/GoogleMaps.framework/Resources/GoogleMaps.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/google_maps_flutter_ios/google_maps_flutter_ios_privacy.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleMaps.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/google_maps_flutter_ios_privacy.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -271,7 +273,6 @@ inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", "${BUILT_PRODUCTS_DIR}/BoringSSL-GRPC/openssl_grpc.framework", - "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", "${BUILT_PRODUCTS_DIR}/FirebaseABTesting/FirebaseABTesting.framework", "${BUILT_PRODUCTS_DIR}/FirebaseAppCheckInterop/FirebaseAppCheckInterop.framework", "${BUILT_PRODUCTS_DIR}/FirebaseAuthInterop/FirebaseAuthInterop.framework", @@ -280,9 +281,11 @@ "${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework", "${BUILT_PRODUCTS_DIR}/FirebaseDynamicLinks/FirebaseDynamicLinks.framework", "${BUILT_PRODUCTS_DIR}/FirebaseFirestore/FirebaseFirestore.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseFirestoreInternal/FirebaseFirestoreInternal.framework", "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", "${BUILT_PRODUCTS_DIR}/FirebaseRemoteConfig/FirebaseRemoteConfig.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseSharedSwift/FirebaseSharedSwift.framework", "${BUILT_PRODUCTS_DIR}/FirebaseStorage/FirebaseStorage.framework", "${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework", "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", @@ -315,7 +318,6 @@ name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl_grpc.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseABTesting.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseAppCheckInterop.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseAuthInterop.framework", @@ -324,9 +326,11 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseDynamicLinks.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseFirestore.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseFirestoreInternal.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseRemoteConfig.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseSharedSwift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseStorage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework", diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a33..a6b826db2 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ > getKeyAccounts(String publicKey) { - // print('[http] getKeyAccounts'); + Future> getKeyAccounts(String publicKey) { + print('[http] getKeyAccounts'); - // final url = Uri.parse('$baseURL/v1/history/get_key_accounts'); - // final body = '{ "public_key": "$publicKey" }'; - - // return http - // .post(url, headers: headers, body: body) - // .then((http.Response response) => mapHttpResponse(response, (dynamic body) { - // print('result: $body'); - - // final result = List.from(body['account_names']); - - // result.sort(); - - // return result; - // })) - // .catchError((dynamic error) => mapHttpError(error)); - // } - - Future> getAccountsByKey(String publicKey) { - print('[http] getAccountsByKey'); - - final url = Uri.parse('$baseURL/v1/chain/get_accounts_by_authorizers'); - final body = '{ "accounts": [], "keys": []"$publicKey"] }'; + final url = Uri.parse('$baseURL/v1/history/get_key_accounts'); + final body = '{ "public_key": "$publicKey" }'; return http .post(url, headers: headers, body: body) .then((http.Response response) => mapHttpResponse(response, (dynamic body) { print('result: $body'); - final result = - List.from(body['accounts']).map((e) => e['account_name']).toList().toSet().toList(); + final result = List.from(body['account_names']); result.sort(); @@ -43,4 +22,25 @@ class KeyAccountsRepository extends HttpRepository { })) .catchError((dynamic error) => mapHttpError(error)); } + + // Future> getAccountsByKey(String publicKey) { + // print('[http] getAccountsByKey'); + + // final url = Uri.parse('$baseURL/v1/chain/get_accounts_by_authorizers'); + // final body = '{ "accounts": [], "keys": []"$publicKey"] }'; + + // return http + // .post(url, headers: headers, body: body) + // .then((http.Response response) => mapHttpResponse(response, (dynamic body) { + // print('result: $body'); + + // final result = + // List.from(body['accounts']).map((e) => e['account_name']).toList().toSet().toList(); + + // result.sort(); + + // return result; + // })) + // .catchError((dynamic error) => mapHttpError(error)); + // } } diff --git a/lib/screens/authentication/import_key/interactor/usecases/import_key_use_case.dart b/lib/screens/authentication/import_key/interactor/usecases/import_key_use_case.dart index 8c0432c20..e54625a70 100644 --- a/lib/screens/authentication/import_key/interactor/usecases/import_key_use_case.dart +++ b/lib/screens/authentication/import_key/interactor/usecases/import_key_use_case.dart @@ -7,7 +7,7 @@ class ImportKeyUseCase { final ProfileRepository _profileRepository = ProfileRepository(); Future> run(String publicKey) async { - final accountsResponse = await _keyAccountsRepository.getAccountsByKey(publicKey); + final accountsResponse = await _keyAccountsRepository.getKeyAccounts(publicKey); if (accountsResponse.isError) { final List items = [accountsResponse]; return items; diff --git a/lib/screens/profile_screens/profile/components/switch_account_bottom_sheet/interactor/usecases/import_accounts_use_case.dart b/lib/screens/profile_screens/profile/components/switch_account_bottom_sheet/interactor/usecases/import_accounts_use_case.dart index 68541301c..37a7cc23c 100644 --- a/lib/screens/profile_screens/profile/components/switch_account_bottom_sheet/interactor/usecases/import_accounts_use_case.dart +++ b/lib/screens/profile_screens/profile/components/switch_account_bottom_sheet/interactor/usecases/import_accounts_use_case.dart @@ -10,7 +10,7 @@ class ImportAccountsUseCase { Future> run(List publicKeys) async { final List> getKeyAccountsFutures = - publicKeys.map((i) => _keyAccountsRepository.getAccountsByKey(i)).toList(); + publicKeys.map((i) => _keyAccountsRepository.getKeyAccounts(i)).toList(); final List keyAccountsResponse = await Future.wait(getKeyAccountsFutures); if (keyAccountsResponse.singleWhereOrNull((i) => i.isError) != null) {