gocryptotrader icon indicating copy to clipboard operation
gocryptotrader copied to clipboard

Bitfinex: Fix bug where checksum calculation is incorrect

Open shazbert opened this issue 1 year ago • 0 comments

PR Description

Dear community,

This uses #1354 to store a string representation of the amount field to reduce the chance of checksum calculation failure. This is caused by a exponent value because sent on very small amounts which then gets stored as such but then when we strconv.FormatFloat(amountVal, 'f', -1, 64) it then gets turned into a decimal.

Kind regards,

Shazbert.

Type of change

Please delete options that are not relevant and add an x in [] as item is complete.

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

How has this been tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration and also consider improving test coverage whilst working on a certain feature or package.

  • [ ] go test ./... -race
  • [ ] golangci-lint run
  • [ ] Test X

Checklist

  • [ ] My code follows the style guidelines of this project
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation and regenerated documentation via the documentation tool
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally and on Github Actions/AppVeyor with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

shazbert avatar Oct 10 '23 05:10 shazbert