Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Okx: Fix GetInsuranceFundInformation "" resp #1405

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

gbjk
Copy link
Collaborator

@gbjk gbjk commented Nov 25, 2023

When amt is "" GetInsuranceFundInformation was erroring.
amt is documented to return empty when type is regular_update

Added some more test coverage, impinged by the fields not actually being populated for currency.

Fixes Trello 211

Also quickly formats configtest.json with jq. Because this is a small and quick PR to get such a thing done in.
git diff -w or github ignore whitespaces should show no changes.
Any conflicts, just accept --ours and reformat it. Or not.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

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
  • TestGetInsuranceFundInformation

gbjk added 2 commits November 25, 2023 11:44
When amount is "" this was erroring
Simple jq formatting of configtest
git diff -w or github ignore whitespaces should show no changes.
Any conflicts, just accept --ours and reformat it. Or not :o)
Copy link
Collaborator

@shazbert shazbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch.

Suggestion: I think it would be good as a catch all for this issue is to convert this pattern to using convert.StringToFloat64.

FieldName float64          `json:"fieldTag,string"`

But doesn't need to be attempted in this PR.

@shazbert shazbert added review me This pull request is ready for review szrc shazbert review complete labels Nov 26, 2023
Copy link
Collaborator

@thrasher- thrasher- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gbjk !

@thrasher- thrasher- merged commit 0620ee0 into thrasher-corp:master Nov 27, 2023
4 of 7 checks passed
@gbjk gbjk deleted the bugfix/okx_ins_fund branch November 28, 2023 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review me This pull request is ready for review szrc shazbert review complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants