-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix message construction #2802
Merged
Fix message construction #2802
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
bf478a2
[goreleaser]
golangisfun123 1ac6a13
fix tests [goreleaser]
golangisfun123 78e29a9
fix models
golangisfun123 7ad822f
[goreleaser]
golangisfun123 7c700a9
lint [goreleaser]
golangisfun123 7ffa8d0
fix forever
golangisfun123 baf7322
fix client
golangisfun123 43ad851
bytestojson
golangisfun123 4493020
lint
golangisfun123 c95e39c
[goreleaser]
golangisfun123 87e2f06
remove extraneous vscode setting
trajan0x 25a34e8
update labeler
trajan0x 714e0bf
update swagger docs
trajan0x 8646f0e
deps label
trajan0x 02fcafa
add tests [goreleaser]
trajan0x File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,9 +101,6 @@ | |
"createdAt": { | ||
"type": "string" | ||
}, | ||
"data": { | ||
"type": "string" | ||
}, | ||
"id": { | ||
"type": "string" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,6 @@ definitions: | |
type: string | ||
createdAt: | ||
type: string | ||
data: | ||
type: string | ||
id: | ||
type: string | ||
network: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
package core | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
) | ||
|
||
// BytesToSlice converts a 32 bit array to a slice slice. | ||
func BytesToSlice(bytes [32]byte) []byte { | ||
rawBytes := make([]byte, len(bytes)) | ||
copy(rawBytes, bytes[:]) | ||
return rawBytes | ||
} | ||
|
||
// BytesToJSONString converts a 32 bit array to a JSON string without escapes, newlines, etc. | ||
func BytesToJSONString(bz []byte) (string, error) { | ||
var jsonData map[string]interface{} | ||
if err := json.Unmarshal(bz, &jsonData); err != nil { | ||
return "", fmt.Errorf("failed to unmarshal JSON: %w", err) | ||
} | ||
formattedJSON, err := json.Marshal(jsonData) | ||
if err != nil { | ||
return "", fmt.Errorf("failed to marshal JSON: %w", err) | ||
} | ||
|
||
return string(formattedJSON), nil | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Improve test coverage and refine error handling in
screener.go
.The newly added lines in
blacklistAddress
andauthMiddleware
functions lack test coverage. Additionally, the error handling in these functions can be improved to provide more detailed feedback and ensure robust operation.Consider refining the error handling by:
Would you like help in enhancing the error handling mechanisms or adding unit tests to cover these functionalities?
Also applies to: 366-369