mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
fix , bug and swapping for nano (#1123)
This commit is contained in:
parent
a035872fc9
commit
acb0517871
1 changed files with 5 additions and 3 deletions
|
@ -169,8 +169,8 @@ abstract class NanoWalletBase
|
||||||
if (txOut.sendAll) {
|
if (txOut.sendAll) {
|
||||||
amt = balance[currency]?.currentBalance ?? BigInt.zero;
|
amt = balance[currency]?.currentBalance ?? BigInt.zero;
|
||||||
} else {
|
} else {
|
||||||
amt = BigInt.tryParse(
|
amt = BigInt.tryParse(NanoUtil.getAmountAsRaw(
|
||||||
NanoUtil.getAmountAsRaw(txOut.cryptoAmount ?? "0", NanoUtil.rawPerNano)) ??
|
txOut.cryptoAmount?.replaceAll(',', '.') ?? "0", NanoUtil.rawPerNano)) ??
|
||||||
BigInt.zero;
|
BigInt.zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,9 @@ abstract class NanoWalletBase
|
||||||
|
|
||||||
final block = await _client.constructSendBlock(
|
final block = await _client.constructSendBlock(
|
||||||
amountRaw: amt.toString(),
|
amountRaw: amt.toString(),
|
||||||
destinationAddress: txOut.extractedAddress ?? txOut.address,
|
destinationAddress: credentials.outputs.first.isParsedAddress
|
||||||
|
? credentials.outputs.first.extractedAddress!
|
||||||
|
: credentials.outputs.first.address,
|
||||||
privateKey: _privateKey!,
|
privateKey: _privateKey!,
|
||||||
balanceAfterTx: runningBalance,
|
balanceAfterTx: runningBalance,
|
||||||
previousHash: previousHash,
|
previousHash: previousHash,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue