Skip to content

Commit

Permalink
fix: remove unused code (#2054)
Browse files Browse the repository at this point in the history
* remove bitmark-sdk in libauk-kotlin

* Remove didKey JWT

* Remove playlist suffle

* remove unused model

* Update Mock Test

* Remove list identities in artwork details

* unused class

Signed-off-by: phuoc <[email protected]>

* Remove exhibitions page and global reveive page

* Update

* remove unused view

* Remove unused code

---------

Signed-off-by: phuoc <[email protected]>
Co-authored-by: phuoc <[email protected]>
  • Loading branch information
ppupha and phuocbitmark authored Sep 6, 2024
1 parent 0698060 commit f077452
Show file tree
Hide file tree
Showing 75 changed files with 589 additions and 3,124 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ dependencies {
implementation 'com.google.android.gms:play-services-auth-blockstore:16.2.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation('com.github.bitmark-inc:libauk-kotlin:0.6.3') {
implementation('com.github.bitmark-inc:libauk-kotlin:317c1e9c4d') {
exclude group: 'com.google.protobuf'
exclude module: 'jetified-protobuf-java'
}
Expand Down
7 changes: 0 additions & 7 deletions lib/common/environment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ class Environment {

static String get autonomyAuthURL => dotenv.env['AUTONOMY_AUTH_URL'] ?? '';

static String get feedURL => dotenv.env['FEED_URL'] ?? '';

static String get customerSupportURL =>
dotenv.env['CUSTOMER_SUPPORT_URL'] ?? '';

Expand Down Expand Up @@ -189,8 +187,3 @@ class Environment {

static String get tvKey => cachedSecretEnv['TV_API_KEY'] ?? '';
}

class Secret {
static String get ffAuthorizationPrefix =>
dotenv.env['FERAL_FILE_AUTHORIZATION_PREFIX'] ?? '';
}
2 changes: 0 additions & 2 deletions lib/common/injector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import 'package:autonomy_flutter/screen/chat/chat_bloc.dart';
import 'package:autonomy_flutter/screen/collection_pro/collection_pro_bloc.dart';
import 'package:autonomy_flutter/screen/dailies_work/dailies_work_bloc.dart';
import 'package:autonomy_flutter/screen/detail/preview/canvas_device_bloc.dart';
import 'package:autonomy_flutter/screen/exhibitions/exhibitions_bloc.dart';
import 'package:autonomy_flutter/screen/interactive_postcard/claim_empty_postcard/claim_empty_postcard_bloc.dart';
import 'package:autonomy_flutter/screen/playlists/add_new_playlist/add_new_playlist_bloc.dart';
import 'package:autonomy_flutter/screen/playlists/edit_playlist/edit_playlist_bloc.dart';
Expand Down Expand Up @@ -408,7 +407,6 @@ Future<void> setup() async {
));
injector.registerLazySingleton<CanvasDeviceBloc>(
() => CanvasDeviceBloc(injector()));
injector.registerFactory<ExhibitionBloc>(() => ExhibitionBloc(injector()));
injector.registerLazySingleton<SubscriptionBloc>(
() => SubscriptionBloc(injector()));
injector.registerLazySingleton<DailyWorkBloc>(
Expand Down
3 changes: 0 additions & 3 deletions lib/gateway/branch_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,4 @@ abstract class BranchApi {
@Query("branch_key") String? key,
@Query("url") String? url,
);

@POST("/v1/url")
Future<dynamic> getUrl(@Body() Map<String, dynamic> body);
}
31 changes: 1 addition & 30 deletions lib/gateway/branch_api.g.dart

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

10 changes: 0 additions & 10 deletions lib/gateway/iap_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ part 'iap_api.g.dart';

@RestApi(baseUrl: '')
abstract class IAPApi {
static const authenticationPath = '/apis/v1/auth';
static const addressAuthenticationPath = '/apis/v2/addresses/auth';
static const registerPrimaryAddressPath = '/apis/v2/addresses/primary';

factory IAPApi(Dio dio, {String baseUrl}) = _IAPApi;

@POST(authenticationPath)
Future<JWT> auth(@Body() Map<String, dynamic> body);

@POST(addressAuthenticationPath)
Future<JWT> authAddress(@Body() Map<String, dynamic> body);

Expand All @@ -43,12 +39,6 @@ abstract class IAPApi {
@Part(name: 'data') File data,
);

@GET('/apis/v1/premium/profile-data/versions')
Future<BackupVersions> getProfileVersions(
@Header('requester') String requester,
@Query('filename') String filename,
);

@GET('/apis/v1/premium/profile-data')
Future<dynamic> getProfileData(
@Header('requester') String requester,
Expand Down
59 changes: 0 additions & 59 deletions lib/gateway/iap_api.g.dart

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

18 changes: 3 additions & 15 deletions lib/gateway/pubdoc_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import 'dart:convert';

import 'package:autonomy_flutter/model/play_list_model.dart';
import 'package:autonomy_flutter/model/suggested_artist.dart';
import 'package:autonomy_flutter/model/version_info.dart';
import 'package:dio/dio.dart';
import 'package:retrofit/retrofit.dart';
Expand All @@ -33,9 +32,6 @@ abstract class PubdocAPI {

@GET('/configs/postcard/postcard_configs.json')
Future<String> getConfigs();

@GET('/configs/user_test.json')
Future<String> getUserTestConfigs();
}

extension PubdocAPIHelpers on PubdocAPI {
Expand All @@ -46,17 +42,9 @@ extension PubdocAPIHelpers on PubdocAPI {

Future<List<PlayListModel>> getDemoAccountFromGithub() async {
final value = await getDemoAccount();
final list = (jsonDecode(value) as List?)?.map((element) {
return PlayListModel.fromJson(element);
}).toList();
return list ?? [];
}

Future<List<SuggestedArtist>> getSuggestedArtistsFromGithub() async {
final value = await getSuggestedArtists();
final list = (jsonDecode(value) as List<dynamic>?)?.map((element) {
return SuggestedArtist.fromJson(element);
}).toList();
final list = (jsonDecode(value) as List?)
?.map((element) => PlayListModel.fromJson(element))
.toList();
return list ?? [];
}
}
26 changes: 0 additions & 26 deletions lib/gateway/pubdoc_api.g.dart

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

11 changes: 0 additions & 11 deletions lib/gateway/tzkt_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@ part 'tzkt_api.g.dart';
abstract class TZKTApi {
factory TZKTApi(Dio dio, {String baseUrl}) = _TZKTApi;

@GET("/v1/accounts/{address}/operations")
Future<List<TZKTOperation>> getOperations(
@Path("address") String address, {
@Query("type") String type = "transaction",
@Query("quote") String quote = "usd",
@Query("sort") int sort = 1,
@Query("limit") int limit = 100,
@Query("lastId") int? lastId,
@Query("initiator.ne") String? initiator,
});

@GET("/v1/tokens/transfers")
Future<List<TZKTTokenTransfer>> getTokenTransfer({
@Query("anyof.from.to") String? anyOf,
Expand Down
45 changes: 0 additions & 45 deletions lib/gateway/tzkt_api.g.dart

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

5 changes: 2 additions & 3 deletions lib/model/additional_data/view_new_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ class ViewNewMessage extends AdditionalData {
return;
}
final GlobalKey<ClaimedPostcardDetailPageState> key = GlobalKey();
final postcardDetailPayload = PostcardDetailPagePayload(
[ArtworkIdentity(groupId, owner)], 0,
key: key);
final postcardDetailPayload =
PostcardDetailPagePayload(ArtworkIdentity(groupId, owner), key: key);
if (!context.mounted) {
return;
}
Expand Down
3 changes: 1 addition & 2 deletions lib/model/additional_data/view_postcard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class ViewPostcard extends AdditionalData {
}
final owner = tokens.first.owner;
final postcardDetailPayload = PostcardDetailPagePayload(
[ArtworkIdentity(indexID, owner)],
0,
ArtworkIdentity(indexID, owner),
useIndexer: true,
);
if (!context.mounted) {
Expand Down
13 changes: 0 additions & 13 deletions lib/model/airdrop_data.dart

This file was deleted.

Loading

0 comments on commit f077452

Please sign in to comment.