@@ -44,25 +44,28 @@ func (f *FilterFactory) MakeFilter(configInput string) (SubmitFilter, error) {
4444
4545func filterVolume (f * FilterFactory , configInput string ) (SubmitFilter , error ) {
4646 parts := strings .Split (configInput , "/" )
47- if len (parts ) != 5 {
48- return nil , fmt .Errorf ("invalid input (%s), needs 5 parts separated by the delimiter (/)" , configInput )
47+ if len (parts ) != 6 {
48+ return nil , fmt .Errorf ("invalid input (%s), needs 6 parts separated by the delimiter (/)" , configInput )
4949 }
5050
51- mode , e := parseVolumeFilterMode (parts [4 ])
51+ mode , e := parseVolumeFilterMode (parts [5 ])
5252 if e != nil {
5353 return nil , fmt .Errorf ("could not parse volume filter mode from input (%s): %s" , configInput , e )
5454 }
5555 config := & VolumeFilterConfig {mode : mode }
5656 if parts [1 ] != "sell" {
5757 return nil , fmt .Errorf ("invalid input (%s), the second part needs to be \" sell\" " , configInput )
5858 }
59- limit , e := strconv .ParseFloat (parts [3 ], 64 )
59+ if parts [2 ] != "daily" {
60+ return nil , fmt .Errorf ("invalid input (%s), the third part needs to be \" daily\" " , configInput )
61+ }
62+ limit , e := strconv .ParseFloat (parts [4 ], 64 )
6063 if e != nil {
6164 return nil , fmt .Errorf ("could not parse the fourth part as a float value from config value (%s): %s" , configInput , e )
6265 }
63- if parts [2 ] == "base" {
66+ if parts [3 ] == "base" {
6467 config .SellBaseAssetCapInBaseUnits = & limit
65- } else if parts [2 ] == "quote" {
68+ } else if parts [3 ] == "quote" {
6669 config .SellBaseAssetCapInQuoteUnits = & limit
6770 } else {
6871 return nil , fmt .Errorf ("invalid input (%s), the third part needs to be \" base\" or \" quote\" " , configInput )
0 commit comments