Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
log offer if isSelling check fails (closes #374)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsaraf committed Feb 17, 2020
1 parent c0a4e3a commit ea505bd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plugins/makerModeFilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (f *makerModeFilter) transformOfferMakerMode(

isSell, e := utils.IsSelling(baseAsset, quoteAsset, op.Selling, op.Buying)
if e != nil {
return nil, fmt.Errorf("error when running the isSelling check: %s", e)
return nil, fmt.Errorf("error when running the isSelling check for offer '%+v': %s", *op, e)
}

sellPrice, e := strconv.ParseFloat(op.Price, 64)
Expand Down
2 changes: 1 addition & 1 deletion plugins/maxPriceFilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (f *maxPriceFilter) Apply(ops []txnbuild.Operation, sellingOffers []hProtoc
func (f *maxPriceFilter) maxPriceFilterFn(op *txnbuild.ManageSellOffer) (*txnbuild.ManageSellOffer, error) {
isSell, e := utils.IsSelling(f.baseAsset, f.quoteAsset, op.Selling, op.Buying)
if e != nil {
return nil, fmt.Errorf("error when running the isSelling check: %s", e)
return nil, fmt.Errorf("error when running the isSelling check for offer '%+v': %s", *op, e)
}

sellPrice, e := strconv.ParseFloat(op.Price, 64)
Expand Down
2 changes: 1 addition & 1 deletion plugins/minPriceFilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (f *minPriceFilter) Apply(ops []txnbuild.Operation, sellingOffers []hProtoc
func (f *minPriceFilter) minPriceFilterFn(op *txnbuild.ManageSellOffer) (*txnbuild.ManageSellOffer, error) {
isSell, e := utils.IsSelling(f.baseAsset, f.quoteAsset, op.Selling, op.Buying)
if e != nil {
return nil, fmt.Errorf("error when running the isSelling check: %s", e)
return nil, fmt.Errorf("error when running the isSelling check for offer '%+v': %s", *op, e)
}

sellPrice, e := strconv.ParseFloat(op.Price, 64)
Expand Down
2 changes: 1 addition & 1 deletion plugins/orderConstraintsFilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (f *orderConstraintsFilter) shouldKeepOffer(op *txnbuild.ManageSellOffer) (

isSell, e := utils.IsSelling(f.baseAsset, f.quoteAsset, op.Selling, op.Buying)
if e != nil {
return false, fmt.Errorf("error when running the isSelling check: %s", e)
return false, fmt.Errorf("error when running the isSelling check for offer '%+v': %s", *op, e)
}

sellPrice, e := strconv.ParseFloat(op.Price, 64)
Expand Down
2 changes: 1 addition & 1 deletion plugins/priceFeedFilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (f *priceFeedFilter) Apply(ops []txnbuild.Operation, sellingOffers []hProto
func (f *priceFeedFilter) priceFeedFilterFn(op *txnbuild.ManageSellOffer) (*txnbuild.ManageSellOffer, error) {
isSell, e := utils.IsSelling(f.baseAsset, f.quoteAsset, op.Selling, op.Buying)
if e != nil {
return nil, fmt.Errorf("error when running the isSelling check: %s", e)
return nil, fmt.Errorf("error when running the isSelling check for offer '%+v': %s", *op, e)
}

sellPrice, e := strconv.ParseFloat(op.Price, 64)
Expand Down
2 changes: 1 addition & 1 deletion plugins/volumeFilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (f *volumeFilter) Apply(ops []txnbuild.Operation, sellingOffers []hProtocol
func (f *volumeFilter) volumeFilterFn(dailyOTB *VolumeFilterConfig, dailyTBB *VolumeFilterConfig, op *txnbuild.ManageSellOffer) (*txnbuild.ManageSellOffer, error) {
isSell, e := utils.IsSelling(f.baseAsset, f.quoteAsset, op.Selling, op.Buying)
if e != nil {
return nil, fmt.Errorf("error when running the isSelling check: %s", e)
return nil, fmt.Errorf("error when running the isSelling check for offer '%+v': %s", *op, e)
}

sellPrice, e := strconv.ParseFloat(op.Price, 64)
Expand Down

0 comments on commit ea505bd

Please sign in to comment.