Skip to content

Commit

Permalink
Temporary fix for segwit transfers that output fractionary satoshi va…
Browse files Browse the repository at this point in the history
…lues
  • Loading branch information
chiguireitor committed Dec 21, 2018
1 parent efee7e2 commit f9e888e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/js/components/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/js/consts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***********
* GLOBAL CONSTANTS
***********/
var VERSION = "1.8.0";
var VERSION = "1.9.0";
var PREFERENCES = {}; //set when logging in

//Addresses
Expand Down

0 comments on commit f9e888e

Please sign in to comment.