mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-09 20:29:57 +00:00
account for ct_fee
This commit is contained in:
parent
4aa6fc5d80
commit
7ec0606b08
1 changed files with 9 additions and 0 deletions
|
@ -2376,6 +2376,15 @@ class ParticlWallet extends CoinServiceAPI {
|
||||||
Logging.instance.log(
|
Logging.instance.log(
|
||||||
"output is blinded (CT); cannot parse output values",
|
"output is blinded (CT); cannot parse output values",
|
||||||
level: LogLevel.Info);
|
level: LogLevel.Info);
|
||||||
|
final ct_fee = output["ct_fee"]!;
|
||||||
|
final fee_value = (Decimal.parse(ct_fee.toString()) *
|
||||||
|
Decimal.fromInt(Constants.satsPerCoin(coin)))
|
||||||
|
.toBigInt()
|
||||||
|
.toInt();
|
||||||
|
Logging.instance.log(
|
||||||
|
"ct_fee ${ct_fee} subtracted from inputAmtSentFromWallet ${inputAmtSentFromWallet}",
|
||||||
|
level: LogLevel.Info);
|
||||||
|
inputAmtSentFromWallet += fee_value;
|
||||||
} else if (output.containsKey('rangeproof') as bool) {
|
} else if (output.containsKey('rangeproof') as bool) {
|
||||||
// or valueCommitment or type: anon
|
// or valueCommitment or type: anon
|
||||||
// TODO handle RingCT tx
|
// TODO handle RingCT tx
|
||||||
|
|
Loading…
Reference in a new issue