mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 10:34:32 +00:00
use electrum_adapter.getTransaction in cachedElectrumXClient, too
This commit is contained in:
parent
13a50cdace
commit
af3e194767
1 changed files with 6 additions and 2 deletions
|
@ -11,6 +11,7 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:electrum_adapter/electrum_adapter.dart' as electrum_adapter;
|
||||||
import 'package:stackwallet/db/hive/db.dart';
|
import 'package:stackwallet/db/hive/db.dart';
|
||||||
import 'package:stackwallet/electrumx_rpc/electrumx_client.dart';
|
import 'package:stackwallet/electrumx_rpc/electrumx_client.dart';
|
||||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||||
|
@ -188,8 +189,11 @@ class CachedElectrumXClient {
|
||||||
|
|
||||||
final cachedTx = box.get(txHash) as Map?;
|
final cachedTx = box.get(txHash) as Map?;
|
||||||
if (cachedTx == null) {
|
if (cachedTx == null) {
|
||||||
final Map<String, dynamic> result = await electrumXClient
|
var channel = await electrum_adapter.connect(electrumXClient.host,
|
||||||
.getTransaction(txHash: txHash, verbose: verbose);
|
port: electrumXClient.port); // TODO pass useSLL.
|
||||||
|
var client = electrum_adapter.ElectrumClient(
|
||||||
|
channel, electrumXClient.host, electrumXClient.port);
|
||||||
|
final Map<String, dynamic> result = await client.getTransaction(txHash);
|
||||||
|
|
||||||
result.remove("hex");
|
result.remove("hex");
|
||||||
result.remove("lelantusData");
|
result.remove("lelantusData");
|
||||||
|
|
Loading…
Reference in a new issue