From bba67c05b51630f11ee1118236a8cd67f59afdf7 Mon Sep 17 00:00:00 2001 From: gabaldon Date: Thu, 29 Feb 2024 11:58:14 +0100 Subject: [PATCH] feat: delete InputUtxo unnecessary adapters --- lib/src/network/explorer/explorer_api.dart | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/src/network/explorer/explorer_api.dart b/lib/src/network/explorer/explorer_api.dart index 6911ed8..9581004 100644 --- a/lib/src/network/explorer/explorer_api.dart +++ b/lib/src/network/explorer/explorer_api.dart @@ -1175,27 +1175,11 @@ class InputUtxo { }; } - factory InputUtxo.fromExplorerJson(Map json) => InputUtxo( + factory InputUtxo.fromJson(Map json) => InputUtxo( address: json["address"], inputUtxo: json["input_utxo"], value: json["value"]); - // TODO: move this to myWitWallet - factory InputUtxo.fromDBJson(Map json) => InputUtxo( - address: json["pkh"], - inputUtxo: json["output_pointer"], - value: json["value"]); - - factory InputUtxo.fromJson(Map json) { - bool dbJson = json["pkh"] != null; - if (dbJson) { - // TODO: move this to myWitWallet - return InputUtxo.fromDBJson(json); - } else { - return InputUtxo.fromExplorerJson(json); - } - } - @override String toString() { // TODO: implement toString