File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export enum SpentHeightIndicators {
38
38
/**
39
39
* The coin was minted by a transaction which can no longer confirm.
40
40
*/
41
- conflicting = - 3 ,
41
+ conflicting = - 3
42
42
}
43
43
44
44
@LoggifyClass
@@ -76,7 +76,10 @@ class Coin extends BaseModel<ICoin> {
76
76
77
77
getBalance ( params : { query : any } ) {
78
78
let { query } = params ;
79
- query = Object . assign ( query , { spentHeight : { $lt : SpentHeightIndicators . minimum } , mintHeight : { $gt : SpentHeightIndicators . conflicting } } ) ;
79
+ query = Object . assign ( query , {
80
+ spentHeight : { $lt : SpentHeightIndicators . minimum } ,
81
+ mintHeight : { $gt : SpentHeightIndicators . conflicting }
82
+ } ) ;
80
83
return this . collection
81
84
. aggregate < { balance : number } > ( [
82
85
{ $match : query } ,
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ describe('Coin Model', function() {
68
68
spentHeight : SpentHeightIndicators . unspent ,
69
69
address : 'n1ojJtS98D2VRLcTkaHH4YXLG4ytCyS7AL' ,
70
70
coinbase : true ,
71
+ confirmations : undefined ,
71
72
script : coin . script ,
72
73
value : 5000000000.0
73
74
} ) ;
You can’t perform that action at this time.
0 commit comments