improve fee computation for P2PKH wallets
This commit is contained in:
parent
ee7d3bad7f
commit
8865d42ec3
|
@ -228,7 +228,13 @@ TxProposal.prototype.getRawTx = function() {
|
|||
};
|
||||
|
||||
TxProposal.prototype.getEstimatedSizeForSingleInput = function() {
|
||||
return this.requiredSignatures * 72 + this.walletN * 36 + 44;
|
||||
switch (this.addressType) {
|
||||
case Constants.SCRIPT_TYPES.P2PKH:
|
||||
return 147;
|
||||
default:
|
||||
case Constants.SCRIPT_TYPES.P2SH:
|
||||
return this.requiredSignatures * 72 + this.walletN * 36 + 44;
|
||||
}
|
||||
};
|
||||
|
||||
TxProposal.prototype.getEstimatedSize = function() {
|
||||
|
|
Loading…
Reference in New Issue