mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 11:16:36 +00:00
use electrum_adapter getTransaction
This commit is contained in:
parent
ceec698a44
commit
13a50cdace
3 changed files with 17 additions and 3 deletions
|
@ -743,6 +743,19 @@ class ElectrumXClient {
|
|||
bool verbose = true,
|
||||
String? requestID,
|
||||
}) async {
|
||||
// Use electrum_adapter package's getTransaction method.
|
||||
Logging.instance.log("attempting to fetch blockchain.transaction.get...",
|
||||
level: LogLevel.Info);
|
||||
var channel =
|
||||
await electrum_adapter.connect(host, port: port); // TODO pass useSLL.
|
||||
var client = electrum_adapter.ElectrumClient(channel, host, port);
|
||||
dynamic response = await client.getTransaction(txHash);
|
||||
Logging.instance.log("Fetching blockchain.transaction.get finished",
|
||||
level: LogLevel.Info);
|
||||
return Map<String, dynamic>.from(response as Map);
|
||||
|
||||
/*
|
||||
// Original ElectrumXClient:
|
||||
dynamic response;
|
||||
try {
|
||||
response = await request(
|
||||
|
@ -778,6 +791,7 @@ class ElectrumXClient {
|
|||
level: LogLevel.Error);
|
||||
rethrow;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/// Returns the whole Lelantus anonymity set for denomination in the groupId.
|
||||
|
|
|
@ -528,8 +528,8 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "1c4962bf6fa8fe639be8540f8c61e89e625c7034"
|
||||
resolved-ref: "1c4962bf6fa8fe639be8540f8c61e89e625c7034"
|
||||
ref: "72f5801f78b6e73165c44d349a514badf0ee0d78"
|
||||
resolved-ref: "72f5801f78b6e73165c44d349a514badf0ee0d78"
|
||||
url: "https://github.com/cypherstack/electrum_adapter.git"
|
||||
source: git
|
||||
version: "3.0.0"
|
||||
|
|
|
@ -176,7 +176,7 @@ dependencies:
|
|||
electrum_adapter:
|
||||
git:
|
||||
url: https://github.com/cypherstack/electrum_adapter.git
|
||||
ref: 1c4962bf6fa8fe639be8540f8c61e89e625c7034
|
||||
ref: 80d28a8b033af7bcf90cd6c7a3ee74160dc791a1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
Loading…
Reference in a new issue