@@ -141,11 +141,13 @@ describe('other tests', () => {
141
141
expect ( result1 . status ) . toBe ( 200 ) ;
142
142
expect ( result1 . type ) . toBe ( 'application/json' ) ;
143
143
const expectedResp1 = {
144
- unlocked_percent : '12.93' ,
145
- total_stx : '1818000000.000000' ,
146
- unlocked_stx : microStxToStx ( expectedTotalStx1 ) ,
147
- block_height : dbBlock1 . block_height ,
144
+ unlocked_percent : '100.00' ,
145
+ total_stx : '235000000.000000' ,
146
+ total_stx_year_2050 : '1818000000.000000' ,
147
+ unlocked_stx : '235000000.000000' ,
148
+ block_height : 1 ,
148
149
} ;
150
+
149
151
expect ( JSON . parse ( result1 . text ) ) . toEqual ( expectedResp1 ) ;
150
152
151
153
// ensure burned STX reduce the unlocked stx supply
@@ -166,9 +168,10 @@ describe('other tests', () => {
166
168
expect ( result2 . status ) . toBe ( 200 ) ;
167
169
expect ( result2 . type ) . toBe ( 'application/json' ) ;
168
170
const expectedResp2 = {
169
- unlocked_percent : '12.38 ' ,
170
- total_stx : '1818000000.000000' ,
171
+ unlocked_percent : '100.00 ' ,
172
+ total_stx : microStxToStx ( expectedTotalStx2 ) ,
171
173
unlocked_stx : microStxToStx ( expectedTotalStx2 ) ,
174
+ total_stx_year_2050 : '1818000000.000000' ,
172
175
block_height : dbBlock1 . block_height ,
173
176
} ;
174
177
expect ( JSON . parse ( result2 . text ) ) . toEqual ( expectedResp2 ) ;
@@ -197,8 +200,9 @@ describe('other tests', () => {
197
200
expect ( result3 . status ) . toBe ( 200 ) ;
198
201
expect ( result3 . type ) . toBe ( 'application/json' ) ;
199
202
const expectedResp3 = {
200
- unlocked_percent : '13.20' ,
201
- total_stx : '1818000000.000000' ,
203
+ unlocked_percent : '100.00' ,
204
+ total_stx : microStxToStx ( expectedTotalStx3 ) ,
205
+ total_stx_year_2050 : '1818000000.000000' ,
202
206
unlocked_stx : microStxToStx ( expectedTotalStx3 ) ,
203
207
block_height : dbBlock1 . block_height ,
204
208
} ;
@@ -207,7 +211,7 @@ describe('other tests', () => {
207
211
const result4 = await supertest ( api . server ) . get ( `/extended/v1/stx_supply/total/plain` ) ;
208
212
expect ( result4 . status ) . toBe ( 200 ) ;
209
213
expect ( result4 . type ) . toBe ( 'text/plain' ) ;
210
- expect ( result4 . text ) . toEqual ( '1818000000 .000000' ) ;
214
+ expect ( result4 . text ) . toEqual ( '240000000 .000000' ) ;
211
215
212
216
const result5 = await supertest ( api . server ) . get ( `/extended/v1/stx_supply/circulating/plain` ) ;
213
217
expect ( result5 . status ) . toBe ( 200 ) ;
@@ -219,13 +223,17 @@ describe('other tests', () => {
219
223
expect ( result6 . status ) . toBe ( 200 ) ;
220
224
expect ( result6 . type ) . toBe ( 'application/json' ) ;
221
225
const expectedResp6 = {
222
- unlockedPercent : '13.20' ,
223
- totalStacks : '1818000000.000000' ,
224
- totalStacksFormatted : '1,818,000,000.000000' ,
226
+ unlockedPercent : '100.00' ,
227
+ totalStacks : microStxToStx ( expectedTotalStx3 ) ,
228
+ totalStacksFormatted : new Intl . NumberFormat ( 'en' , {
229
+ minimumFractionDigits : STACKS_DECIMAL_PLACES ,
230
+ } ) . format ( parseInt ( microStxToStx ( expectedTotalStx3 ) ) ) ,
225
231
unlockedSupply : microStxToStx ( expectedTotalStx3 ) ,
226
232
unlockedSupplyFormatted : new Intl . NumberFormat ( 'en' , {
227
233
minimumFractionDigits : STACKS_DECIMAL_PLACES ,
228
234
} ) . format ( parseInt ( microStxToStx ( expectedTotalStx3 ) ) ) ,
235
+ totalStacksYear2050 : '1818000000.000000' ,
236
+ totalStacksYear2050Formatted : '1,818,000,000.000000' ,
229
237
blockHeight : dbBlock1 . block_height . toString ( ) ,
230
238
} ;
231
239
expect ( JSON . parse ( result6 . text ) ) . toEqual ( expectedResp6 ) ;
0 commit comments