@@ -78,7 +78,7 @@ func TestClient_ERC20Transfers(t *testing.T) {
7878
7979var a , b = 3273004 , 3328071
8080var contract , address = "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a" , "0x4e83362442b8d1bec281594cea3050c8eb01311c"
81- txs , err := api .ERC20Transfers (& contract , & address , & a , & b , 1 , 500 )
81+ txs , err := api .ERC20Transfers (& contract , & address , & a , & b , 1 , 500 , false )
8282noError (t , err , "api.ERC20Transfers 1" )
8383
8484//j, _ := json.MarshalIndent(txs, "", " ")
@@ -88,8 +88,15 @@ func TestClient_ERC20Transfers(t *testing.T) {
8888t .Errorf ("got txs length %v, want %v" , len (txs ), wantLen1 )
8989}
9090
91- txs , err = api .ERC20Transfers (nil , & address , nil , & b , 1 , 500 )
92- noError (t , err , "api.ERC20Transfers 2" )
91+ txs , err = api .ERC20Transfers (nil , & address , nil , & b , 1 , 500 , false )
92+ noError (t , err , "api.ERC20Transfers 2 asc" )
93+ if len (txs ) != wantLen2 {
94+ t .Errorf ("got txs length %v, want %v" , len (txs ), wantLen2 )
95+ }
96+
97+ txs , err = api .ERC20Transfers (nil , & address , nil , & b , 1 , 500 , true )
98+ noError (t , err , "api.ERC20Transfers 2 desc" )
99+
93100if len (txs ) != wantLen2 {
94101t .Errorf ("got txs length %v, want %v" , len (txs ), wantLen2 )
95102}
@@ -99,7 +106,7 @@ func TestClient_ERC20Transfers(t *testing.T) {
99106var specialContract = "0x5eac95ad5b287cf44e058dcf694419333b796123"
100107var specialStartHeight = 6024142
101108var specialEndHeight = 6485274
102- txs , err = api .ERC20Transfers (& specialContract , nil , & specialStartHeight , & specialEndHeight , 1 , 500 )
109+ txs , err = api .ERC20Transfers (& specialContract , nil , & specialStartHeight , & specialEndHeight , 1 , 500 , false )
103110noError (t , err , "api.ERC20Transfers 2" )
104111if len (txs ) != wantLen3 {
105112t .Errorf ("got txs length %v, want %v" , len (txs ), wantLen3 )
0 commit comments