From 3161036f45ae97d801c2d0ce1eb1f5323dba1561 Mon Sep 17 00:00:00 2001 From: gabaldon Date: Thu, 29 Feb 2024 12:32:11 +0100 Subject: [PATCH] feat: use myWitWallet adapters for db --- lib/bloc/crypto/crypto_bloc.dart | 2 +- lib/bloc/explorer/api_explorer.dart | 2 +- lib/bloc/explorer/explorer_bloc.dart | 2 +- .../vtt_create/vtt_create_bloc.dart | 2 +- .../dashboard/view/transactions_view.dart | 2 +- lib/shared/api_database.dart | 2 +- lib/util/storage/database/account.dart | 2 +- .../{ => adapters}/transaction_adapter.dart | 181 ++++++++++++++++++ .../storage/database/database_isolate.dart | 13 +- .../storage/database/database_service.dart | 2 +- .../database/get_account_mints_map.dart | 2 +- .../database/transaction_repository.dart | 6 +- lib/util/storage/database/wallet.dart | 2 +- lib/util/storage/database/wallet_storage.dart | 2 +- lib/widgets/speed_up_tx.dart | 2 +- lib/widgets/speedup_btn.dart | 2 +- lib/widgets/transaction_details.dart | 2 +- lib/widgets/transaction_item.dart | 2 +- lib/widgets/transactions_list.dart | 2 +- .../vtt_builder/03_review_step.dart | 2 +- node_modules/.yarn-integrity | 12 -- pubspec.yaml | 3 +- yarn.lock | 4 - 23 files changed, 210 insertions(+), 43 deletions(-) rename lib/util/storage/database/{ => adapters}/transaction_adapter.dart (53%) delete mode 100644 node_modules/.yarn-integrity delete mode 100644 yarn.lock diff --git a/lib/bloc/crypto/crypto_bloc.dart b/lib/bloc/crypto/crypto_bloc.dart index 175f6c53..5fbcbc05 100644 --- a/lib/bloc/crypto/crypto_bloc.dart +++ b/lib/bloc/crypto/crypto_bloc.dart @@ -6,7 +6,7 @@ import 'package:bloc/bloc.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:my_wit_wallet/util/storage/cache/implementations/vtt_get_through_block_explorer.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:witnet/data_structures.dart'; import 'package:witnet/constants.dart'; import 'package:witnet/crypto.dart'; diff --git a/lib/bloc/explorer/api_explorer.dart b/lib/bloc/explorer/api_explorer.dart index 5bfd183f..77d1b46b 100644 --- a/lib/bloc/explorer/api_explorer.dart +++ b/lib/bloc/explorer/api_explorer.dart @@ -1,4 +1,4 @@ -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:witnet/data_structures.dart'; import 'package:witnet/explorer.dart'; import 'package:witnet/schema.dart'; diff --git a/lib/bloc/explorer/explorer_bloc.dart b/lib/bloc/explorer/explorer_bloc.dart index fbc860de..d2082aa2 100644 --- a/lib/bloc/explorer/explorer_bloc.dart +++ b/lib/bloc/explorer/explorer_bloc.dart @@ -7,7 +7,7 @@ import 'package:my_wit_wallet/shared/api_database.dart'; import 'package:my_wit_wallet/shared/locator.dart'; import 'package:my_wit_wallet/util/storage/database/account.dart'; import 'package:my_wit_wallet/util/storage/database/stats.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:my_wit_wallet/util/storage/database/wallet_storage.dart'; import 'package:witnet/data_structures.dart'; diff --git a/lib/bloc/transactions/value_transfer/vtt_create/vtt_create_bloc.dart b/lib/bloc/transactions/value_transfer/vtt_create/vtt_create_bloc.dart index 9f3ed6f4..20e69dcf 100644 --- a/lib/bloc/transactions/value_transfer/vtt_create/vtt_create_bloc.dart +++ b/lib/bloc/transactions/value_transfer/vtt_create/vtt_create_bloc.dart @@ -6,7 +6,7 @@ import 'package:my_wit_wallet/constants.dart'; import 'package:my_wit_wallet/util/allow_biometrics.dart'; import 'package:my_wit_wallet/util/filter_utxos.dart'; import 'package:my_wit_wallet/util/get_utxos_match_inputs.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:witnet/constants.dart'; import 'package:witnet/data_structures.dart'; import 'package:witnet/explorer.dart'; diff --git a/lib/screens/dashboard/view/transactions_view.dart b/lib/screens/dashboard/view/transactions_view.dart index c1059111..c18b679e 100644 --- a/lib/screens/dashboard/view/transactions_view.dart +++ b/lib/screens/dashboard/view/transactions_view.dart @@ -5,7 +5,7 @@ import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:my_wit_wallet/bloc/explorer/explorer_bloc.dart'; import 'package:my_wit_wallet/screens/dashboard/view/dashboard_screen.dart'; import 'package:my_wit_wallet/theme/extended_theme.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:my_wit_wallet/widgets/transactions_list.dart'; import 'package:number_paginator/number_paginator.dart'; diff --git a/lib/shared/api_database.dart b/lib/shared/api_database.dart index 03f74817..a4016db0 100644 --- a/lib/shared/api_database.dart +++ b/lib/shared/api_database.dart @@ -11,7 +11,7 @@ import 'package:my_wit_wallet/util/storage/path_provider_interface.dart'; import 'package:my_wit_wallet/util/storage/database/account.dart'; import 'package:my_wit_wallet/util/storage/database/wallet_storage.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'locator.dart'; class DatabaseException { diff --git a/lib/util/storage/database/account.dart b/lib/util/storage/database/account.dart index be675bd1..8d838569 100644 --- a/lib/util/storage/database/account.dart +++ b/lib/util/storage/database/account.dart @@ -2,7 +2,7 @@ import 'dart:core'; import 'package:my_wit_wallet/shared/api_database.dart'; import 'package:my_wit_wallet/shared/locator.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:my_wit_wallet/util/utxo_list_to_string.dart'; import 'package:quiver/core.dart'; diff --git a/lib/util/storage/database/transaction_adapter.dart b/lib/util/storage/database/adapters/transaction_adapter.dart similarity index 53% rename from lib/util/storage/database/transaction_adapter.dart rename to lib/util/storage/database/adapters/transaction_adapter.dart index 35df7ee0..a50094e1 100644 --- a/lib/util/storage/database/transaction_adapter.dart +++ b/lib/util/storage/database/adapters/transaction_adapter.dart @@ -242,3 +242,184 @@ class MintEntry { reverted: blockDetails.reverted, ); } + +extension InputUtxoAdapter on InputUtxo { + static InputUtxo fromDBJson(Map json) => InputUtxo( + address: json["pkh"], + inputUtxo: json["output_pointer"], + value: json["value"]); + + static InputUtxo fromJson(Map json) { + bool dbJson = json["pkh"] != null; + if (dbJson) { + return fromDBJson(json); + } else { + return InputUtxo.fromJson(json); + } + } +} + +// TODO: it is not used, delete if not necessary +extension AddressBlocksAdapter on AddressBlocks { + static AddressBlocks fromDBJson(List data) { + return AddressBlocks( + address: data[0]['address'], + blocks: List.from( + data.map((blockInfo) => BlockInfo.fromJson(blockInfo))), + ); + } + + static AddressBlocks fromJson(List data) { + bool dbJson = data[0]['miner'] == null; + if (dbJson) { + return fromDBJson(data); + } else { + return AddressBlocks.fromJson(data); + } + } +} + +extension ValueTransferAdapter on ValueTransferInfo { + static ValueTransferInfo fromJson(Map data) { + bool dbJson = data["epoch"] == null; + if (dbJson) { + print('------FROM DB JSON--------'); + return fromDBJson(data); + } else { + print('------FROM EXPLORER JSON------'); + return ValueTransferInfo.fromJson(data); + } + } + + static ValueTransferInfo fromDBJson(Map data) { + List outputAddresses = getOrDefault(data).outputAddresses; + List outputValues = getOrDefault(data).outputValues; + List outputs = []; + if (data['outputs'] != null) { + data['outputs'].forEach((element) { + Address address = Address.fromAddress(element['pkh']); + + outputs.add(ValueTransferOutput( + pkh: address.publicKeyHash!, + timeLock: element['time_lock'], + value: element['value'])); + }); + } else { + for (int i = 0; i < outputValues.length; i++) { + ValueTransferOutput vto = ValueTransferOutput( + value: outputValues[i], + pkh: Address.fromAddress(outputAddresses[i]).publicKeyHash!, + timeLock: 0, + ); + outputs.add(vto); + } + } + return ValueTransferInfo( + epoch: data["txn_epoch"], + timestamp: data["txn_time"], + hash: data["txn_hash"], + block: data["block_hash"], + inputUtxos: List.from( + data["inputs"].map((x) => InputUtxoAdapter.fromJson(x))), + fee: data["fee"], + priority: data["priority"], + weight: data["weight"], + status: TransactionStatus.fromJson(data).status, + outputs: outputs, + value: getOrDefault(data).value, + confirmed: getOrDefault(data).confirmed, + reverted: getOrDefault(data).reverted, + inputAddresses: getOrDefault(data).inputAddresses, + inputsMerged: getOrDefault(data).inputsMerged, + outputAddresses: getOrDefault(data).outputAddresses, + outputValues: getOrDefault(data).outputValues, + timelocks: getOrDefault(data).timelocks, + utxos: getOrDefault(data).utxos, + utxosMerged: getOrDefault(data).utxosMerged, + trueOutputAddresses: getOrDefault(data).trueOutputAddresses, + changeOutputAddresses: getOrDefault(data).outputAddresses, + trueValue: getOrDefault(data).trueValue, + changeValue: getOrDefault(data).changeValue); + } +} + +class NullableFields { + final int? value; + final bool confirmed; + final bool reverted; + final List inputAddresses; + final List inputsMerged; + final List outputAddresses; + final List outputValues; + final List timelocks; + final List utxos; + final List utxosMerged; + final List trueOutputAddresses; + final List changeOutputAddresses; + final int? trueValue; + final int? changeValue; + NullableFields( + {required this.changeOutputAddresses, + required this.changeValue, + required this.confirmed, + required this.inputAddresses, + required this.inputsMerged, + required this.outputAddresses, + required this.outputValues, + required this.reverted, + required this.timelocks, + required this.trueOutputAddresses, + required this.trueValue, + required this.utxos, + required this.utxosMerged, + required this.value}); +} + +NullableFields getOrDefault(Map data) { + print('-----get or default-----'); + return NullableFields( + value: data["value"] ?? null, + confirmed: data["confirmed"] ?? + TransactionStatus.fromJson(data).status == TxStatusLabel.confirmed, + reverted: data["reverted"] ?? + TransactionStatus.fromJson(data).status == TxStatusLabel.reverted, + inputAddresses: data["input_addresses"] != null + ? List.from(data["input_addresses"]) + : List.from(data["inputs"].map((input) { + print('inout address:: ${input}'); + return input['pkh']; + }).toList()), + inputsMerged: data["inputs_merged"] != null + ? List.from( + data["inputs_merged"].map((x) => InputMerged.fromJson(x))) + : [], + outputAddresses: data["output_addresses"] != null + ? List.from(data["output_addresses"]) + : List.from( + data["outputs"].map((output) => output['pkh']).toList()), + outputValues: data["output_values"] != null + ? List.from(data["output_values"]) + : List.from( + data["outputs"].map((output) => output['value']).toList()), + timelocks: data["timelocks"] != null + ? List.from(data["timelocks"]) + : List.from( + data["outputs"].map((output) => output['time_lock']).toList()), + utxos: data["utxos"] != null + ? List.from(data["utxos"] + .map((e) => TransactionUtxo.fromJson(Map.from(e)))) + : [], + utxosMerged: data["utxos_merged"] != null + ? List.from(data["utxos_merged"] + .map((e) => TransactionUtxo.fromJson(Map.from(e)))) + : [], + trueOutputAddresses: data["true_output_addresses"] != null + ? List.from(data["true_output_addresses"]) + : [], + changeOutputAddresses: data["change_output_addresses"] != null + ? List.from(data["change_output_addresses"]) + : [], + trueValue: data["true_value"], + changeValue: data["change_value"], + ); +} diff --git a/lib/util/storage/database/database_isolate.dart b/lib/util/storage/database/database_isolate.dart index 8239f4f3..e163fcaa 100644 --- a/lib/util/storage/database/database_isolate.dart +++ b/lib/util/storage/database/database_isolate.dart @@ -3,7 +3,7 @@ import 'dart:convert'; import 'dart:isolate'; import 'package:my_wit_wallet/util/storage/database/stats.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:witnet/explorer.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; @@ -145,7 +145,8 @@ Future _addRecord( value = await dbService.add(Wallet.fromJson(params['value'])); break; case 'vtt': - value = await dbService.add(ValueTransferInfo.fromJson(params['value'])); + value = + await dbService.add(ValueTransferAdapter.fromJson(params['value'])); break; case 'account': value = await dbService.add(Account.fromJson(params['value'])); @@ -174,8 +175,8 @@ Future _deleteRecord( value = await dbService.delete(Wallet.fromJson(params['value'])); break; case 'vtt': - value = - await dbService.delete(ValueTransferInfo.fromJson(params['value'])); + value = await dbService + .delete(ValueTransferAdapter.fromJson(params['value'])); break; case 'account': value = await dbService.delete(Account.fromJson(params['value'])); @@ -210,8 +211,8 @@ Future _updateRecord( value = await dbService.update(MintEntry.fromJson(params['value'])); break; case 'vtt': - value = - await dbService.update(ValueTransferInfo.fromJson(params['value'])); + value = await dbService + .update(ValueTransferAdapter.fromJson(params['value'])); break; case 'account': value = await dbService.update(Account.fromJson(params['value'])); diff --git a/lib/util/storage/database/database_service.dart b/lib/util/storage/database/database_service.dart index 2711b771..f9f800d3 100644 --- a/lib/util/storage/database/database_service.dart +++ b/lib/util/storage/database/database_service.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:my_wit_wallet/util/storage/database/get_account_mints_map.dart'; import 'package:my_wit_wallet/util/storage/database/get_account_vtts_map.dart'; import 'package:my_wit_wallet/util/storage/database/stats.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:sembast/sembast_io.dart'; import 'package:sembast/sembast.dart'; import 'package:witnet/explorer.dart'; diff --git a/lib/util/storage/database/get_account_mints_map.dart b/lib/util/storage/database/get_account_mints_map.dart index b72c5067..91ab2594 100644 --- a/lib/util/storage/database/get_account_mints_map.dart +++ b/lib/util/storage/database/get_account_mints_map.dart @@ -1,4 +1,4 @@ -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:witnet/schema.dart'; Map> getAccountMintsMap(List vttList) { diff --git a/lib/util/storage/database/transaction_repository.dart b/lib/util/storage/database/transaction_repository.dart index 77093041..c79864ff 100644 --- a/lib/util/storage/database/transaction_repository.dart +++ b/lib/util/storage/database/transaction_repository.dart @@ -1,4 +1,4 @@ -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:sembast/sembast.dart'; import 'package:witnet/explorer.dart'; import 'package:witnet/schema.dart'; @@ -42,7 +42,7 @@ class VttRepository extends _TransactionRepository { final snapshots = await _store.find(databaseClient); try { List transactions = snapshots - .map((snapshot) => ValueTransferInfo.fromJson( + .map((snapshot) => ValueTransferAdapter.fromJson( snapshot.value as Map)) .toList(growable: false); return transactions; @@ -88,7 +88,7 @@ class VttRepository extends _TransactionRepository { await _store.record(txHash).get(databaseClient); ValueTransferInfo valueTransferInfo = - ValueTransferInfo.fromJson(valueTransferInfoDbJson); + ValueTransferAdapter.fromJson(valueTransferInfoDbJson); return valueTransferInfo; } catch (e) { diff --git a/lib/util/storage/database/wallet.dart b/lib/util/storage/database/wallet.dart index 0e98a6b2..4090af5f 100644 --- a/lib/util/storage/database/wallet.dart +++ b/lib/util/storage/database/wallet.dart @@ -7,7 +7,7 @@ import 'package:my_wit_wallet/screens/dashboard/view/dashboard_screen.dart'; import 'package:my_wit_wallet/shared/api_database.dart'; import 'package:my_wit_wallet/shared/locator.dart'; import 'package:my_wit_wallet/util/storage/database/stats.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/util/storage/database/wallet_storage.dart'; import 'package:witnet/constants.dart'; import 'package:witnet/crypto.dart'; diff --git a/lib/util/storage/database/wallet_storage.dart b/lib/util/storage/database/wallet_storage.dart index 34537cf6..1cbb0b78 100644 --- a/lib/util/storage/database/wallet_storage.dart +++ b/lib/util/storage/database/wallet_storage.dart @@ -1,5 +1,5 @@ import 'package:my_wit_wallet/util/storage/database/stats.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:witnet/explorer.dart'; diff --git a/lib/widgets/speed_up_tx.dart b/lib/widgets/speed_up_tx.dart index c2f46ab0..9e83988d 100644 --- a/lib/widgets/speed_up_tx.dart +++ b/lib/widgets/speed_up_tx.dart @@ -5,7 +5,7 @@ import 'package:my_wit_wallet/screens/dashboard/view/dashboard_screen.dart'; import 'package:my_wit_wallet/shared/api_database.dart'; import 'package:my_wit_wallet/shared/locator.dart'; import 'package:my_wit_wallet/util/get_localization.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/widgets/PaddedButton.dart'; import 'package:my_wit_wallet/widgets/closable_view.dart'; import 'package:my_wit_wallet/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/02_select_miner_fee.dart'; diff --git a/lib/widgets/speedup_btn.dart b/lib/widgets/speedup_btn.dart index a64d5c52..204ca65b 100644 --- a/lib/widgets/speedup_btn.dart +++ b/lib/widgets/speedup_btn.dart @@ -2,7 +2,7 @@ import 'package:my_wit_wallet/shared/api_database.dart'; import 'package:my_wit_wallet/shared/locator.dart'; import 'package:flutter/material.dart'; import 'package:my_wit_wallet/util/get_localization.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:my_wit_wallet/widgets/PaddedButton.dart'; diff --git a/lib/widgets/transaction_details.dart b/lib/widgets/transaction_details.dart index 8e7cbf33..4649daf2 100644 --- a/lib/widgets/transaction_details.dart +++ b/lib/widgets/transaction_details.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:my_wit_wallet/util/storage/database/account.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:my_wit_wallet/util/transactions_list/get_transaction_label.dart'; import 'package:my_wit_wallet/widgets/closable_view.dart'; diff --git a/lib/widgets/transaction_item.dart b/lib/widgets/transaction_item.dart index a89cc1af..9de1baa0 100644 --- a/lib/widgets/transaction_item.dart +++ b/lib/widgets/transaction_item.dart @@ -7,7 +7,7 @@ import 'package:my_wit_wallet/util/extensions/string_extensions.dart'; import 'package:my_wit_wallet/util/extensions/num_extensions.dart'; import 'package:flutter/material.dart'; import 'package:my_wit_wallet/util/storage/database/account.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:my_wit_wallet/util/transactions_list/get_transaction_address.dart'; import 'package:my_wit_wallet/util/transactions_list/get_transaction_label.dart'; diff --git a/lib/widgets/transactions_list.dart b/lib/widgets/transactions_list.dart index 6e38ce23..c343adf3 100644 --- a/lib/widgets/transactions_list.dart +++ b/lib/widgets/transactions_list.dart @@ -5,7 +5,7 @@ import 'package:my_wit_wallet/screens/dashboard/view/dashboard_screen.dart'; import 'package:my_wit_wallet/shared/api_database.dart'; import 'package:my_wit_wallet/shared/locator.dart'; import 'package:my_wit_wallet/util/get_localization.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/util/storage/database/wallet.dart'; import 'package:my_wit_wallet/widgets/speed_up_tx.dart'; import 'package:my_wit_wallet/widgets/transaction_details.dart'; diff --git a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/03_review_step.dart b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/03_review_step.dart index a3c363ac..90370d8c 100644 --- a/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/03_review_step.dart +++ b/lib/widgets/witnet/transactions/value_transfer/create_dialog_box/vtt_builder/03_review_step.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:my_wit_wallet/util/allow_biometrics.dart'; -import 'package:my_wit_wallet/util/storage/database/transaction_adapter.dart'; +import 'package:my_wit_wallet/util/storage/database/adapters/transaction_adapter.dart'; import 'package:my_wit_wallet/widgets/witnet/transactions/value_transfer/modals/general_error_tx_modal.dart'; import 'package:my_wit_wallet/widgets/witnet/transactions/value_transfer/modals/sending_tx_modal.dart'; import 'package:my_wit_wallet/widgets/witnet/transactions/value_transfer/modals/signing_tx_modal.dart'; diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity deleted file mode 100644 index a1d97f72..00000000 --- a/node_modules/.yarn-integrity +++ /dev/null @@ -1,12 +0,0 @@ -{ - "systemParams": "darwin-x64-120", - "modulesFolders": [ - "node_modules" - ], - "flags": [], - "linkedModules": [], - "topLevelPatterns": [], - "lockfileEntries": {}, - "files": [], - "artifacts": {} -} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 4388071d..d014c3e4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -43,7 +43,8 @@ dependencies: flutter_launcher_icons: ^0.13.1 sliding_up_panel: ^2.0.0+1 decimal: 2.3.3 - witnet: 0.4.0 + witnet: + path: ../witnet.dart path_provider: ^2.0.8 permission_handler: ^11.0.1 open_file: ^3.3.2 diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index fb57ccd1..00000000 --- a/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - -