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

Assets: Fix LinearContracts support #1724

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

gbjk
Copy link
Collaborator

@gbjk gbjk commented Nov 22, 2024

Fixes Linear assets missing from list of strings for asset conversion.
Drive-Bys a couple of other minor fixes from another branch that shouldn't be contentious.

Type of change

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

How has this been tested

  • go test ./... -race
  • golangci-lint run

@gbjk gbjk added bug review me This pull request is ready for review labels Nov 22, 2024
@gbjk gbjk self-assigned this Nov 22, 2024
@gbjk gbjk force-pushed the bugfix/linear_assets branch 3 times, most recently from 5b33bc5 to 55d5ba8 Compare November 23, 2024 11:03
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 update, clean. Just a couple nits. Then looks good to go.

exchanges/asset/asset_test.go Outdated Show resolved Hide resolved
exchanges/asset/asset_test.go Outdated Show resolved Hide resolved
@gbjk gbjk requested a review from shazbert November 24, 2024 11:04
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.

Ch ACK. Nice.

Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

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

You may have to battle it out with Thrasher WRT bitshifting, but if you get past that, here's some verbose comments on really minor issues

exchanges/asset/asset.go Outdated Show resolved Hide resolved
exchanges/asset/asset.go Outdated Show resolved Hide resolved
exchanges/asset/asset.go Outdated Show resolved Hide resolved
@gbjk gbjk requested a review from gloriousCode November 25, 2024 00:52
Copy link
Collaborator

@gloriousCode gloriousCode left a comment

Choose a reason for hiding this comment

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

tACK! Thanks for listening

supportedFlag&a is true for every even number, making the test pretty
close to meaningless.

[This
fix](5b33bc5)
was a viable fix maintaining bit shifted iota, but there's no benefit to
it at all.

Simplifying.
@gbjk gbjk force-pushed the bugfix/linear_assets branch from 9b000bd to c6f39af Compare November 25, 2024 03:48
@gbjk
Copy link
Collaborator Author

gbjk commented Nov 25, 2024

Rebase-Squashed.

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.

Simplifies the package (as per our discussion in the past of bitshifting values and how people can be confused by it) but at the cost of specific ordering with our consts. This is going to be overhauled again as per issue #1691 so LGTM

@thrasher- thrasher- merged commit fa9549d into thrasher-corp:master Nov 25, 2024
5 of 11 checks passed
@gbjk gbjk deleted the bugfix/linear_assets branch November 25, 2024 07:04
gbjk added a commit to gbjk/gocryptotrader that referenced this pull request Nov 26, 2024
* Assets: Fix LinearContracts support

* Assets: Fix False positives with IsValid

supportedFlag&a is true for every even number, making the test pretty
close to meaningless.

[This
fix](5b33bc5)
was a viable fix maintaining bit shifted iota, but there's no benefit to
it at all.

Simplifying.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug review me This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants