mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-21 22:58:49 +00:00
Fix send all error
This commit is contained in:
parent
7a745000b9
commit
4c66bbaa41
1 changed files with 4 additions and 5 deletions
|
@ -255,9 +255,12 @@ abstract class LibEpiccash {
|
||||||
final part1 = jsonDecode(slate[0] as String);
|
final part1 = jsonDecode(slate[0] as String);
|
||||||
final part2 = jsonDecode(slate[1] as String);
|
final part2 = jsonDecode(slate[1] as String);
|
||||||
|
|
||||||
|
List<dynamic>? outputs = part2['tx']?['body']?['outputs'] as List;
|
||||||
|
String? commitId = (outputs.isEmpty) ? '' : outputs[0]['commit'] as String;
|
||||||
|
|
||||||
({String slateId, String commitId}) data = (
|
({String slateId, String commitId}) data = (
|
||||||
slateId: part1[0]['tx_slate_id'],
|
slateId: part1[0]['tx_slate_id'],
|
||||||
commitId: part2['tx']['body']['outputs'][0]['commit'],
|
commitId: commitId,
|
||||||
);
|
);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
@ -463,10 +466,6 @@ abstract class LibEpiccash {
|
||||||
.toInt();
|
.toInt();
|
||||||
var amountSending = amount - largestSatoshiFee;
|
var amountSending = amount - largestSatoshiFee;
|
||||||
//Get fees for this new amount
|
//Get fees for this new amount
|
||||||
({
|
|
||||||
String wallet,
|
|
||||||
int amount,
|
|
||||||
}) data = (wallet: wallet, amount: amountSending);
|
|
||||||
fees = await compute(_transactionFeesWrapper, (
|
fees = await compute(_transactionFeesWrapper, (
|
||||||
wallet: wallet,
|
wallet: wallet,
|
||||||
amount: amountSending,
|
amount: amountSending,
|
||||||
|
|
Loading…
Reference in a new issue