tx: prevent getRate from throwing.
This commit is contained in:
parent
9e480db00f
commit
e9650da89c
@ -1935,10 +1935,15 @@ TX.prototype.getRoundFee = function getRoundFee(size, rate) {
|
||||
*/
|
||||
|
||||
TX.prototype.getRate = function getRate(view, size) {
|
||||
var fee = this.getFee(view);
|
||||
|
||||
if (fee < 0)
|
||||
return 0;
|
||||
|
||||
if (size == null)
|
||||
size = this.getVirtualSize();
|
||||
|
||||
return policy.getRate(size, this.getFee(view));
|
||||
return policy.getRate(size, fee);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user