mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 02:07:43 +00:00
WIP spark scanning txhash correction
This commit is contained in:
parent
658901ff03
commit
56e11400a2
1 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import 'dart:convert';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:flutter_libsparkmobile/flutter_libsparkmobile.dart';
|
import 'package:flutter_libsparkmobile/flutter_libsparkmobile.dart';
|
||||||
|
@ -205,7 +206,7 @@ mixin SparkInterface on Bip39HDWallet, ElectrumXInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
final serializedCoin = data.first;
|
final serializedCoin = data.first;
|
||||||
final txHash = data.last;
|
final txHash = base64ToReverseHex(data.last);
|
||||||
|
|
||||||
final coin = LibSpark.identifyAndRecoverCoin(
|
final coin = LibSpark.identifyAndRecoverCoin(
|
||||||
serializedCoin,
|
serializedCoin,
|
||||||
|
@ -332,3 +333,9 @@ mixin SparkInterface on Bip39HDWallet, ElectrumXInterface {
|
||||||
await normalBalanceFuture;
|
await normalBalanceFuture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String base64ToReverseHex(String source) =>
|
||||||
|
base64Decode(LineSplitter.split(source).join())
|
||||||
|
.reversed
|
||||||
|
.map((e) => e.toRadixString(16).padLeft(2, '0'))
|
||||||
|
.join();
|
||||||
|
|
Loading…
Reference in a new issue