From f9e888eed8aa12b43c94b9d7d1242f98e1fca58e Mon Sep 17 00:00:00 2001 From: John Villar Date: Fri, 21 Dec 2018 10:42:23 -0400 Subject: [PATCH] Temporary fix for segwit transfers that output fractionary satoshi values --- src/js/components/wallet.js | 3 ++- src/js/consts.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/components/wallet.js b/src/js/components/wallet.js index 5b9405699..de056242a 100644 --- a/src/js/components/wallet.js +++ b/src/js/components/wallet.js @@ -583,7 +583,8 @@ function WalletViewModel() { /*if (hasDestBech32) { redeemScript = // Future support for P2WSH }*/ - txb.sign(i, keypair, null, null, parseFloat(prev.amount) * 100000000, redeemScript); + // Math.floor is less than ideal in this scenario, we need to get the raw satoshi value in the utxo map + txb.sign(i, keypair, null, null, Math.floor(parseFloat(prev.amount) * 100000000), redeemScript); } else { // This should throw an error? bootbox.alert("Failed to sign transaction: " + "Incomplete SegWit inputs"); diff --git a/src/js/consts.js b/src/js/consts.js index 6494c7958..e25bc2a3d 100644 --- a/src/js/consts.js +++ b/src/js/consts.js @@ -1,7 +1,7 @@ /*********** * GLOBAL CONSTANTS ***********/ -var VERSION = "1.8.0"; +var VERSION = "1.9.0"; var PREFERENCES = {}; //set when logging in //Addresses