expand upon demo

TODO remove WIP, hook directly into StreamBuilder
This commit is contained in:
sneurlax 2023-07-20 14:52:05 -05:00
parent 22e222ffd6
commit 4be7919e46
2 changed files with 9 additions and 2 deletions

View file

@ -185,7 +185,14 @@ class _OrdinalsViewState extends ConsumerState<OrdinalsView> with OrdinalsInterf
// await fetchLatestInscriptions();
// await getTransaction('ed5a5c4e555e204768ec54c049ae0b01c86fdcc8b126a9d100c4dff745e7d3ca');
// await getBlock('31278055ba414fe6dbed75e4a77e841da4481972ac09bd2a214c445da1a44aad');
await getInscriptionsByAddress('ltc1qk4e8hdq5w6rvk5xvkxajjak78v45pkul8a2cg9');
var inscriptions = await getInscriptionsByAddress('ltc1qk4e8hdq5w6rvk5xvkxajjak78v45pkul8a2cg9');
for (var inscription in inscriptions) {
print(inscription);
print(inscription.address);
print(inscription.content);
print(inscription.inscriptionId);
print(inscription.inscriptionNumber);
}
}, child: Text(
"Test",
style: STextStyles.navBarTitle(context),

View file

@ -19,7 +19,7 @@ mixin OrdinalsInterface {
Future<List<AddressInscription>> getInscriptionsByAddress(String address) async {
try {
var response = await litescribeAPI.getInscriptionsByAddress(address);
print("Found ${response.result.total} inscriptions at address $address"); // TODO disable (POC)
print("Found ${response.result.total} inscription${response.result.total > 1 ? 's' : ''} at address $address"); // TODO disable (POC)
return response.result.list;
} catch (e) {
throw Exception('Error in OrdinalsInterface getInscriptionsByAddress: $e');