Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API changes #491

Merged
merged 14 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXPLORER_ADDRESS = 'witnet.network'
EXPLORER_ADDRESS = 'witscan.xyz'
EXPLORER_DEV_ADDRESS = '0.0.0.0'

# [ Integration Test Settings ]
Expand Down
2 changes: 1 addition & 1 deletion integration_test/test_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Future<bool> tapButton(
case String:
finder = widgetByText(value);
break;
case IconDataSolid:
case IconData:
finder = widgetByIcon(value);
break;
case PaddedButton:
Expand Down
12 changes: 12 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,22 @@ target 'Runner' do
end

post_install do |installer|
# fix xcode 15 DT_TOOLCHAIN_DIR - remove after fix oficially - https://github.com/CocoaPods/CocoaPods/issues/12065
installer.aggregate_targets.each do |target|
target.xcconfigs.each do |variant, xcconfig|
xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end

installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
xcconfig_path = config.base_configuration_reference.real_path
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
end
end
32 changes: 16 additions & 16 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- Flutter (1.0.0)
- GoogleDataTransport (9.2.1):
- GoogleDataTransport (9.3.0):
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
Expand All @@ -21,11 +21,11 @@ PODS:
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSString+URLArguments (= 2.3.2)"
- "GoogleToolboxForMac/NSString+URLArguments (2.3.2)"
- GoogleUtilities/Environment (7.11.0):
- GoogleUtilities/Environment (7.12.0):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.11.0):
- GoogleUtilities/Logger (7.12.0):
- GoogleUtilities/Environment
- GoogleUtilities/UserDefaults (7.11.0):
- GoogleUtilities/UserDefaults (7.12.0):
- GoogleUtilities/Logger
- GoogleUtilitiesComponents (1.1.0):
- GoogleUtilities/Logger
Expand Down Expand Up @@ -56,19 +56,19 @@ PODS:
- Flutter
- GoogleMLKit/BarcodeScanning (~> 4.0.0)
- MTBBarcodeScanner (5.0.11)
- nanopb (2.30909.0):
- nanopb/decode (= 2.30909.0)
- nanopb/encode (= 2.30909.0)
- nanopb/decode (2.30909.0)
- nanopb/encode (2.30909.0)
- nanopb (2.30909.1):
- nanopb/decode (= 2.30909.1)
- nanopb/encode (= 2.30909.1)
- nanopb/decode (2.30909.1)
- nanopb/encode (2.30909.1)
- open_file (0.0.1):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.1.1):
- Flutter
- PromisesObjC (2.2.0)
- PromisesObjC (2.3.1)
- qr_code_scanner (0.2.0):
- Flutter
- MTBBarcodeScanner
Expand Down Expand Up @@ -130,10 +130,10 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
GoogleDataTransport: ea169759df570f4e37bdee1623ec32a7e64e67c4
GoogleDataTransport: 57c22343ab29bc686febbf7cbb13bad167c2d8fe
GoogleMLKit: 2bd0dc6253c4d4f227aad460f69215a504b2980e
GoogleToolboxForMac: 8bef7c7c5cf7291c687cf5354f39f9db6399ad34
GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
GoogleUtilitiesComponents: 679b2c881db3b615a2777504623df6122dd20afe
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2
integration_test: 13825b8a9334a850581300559b8839134b124670
Expand All @@ -144,15 +144,15 @@ SPEC CHECKSUMS:
MLKitVision: 8baa5f46ee3352614169b85250574fde38c36f49
mobile_scanner: 202ab6f652e40a9add68b10de4c4fb2a745c4348
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5
open_file: 02eb5cb6b21264bd3a696876f5afbfb7ca4f4b7d
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b

PODFILE CHECKSUM: 3118be2ea3b7322e964cfa22fa42faa4e39f6c5c
PODFILE CHECKSUM: eb775b146a9efb4c1f1c55cba9689f227523a140

COCOAPODS: 1.12.1
COCOAPODS: 1.15.2
88 changes: 44 additions & 44 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
57712459E87A24121377D7A0 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2485BAA89896304F8F81EA7 /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
E462606D4212DDDFB58355AD /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F8AB81A31946B4CA55C093 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -30,15 +30,14 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
07DDDEFB8BEB545C96D28C7B /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
11B13D8074A685345B1CD9C7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
26F8AB81A31946B4CA55C093 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
28BE900C448E3A4E51306AE7 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
57B3355B057BAE30BDDD5E3A /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
67E8A092530DE5EA70E845AD /* Pods-Runner.debug-e2e.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug-e2e.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug-e2e.xcconfig"; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
77A45E63F8E993C45BB74E49 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
Expand All @@ -47,38 +46,39 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
B77918AB0DC0CB4B83C5188B /* Pods-Runner.debug-e2e.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug-e2e.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug-e2e.xcconfig"; sourceTree = "<group>"; };
B2485BAA89896304F8F81EA7 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E7A86D7B2E3942504DC0050C /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E462606D4212DDDFB58355AD /* Pods_Runner.framework in Frameworks */,
57712459E87A24121377D7A0 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
380CAFE863EF9675C83D9D3F /* Pods */ = {
2C29AB87111E84422AF497AA /* Frameworks */ = {
isa = PBXGroup;
children = (
11B13D8074A685345B1CD9C7 /* Pods-Runner.debug.xcconfig */,
07DDDEFB8BEB545C96D28C7B /* Pods-Runner.release.xcconfig */,
57B3355B057BAE30BDDD5E3A /* Pods-Runner.profile.xcconfig */,
B77918AB0DC0CB4B83C5188B /* Pods-Runner.debug-e2e.xcconfig */,
B2485BAA89896304F8F81EA7 /* Pods_Runner.framework */,
);
path = Pods;
name = Frameworks;
sourceTree = "<group>";
};
6729B53F71FC9EF68B1D676B /* Frameworks */ = {
380CAFE863EF9675C83D9D3F /* Pods */ = {
isa = PBXGroup;
children = (
26F8AB81A31946B4CA55C093 /* Pods_Runner.framework */,
77A45E63F8E993C45BB74E49 /* Pods-Runner.debug.xcconfig */,
67E8A092530DE5EA70E845AD /* Pods-Runner.debug-e2e.xcconfig */,
28BE900C448E3A4E51306AE7 /* Pods-Runner.release.xcconfig */,
E7A86D7B2E3942504DC0050C /* Pods-Runner.profile.xcconfig */,
);
name = Frameworks;
path = Pods;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
Expand All @@ -99,7 +99,7 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
380CAFE863EF9675C83D9D3F /* Pods */,
6729B53F71FC9EF68B1D676B /* Frameworks */,
2C29AB87111E84422AF497AA /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -133,14 +133,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
D349F51D1E533249A81E08F5 /* [CP] Check Pods Manifest.lock */,
7D32B05510DCFC07CA6E8F16 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
2B8A8EA77A13CB47D01AE23F /* [CP] Embed Pods Frameworks */,
446788008C4190259B99F04B /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -199,23 +199,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
2B8A8EA77A13CB47D01AE23F /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
Expand All @@ -232,22 +215,24 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
446788008C4190259B99F04B /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "Run Script";
outputPaths = (
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
D349F51D1E533249A81E08F5 /* [CP] Check Pods Manifest.lock */ = {
7D32B05510DCFC07CA6E8F16 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand All @@ -269,6 +254,21 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -439,7 +439,7 @@
};
5F5490232A84DBB8003C5F01 /* Debug-e2e */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B77918AB0DC0CB4B83C5188B /* Pods-Runner.debug-e2e.xcconfig */;
baseConfigurationReference = 67E8A092530DE5EA70E845AD /* Pods-Runner.debug-e2e.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
Expand Down
42 changes: 22 additions & 20 deletions lib/bloc/crypto/crypto_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class CryptoBloc extends Bloc<CryptoEvent, CryptoState> {
await _vttGetThroughBlockExplorer.get(_hash);
if (valueTransferInfo != null) {
account.vtts.add(valueTransferInfo);
Hash txnHash = Hash.fromString(valueTransferInfo.txnHash);
Hash txnHash = Hash.fromString(valueTransferInfo.hash);
if (account.utxosByTransactionId.containsKey(txnHash)) {
balance += BalanceInfo.fromUtxoList(
account.utxosByTransactionId[txnHash]!,
Expand All @@ -325,23 +325,25 @@ class CryptoBloc extends Bloc<CryptoEvent, CryptoState> {
try {
/// retrieve any Block Hashes
final addressBlocks = await apiExplorer.address(
value: account.address, tab: 'blocks') as AddressBlocks;

/// retrieve each block
for (int i = 0; i < addressBlocks.blocks.length; i++) {
BlockInfo blockInfo = addressBlocks.blocks.elementAt(i);
String _hash = blockInfo.blockID;
var result = await apiExplorer.hash(_hash);

/// create a MintEntry from the BlockInfo and MintInfo
BlockDetails blockDetails = result as BlockDetails;
MintEntry mintEntry = MintEntry.fromBlockMintInfo(
blockInfo,
blockDetails.mintInfo,
);
account.mintHashes.add(mintEntry.blockHash);
account.mints.add(mintEntry);
await db.addMint(mintEntry);
value: account.address,
tab: 'blocks') as PaginatedRequest<AddressBlocks?>;
if (addressBlocks.data != null) {
/// retrieve each block
for (int i = 0; i < addressBlocks.data!.blocks.length; i++) {
BlockInfo blockInfo = addressBlocks.data!.blocks.elementAt(i);
String _hash = blockInfo.hash;
var result = await apiExplorer.hash(_hash);

/// create a MintEntry from the BlockInfo and MintInfo
BlockDetails blockDetails = result as BlockDetails;
gabaldon marked this conversation as resolved.
Show resolved Hide resolved
MintEntry mintEntry = MintEntry.fromBlockMintInfo(
blockInfo,
blockDetails,
);
account.mintHashes.add(mintEntry.blockHash);
account.mints.add(mintEntry);
await db.addMint(mintEntry);
}
}
return account;
} catch (e) {
Expand All @@ -354,9 +356,9 @@ class CryptoBloc extends Bloc<CryptoEvent, CryptoState> {
try {
final addressValueTransfers = await apiExplorer.address(
value: account.address,
tab: 'value_transfers') as AddressValueTransfers;
tab: 'value_transfers') as PaginatedRequest<AddressValueTransfers>;
account.vttHashes = List<String>.from(
addressValueTransfers.transactionHashes.map((e) => e));
addressValueTransfers.data.addressValueTransfers.map((e) => e.hash));
final List<Utxo> _utxos =
await apiExplorer.utxos(address: account.address);
account.updateUtxos(_utxos);
Expand Down
Loading
Loading