Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Amean committed Nov 10, 2022
2 parents 9b8e434 + 25c93c5 commit dfbcf02
Show file tree
Hide file tree
Showing 35 changed files with 1,978 additions and 1,038 deletions.
2 changes: 1 addition & 1 deletion big-dipper-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"chai": "^4.3.4",
"chai": "^4.3.7",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.1",
"eslint-import-resolver-meteor": "^0.4.0",
Expand Down
14 changes: 7 additions & 7 deletions big-dipper-backend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1125,13 +1125,13 @@ catharsis@^0.9.0:
dependencies:
lodash "^4.17.15"

chai@^4.3.4:
version "4.3.6"
resolved "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz"
chai@^4.3.7:
version "4.3.7"
resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51"
dependencies:
assertion-error "^1.1.0"
check-error "^1.0.2"
deep-eql "^3.0.1"
deep-eql "^4.1.2"
get-func-name "^2.0.0"
loupe "^2.3.1"
pathval "^1.1.1"
Expand Down Expand Up @@ -1912,9 +1912,9 @@ decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz"

deep-eql@^3.0.1:
version "3.0.1"
resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz"
deep-eql@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.2.tgz#270ceb902f87724077e6f6449aed81463f42fc1c"
dependencies:
type-detect "^4.0.0"

Expand Down
4 changes: 3 additions & 1 deletion wallet/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"wallet_retrieving_err_msg": "Wir hatten Probleme beim Abrufen von Wallets aus einem sicheren Speicher.",
"home": "Heim",
"discover": "Entdecken",
"network_error_description": "Bei der Verarbeitung Ihrer Transaktion ist ein Netzwerkfehler aufgetreten. Bitte versuchen Sie erneut, Ihr Konto zu aktualisieren. Für einen erneuten Versuch werden Ihnen keine doppelten Kosten in Rechnung gestellt.",
"market_place": "Marktplatz",
"gallery": "Galerie",
"my_activity": "Meine Aktivität",
Expand Down Expand Up @@ -358,8 +359,9 @@
"transaction_date": "Transaktionsdatum",
"retry": "Wiederholen",
"bought_nft": "Gekauft",
"resolution": "Auflösung",
"set_lockscreen": "Instellen als vergrendelscherm",
"maintenance_mode_message": "We ondervinden technische problemen en hebben tijdelijk de onderhoudsmodus gestart voor het oplossen van problemen. Maak je geen zorgen, je collectie is veilig. U kunt echter geen on-chain-transacties starten totdat we het probleem hebben opgelost en de normale functionaliteit hebben hersteld.",
"maintenance_mode_header": "onderhoudsstand"

}
}
1 change: 1 addition & 0 deletions wallet/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@
"transaction_date": "Transaction Date",
"bought_nft": "Bought",
"free": "Free",
"resolution": "Resolution",
"please_try_again_later": "Please try again later",
"checkout": "Checkout",
"artist": "Artist",
Expand Down
2 changes: 2 additions & 0 deletions wallet/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"gallery": "Galería",
"my_activity": "Mi actividad",
"recommended": "Recomendada",
"network_error_description": "Ocurrió un error de red al procesar su transacción. Vuelva a intentar actualizar su cuenta. No se le cobrará dos veces por volver a intentarlo.",
"following": "Siguiendo",
"select_a_date": "Seleccione una fecha",
"what_is_new": "Qué hay de nuevo",
Expand Down Expand Up @@ -357,6 +358,7 @@
"buying_pylon_points": "Puntos Pylons Comprados",
"transaction_date": "Fecha de Transacción",
"retry": "Rever",
"resolution": "resolución",
"bought_nft": "Comprado",
"set_lockscreen": "Establecer como pantalla de bloqueo",
"maintenance_mode_message": "Estamos experimentando problemas técnicos y hemos iniciado temporalmente el modo de mantenimiento para solucionar problemas. No te preocupes, tu colección está segura. Sin embargo, no puede iniciar transacciones en cadena hasta que hayamos resuelto el problema y restablecido la funcionalidad normal.",
Expand Down
2 changes: 2 additions & 0 deletions wallet/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"market_place": "pasar",
"gallery": "Galeri",
"my_activity": "Aktivitas Saya",
"network_error_description": "Terjadi kesalahan jaringan saat memproses transaksi Anda. Harap coba lagi untuk memperbarui akun Anda. Anda tidak akan dikenakan biaya dua kali untuk mencoba lagi.",
"recommended": "Direkomendasikan",
"following": "Mengikuti",
"select_a_date": "Pilih tanggal",
Expand Down Expand Up @@ -358,6 +359,7 @@
"transaction_date": "Tanggal Transaksi",
"retry": "Mencoba Kembali",
"bought_nft": "Dibeli",
"resolution": "resolusi",
"set_lockscreen": "Tetapkan sebagai layar kunci",
"maintenance_mode_message": "Kami mengalami masalah teknis dan untuk sementara memulai mode pemeliharaan untuk pemecahan masalah. Jangan khawatir, koleksi Anda aman. Namun, Anda tidak dapat memulai transaksi on-chain sampai kami menyelesaikan masalah dan memulihkan fungsionalitas normal.",
"maintenance_mode_header": "Mode Pemeliharaan"
Expand Down
2 changes: 2 additions & 0 deletions wallet/i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"recommended": "おすすめされた",
"following": "続く",
"select_a_date": "日付を選択",
"network_error_description":"トランザクションの処理中にネットワーク エラーが発生しました。アカウントの更新をもう一度お試しください。再試行しても 2 回請求されることはありません。",
"what_is_new": "新着情報",
"trending": "トレンド",
"price": "価格",
Expand Down Expand Up @@ -357,6 +358,7 @@
"buying_pylon_points": "パイロンポイントを購入",
"transaction_date": "取引日",
"retry": "リトライ",
"resolution": "解像度",
"bought_nft": "買った",
"set_lockscreen": "ロック画面に設定",
"maintenance_mode_message": "技術的な問題が発生しており、トラブルシューティングのために一時的にメンテナンス モードを開始しました。心配はいりません。あなたのコレクションは安全です。ただし、問題が解決され、通常の機能が回復するまで、オンチェーン トランザクションを開始することはできません。",
Expand Down
2 changes: 2 additions & 0 deletions wallet/i18n/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"recommended": "추천",
"following": "수행원",
"select_a_date": "날짜 선택",
"network_error_description": "거래를 처리하는 동안 네트워크 오류가 발생했습니다. 계정 업데이트를 다시 시도하십시오. 재시도에 대해 두 번 청구되지 않습니다.",
"what_is_new": "새로운 소식",
"trending": "트렌드",
"price": "가격",
Expand Down Expand Up @@ -356,6 +357,7 @@
"buying_pylon_points": "파일론 포인트 구매",
"transaction_date": "거래 날짜",
"retry": "다시 해 보다",
"resolution": "해결",
"bought_nft": "구입했다",
"set_lockscreen": "잠금 화면으로 설정",
"maintenance_mode_message": "기술적인 문제가 발생했으며 문제 해결을 위해 일시적으로 유지 관리 모드를 시작했습니다. 걱정하지 마세요. 컬렉션은 안전합니다. 그러나 문제를 해결하고 정상적인 기능을 복원할 때까지 온체인 트랜잭션을 시작할 수 없습니다.",
Expand Down
2 changes: 2 additions & 0 deletions wallet/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"my_activity": "Моя активность",
"recommended": "Рекомендуемый",
"following": "Вы подписаны",
"network_error_description": "При обработке транзакции произошла сетевая ошибка. Пожалуйста, попробуйте еще раз, чтобы обновить свою учетную запись. С вас не будет взиматься плата дважды за повторную попытку.",
"select_a_date": "Выбрать дату",
"what_is_new": "Что нового",
"trending": "Трендинг",
Expand Down Expand Up @@ -358,6 +359,7 @@
"transaction_date": "Дата сделки",
"retry": "Повторить попытку",
"bought_nft": "Купленный",
"resolution": "разрешающая способность",
"set_lockscreen": "Установить как экран блокировки",
"maintenance_mode_message": "У нас возникли технические проблемы, и мы временно запустили режим обслуживания для устранения неполадок. Не волнуйтесь, ваша коллекция в безопасности. Однако вы не можете инициировать транзакции в сети, пока мы не решим проблему и не восстановим нормальную работу.",
"maintenance_mode_header": "Режим технического обслуживания"
Expand Down
2 changes: 2 additions & 0 deletions wallet/i18n/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"recommended": "Khuyến nghị",
"following": "Tiếp theo",
"select_a_date": "Chọn một ngày",
"network_error_description": "Đã xảy ra lỗi mạng khi xử lý giao dịch của bạn. Vui lòng thử lại để cập nhật tài khoản của bạn. Bạn sẽ không bị tính phí hai lần khi thử lại.",
"what_is_new": "Có gì mới",
"trending": "Xu hướng",
"price": "Giá bán",
Expand Down Expand Up @@ -357,6 +358,7 @@
"buying_pylon_points": "Đã mua điểm giá treo",
"transaction_date": "Ngày Giao dịch",
"retry": "Thử lại",
"resolution": "nghị quyết",
"bought_nft": "Đã mua",
"set_lockscreen": "Đặt làm màn hình khóa",
"maintenance_mode_message": "Chúng tôi đang gặp sự cố kỹ thuật và đã tạm thời bắt đầu chế độ bảo trì để khắc phục sự cố. Đừng lo lắng, bộ sưu tập của bạn vẫn an toàn. Tuy nhiên, bạn không thể bắt đầu các giao dịch trên chuỗi cho đến khi chúng tôi giải quyết xong sự cố và khôi phục chức năng bình thường.",
Expand Down
3 changes: 2 additions & 1 deletion wallet/lib/generated/locale_keys.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ abstract class LocaleKeys {
static const recommended = 'recommended';
static const following = 'following';
static const select_a_date = 'select_a_date';
static const network_error_description = 'network_error_description';
static const what_is_new = 'what_is_new';
static const trending = 'trending';
static const price = 'price';
Expand Down Expand Up @@ -359,9 +360,9 @@ abstract class LocaleKeys {
static const buying_pylon_points = 'buying_pylon_points';
static const transaction_date = 'transaction_date';
static const retry = 'retry';
static const resolution = 'resolution';
static const bought_nft = 'bought_nft';
static const set_lockscreen = 'set_lockscreen';
static const network_error_description = 'network_error_description';
static const maintenance_mode_message = 'maintenance_mode_message';
static const maintenance_mode_header = 'maintenance_mode_header';

Expand Down
13 changes: 13 additions & 0 deletions wallet/lib/model/favorites.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import 'package:floor/floor.dart';

@entity
class FavoritesModel {
@primaryKey
final int dateTime;
final String id;
final String cookbookId;
final String type;


FavoritesModel({required this.id, required this.cookbookId, required this.type, required this.dateTime});
}
5 changes: 5 additions & 0 deletions wallet/lib/model/nft.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class NFT extends Equatable {
String duration = "";
String fileSize = "";
String hashtags = "";
String cid = "";
String createdAt = "";
bool realWorld = false;

Expand All @@ -57,6 +58,7 @@ class NFT extends Equatable {
this.itemID = "",
this.cookbookID = "",
this.recipeID = "",
this.cid = "",
this.owner = "",
this.width = "",
this.height = "",
Expand Down Expand Up @@ -98,6 +100,7 @@ class NFT extends Equatable {
description: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kDescription).value,
fileSize: getFileSize(item),
creator: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kCreator, orElse: () => StringKeyValue(key: kCreator, value: "")).value,
cid: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kCID, orElse: () => StringKeyValue(key: kCID, value: "")).value,
appType: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kAppType, orElse: () => StringKeyValue(key: kAppType, value: "")).value,
width: item.longs.firstWhere((longKeyValue) => longKeyValue.key == kWidth, orElse: () => LongKeyValue(key: kWidth, value: Int64())).value.toString(),
height: item.longs.firstWhere((longKeyValue) => longKeyValue.key == kHeight, orElse: () => LongKeyValue(key: kHeight, value: Int64())).value.toString(),
Expand Down Expand Up @@ -131,6 +134,7 @@ class NFT extends Equatable {
description: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kDescription).value,
fileSize: getFileSize(item),
creator: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kCreator, orElse: () => StringKeyValue(key: kCreator, value: "")).value,
cid: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kCID, orElse: () => StringKeyValue(key: kCID, value: "")).value,
appType: item.strings.firstWhere((strKeyValue) => strKeyValue.key == kAppType, orElse: () => StringKeyValue(key: kAppType, value: "")).value,
width: item.longs.firstWhere((longKeyValue) => longKeyValue.key == kWidth, orElse: () => LongKeyValue(key: kWidth, value: Int64())).value.toString(),
height: item.longs.firstWhere((longKeyValue) => longKeyValue.key == kHeight, orElse: () => LongKeyValue(key: kHeight, value: Int64())).value.toString(),
Expand Down Expand Up @@ -161,6 +165,7 @@ class NFT extends Equatable {
thumbnailUrl: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kThumbnailUrl, orElse: () => StringParam()).value.changeDomain() ?? "",
description: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kDescription, orElse: () => StringParam()).value ?? "",
fileSize: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kFileSize, orElse: () => StringParam()).value ?? "",
cid: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kCID, orElse: () => StringParam()).value ?? "",
appType: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kAppType, orElse: () => StringParam()).value ?? "",
creator: recipe.entries.itemOutputs.firstOrNull?.strings.firstWhere((strKeyValue) => strKeyValue.key == kCreator, orElse: () => StringParam()).value ?? "",
width: recipe.entries.itemOutputs.firstOrNull?.longs.firstWhere((longKeyValue) => longKeyValue.key == kWidth, orElse: () => LongParam()).weightRanges.firstOrNull?.upper.toString() ?? "0",
Expand Down
6 changes: 5 additions & 1 deletion wallet/lib/model/transaction_failure_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ class LocalTransactionModel extends Equatable {
required this.status,
});

factory LocalTransactionModel.fromStatus({required String transactionHash ,required TransactionStatus status, required LocalTransactionModel transactionModel}) {
factory LocalTransactionModel.fromStatus({
required String transactionHash,
required TransactionStatus status,
required LocalTransactionModel transactionModel,
}) {
return LocalTransactionModel(
transactionHash: transactionHash,
transactionCurrency: transactionModel.transactionCurrency,
Expand Down
14 changes: 9 additions & 5 deletions wallet/lib/pages/detailed_asset_view/owner_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ class OwnerBottomDrawer extends StatefulWidget {

class _OwnerBottomDrawerState extends State<OwnerBottomDrawer> {
bool liked = false;
bool collapsed = true;
bool isExpanded = false;

Widget getProgressWidget() {
final viewModel = context.read<OwnerViewViewModel>();
Expand Down Expand Up @@ -456,15 +454,19 @@ class _OwnerBottomDrawerState extends State<OwnerBottomDrawer> {
icon: 'trophy',
nft: viewModel.nft,
owner: viewModel.owner,
NftOwnershipHistoryList: const [],
nftOwnershipHistoryList: const [],
isExpanded: viewModel.isOwnershipExpanded,
onChangeTab: viewModel.onChangeTab,
),
SizedBox(height: 10.h),
TabField(
name: LocaleKeys.nft_detail.tr(),
icon: 'detail',
nft: viewModel.nft,
owner: viewModel.owner,
NftOwnershipHistoryList: const [],
nftOwnershipHistoryList: const [],
isExpanded: viewModel.isDetailsExpanded,
onChangeTab: viewModel.onChangeTab,
),
SizedBox(height: 10.h),
if (viewModel.nft.type != NftType.TYPE_RECIPE)
Expand All @@ -473,7 +475,9 @@ class _OwnerBottomDrawerState extends State<OwnerBottomDrawer> {
icon: 'history',
nft: viewModel.nft,
owner: viewModel.nft.owner,
NftOwnershipHistoryList: viewModel.nftOwnershipHistoryList,
nftOwnershipHistoryList: viewModel.nftOwnershipHistoryList,
isExpanded: viewModel.isHistoryExpanded,
onChangeTab: viewModel.onChangeTab,
),
SizedBox(height: 30.h),
],
Expand Down
52 changes: 49 additions & 3 deletions wallet/lib/pages/detailed_asset_view/owner_view_view_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:just_audio/just_audio.dart';
import 'package:pylons_wallet/components/loading.dart';
import 'package:pylons_wallet/model/nft.dart';
import 'package:pylons_wallet/model/nft_ownership_history.dart';
import 'package:pylons_wallet/pages/detailed_asset_view/widgets/tab_fields.dart';
import 'package:pylons_wallet/services/repository/repository.dart';
import 'package:pylons_wallet/services/third_party_services/audio_player_helper.dart';
import 'package:pylons_wallet/services/third_party_services/share_helper.dart';
Expand Down Expand Up @@ -37,6 +38,11 @@ class OwnerViewViewModel extends ChangeNotifier {
required this.accountPublicInfo,
});

TabFields? selectedField;
bool isOwnershipExpanded = false;
bool isHistoryExpanded = false;
bool isDetailsExpanded = false;

String owner = '';

bool _toggled = true;
Expand Down Expand Up @@ -138,6 +144,48 @@ class OwnerViewViewModel extends ChangeNotifier {
toHashtagList();
}

void getWhichTabIsExpanded() {
isDetailsExpanded = false;
isHistoryExpanded = false;
isOwnershipExpanded = false;

switch (selectedField) {
case TabFields.ownership:
isOwnershipExpanded = true;
notifyListeners();
break;
case TabFields.history:
isHistoryExpanded = true;
notifyListeners();
break;
case TabFields.details:
isDetailsExpanded = true;
notifyListeners();
break;
default:
return;
}
}

void closeExpansion() {
isDetailsExpanded = false;
isHistoryExpanded = false;
isOwnershipExpanded = false;
notifyListeners();
}

void onChangeTab(TabFields tab) {
if (tab == selectedField && isExpansionOpen()) {
closeExpansion();
return;
}

selectedField = tab;
getWhichTabIsExpanded();
}

bool isExpansionOpen() => isDetailsExpanded || isHistoryExpanded || isOwnershipExpanded;

Future<void> nftDataInit({required String recipeId, required String cookBookId, required String itemId}) async {
final walletAddress = accountPublicInfo.publicAddress;
if (nft.type != NftType.TYPE_RECIPE) {
Expand Down Expand Up @@ -426,9 +474,7 @@ class OwnerViewViewModel extends ChangeNotifier {
repository.logUserJourney(screenName: AnalyticsScreenEvents.ownerView);
}



ValueNotifier<ProgressBarState> audioProgressNotifier = ValueNotifier<ProgressBarState>(
ValueNotifier<ProgressBarState> audioProgressNotifier = ValueNotifier<ProgressBarState>(
ProgressBarState(
current: Duration.zero,
buffered: Duration.zero,
Expand Down
Loading

0 comments on commit dfbcf02

Please sign in to comment.