@@ -69,7 +69,7 @@ describe('address tests', () => {
69
69
const testAddr2 = 'ST1HB64MAJ1MBV4CQ80GF01DZS4T1DSMX20ADCRA4' ;
70
70
const testContractAddr = 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world' ;
71
71
const testAddr4 = 'ST3DWSXBPYDB484QXFTR81K4AWG4ZB5XZNFF3H70C' ;
72
- const testTxId = '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890008 ' ;
72
+ const testTxId = '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890009 ' ;
73
73
74
74
const block : DbBlock = {
75
75
block_hash : '0x1234' ,
@@ -194,6 +194,7 @@ describe('address tests', () => {
194
194
return [ tx , stxEvents , ftEvents , nftEvents ] ;
195
195
} ;
196
196
const txs = [
197
+ createStxTx ( testAddr4 , testAddr2 , 0 , true , 1 , 0 , 0 , true ) ,
197
198
createStxTx ( testAddr4 , testAddr2 , 0 , true , 0 , 1 , 0 , true ) ,
198
199
createStxTx ( testAddr4 , testAddr2 , 0 , true , 0 , 0 , 1 , true ) ,
199
200
createStxTx ( testAddr1 , testAddr2 , 100_000 , true , 1 , 1 , 1 ) ,
@@ -231,11 +232,11 @@ describe('address tests', () => {
231
232
const expected1 = {
232
233
limit : 3 ,
233
234
offset : 0 ,
234
- total : 6 ,
235
+ total : 7 ,
235
236
results : [
236
237
{
237
238
tx : {
238
- tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890008 ' ,
239
+ tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890009 ' ,
239
240
tx_type : 'token_transfer' ,
240
241
nonce : 0 ,
241
242
anchor_mode : 'any' ,
@@ -257,7 +258,7 @@ describe('address tests', () => {
257
258
parent_block_hash : '0x' ,
258
259
parent_burn_block_time : 1626122935 ,
259
260
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
260
- tx_index : 8 ,
261
+ tx_index : 9 ,
261
262
tx_result : { hex : '0x0100000000000000000000000000000001' , repr : 'u1' } ,
262
263
token_transfer : {
263
264
recipient_address : 'ST3DWSXBPYDB484QXFTR81K4AWG4ZB5XZNFF3H70C' ,
@@ -322,7 +323,7 @@ describe('address tests', () => {
322
323
} ,
323
324
{
324
325
tx : {
325
- tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890005 ' ,
326
+ tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890006 ' ,
326
327
tx_type : 'token_transfer' ,
327
328
nonce : 0 ,
328
329
anchor_mode : 'any' ,
@@ -344,7 +345,7 @@ describe('address tests', () => {
344
345
parent_block_hash : '0x' ,
345
346
parent_burn_block_time : 1626122935 ,
346
347
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
347
- tx_index : 5 ,
348
+ tx_index : 6 ,
348
349
tx_result : { hex : '0x0100000000000000000000000000000001' , repr : 'u1' } ,
349
350
token_transfer : {
350
351
recipient_address : 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world' ,
@@ -383,7 +384,7 @@ describe('address tests', () => {
383
384
} ,
384
385
{
385
386
tx : {
386
- tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890004 ' ,
387
+ tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890005 ' ,
387
388
tx_type : 'token_transfer' ,
388
389
nonce : 0 ,
389
390
anchor_mode : 'any' ,
@@ -405,7 +406,7 @@ describe('address tests', () => {
405
406
parent_block_hash : '0x' ,
406
407
parent_burn_block_time : 1626122935 ,
407
408
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
408
- tx_index : 4 ,
409
+ tx_index : 5 ,
409
410
tx_result : { hex : '0x0100000000000000000000000000000001' , repr : 'u1' } ,
410
411
token_transfer : {
411
412
recipient_address : 'ST27W5M8BRKA7C5MZE2R1S1F4XTPHFWFRNHA9M04Y.hello-world' ,
@@ -467,7 +468,7 @@ describe('address tests', () => {
467
468
expect ( v2Fetch1 . status ) . toBe ( 200 ) ;
468
469
expect ( v2Fetch1 . type ) . toBe ( 'application/json' ) ;
469
470
const v2Fetch1Json = JSON . parse ( v2Fetch1 . text ) ;
470
- expect ( v2Fetch1Json . total ) . toBe ( 6 ) ;
471
+ expect ( v2Fetch1Json . total ) . toBe ( 7 ) ;
471
472
expect ( v2Fetch1Json . results [ 0 ] . tx ) . toStrictEqual ( expected1 . results [ 0 ] . tx ) ;
472
473
expect ( v2Fetch1Json . results [ 0 ] . stx_sent ) . toBe ( '1339' ) ;
473
474
expect ( v2Fetch1Json . results [ 0 ] . stx_received ) . toBe ( '0' ) ;
@@ -556,6 +557,23 @@ describe('address tests', () => {
556
557
mint : 0 ,
557
558
burn : 0 ,
558
559
} ) ;
560
+ expect ( v2Fetch1Json . results [ 6 ] . stx_sent ) . toBe ( '1234' ) ;
561
+ expect ( v2Fetch1Json . results [ 6 ] . stx_received ) . toBe ( '0' ) ;
562
+ expect ( v2Fetch1Json . results [ 6 ] . events . stx ) . toStrictEqual ( {
563
+ transfer : 1 ,
564
+ mint : 0 ,
565
+ burn : 0 ,
566
+ } ) ;
567
+ expect ( v2Fetch1Json . results [ 6 ] . events . ft ) . toStrictEqual ( {
568
+ transfer : 0 ,
569
+ mint : 0 ,
570
+ burn : 0 ,
571
+ } ) ;
572
+ expect ( v2Fetch1Json . results [ 6 ] . events . nft ) . toStrictEqual ( {
573
+ transfer : 0 ,
574
+ mint : 0 ,
575
+ burn : 0 ,
576
+ } ) ;
559
577
560
578
const v2Fetch2 = await supertest ( api . server ) . get (
561
579
`/extended/v2/addresses/${ testAddr2 } /transactions/${ v2Fetch1Json . results [ 0 ] . tx . tx_id } /events?limit=3`
@@ -659,7 +677,7 @@ describe('address tests', () => {
659
677
expect ( fetchSingleTxInformation . type ) . toBe ( 'application/json' ) ;
660
678
const expectedSingleTxInformation = {
661
679
tx : {
662
- tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890008 ' ,
680
+ tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890009 ' ,
663
681
tx_type : 'token_transfer' ,
664
682
nonce : 0 ,
665
683
anchor_mode : 'any' ,
@@ -681,7 +699,7 @@ describe('address tests', () => {
681
699
parent_block_hash : '0x' ,
682
700
parent_burn_block_time : 1626122935 ,
683
701
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
684
- tx_index : 8 ,
702
+ tx_index : 9 ,
685
703
tx_result : { hex : '0x0100000000000000000000000000000001' , repr : 'u1' } ,
686
704
token_transfer : {
687
705
recipient_address : 'ST3DWSXBPYDB484QXFTR81K4AWG4ZB5XZNFF3H70C' ,
@@ -727,11 +745,11 @@ describe('address tests', () => {
727
745
const expected2 = {
728
746
limit : 2 ,
729
747
offset : 0 ,
730
- total : 4 ,
748
+ total : 5 ,
731
749
results : [
732
750
{
733
751
tx : {
734
- tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890008 ' ,
752
+ tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890009 ' ,
735
753
tx_type : 'token_transfer' ,
736
754
nonce : 0 ,
737
755
anchor_mode : 'any' ,
@@ -753,7 +771,7 @@ describe('address tests', () => {
753
771
parent_block_hash : '0x' ,
754
772
parent_burn_block_time : 1626122935 ,
755
773
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
756
- tx_index : 8 ,
774
+ tx_index : 9 ,
757
775
tx_result : { hex : '0x0100000000000000000000000000000001' , repr : 'u1' } ,
758
776
token_transfer : {
759
777
recipient_address : 'ST3DWSXBPYDB484QXFTR81K4AWG4ZB5XZNFF3H70C' ,
@@ -818,7 +836,7 @@ describe('address tests', () => {
818
836
} ,
819
837
{
820
838
tx : {
821
- tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890007 ' ,
839
+ tx_id : '0x03807fdb726b3cb843e0330c564a4974037be8f9ea58ec7f8ebe03c34b890008 ' ,
822
840
tx_type : 'token_transfer' ,
823
841
nonce : 0 ,
824
842
anchor_mode : 'any' ,
@@ -840,7 +858,7 @@ describe('address tests', () => {
840
858
parent_block_hash : '0x' ,
841
859
parent_burn_block_time : 1626122935 ,
842
860
parent_burn_block_time_iso : '2021-07-12T20:48:55.000Z' ,
843
- tx_index : 7 ,
861
+ tx_index : 8 ,
844
862
tx_result : { hex : '0x0100000000000000000000000000000001' , repr : 'u1' } ,
845
863
token_transfer : {
846
864
recipient_address : 'ST3DWSXBPYDB484QXFTR81K4AWG4ZB5XZNFF3H70C' ,
0 commit comments