Properly tracks fees as entered#58
Merged
Merged
Conversation
There's a few issues happening here that this resolves to properly show fees. - For starters, the form values were named differently than what the backend was expecting. To make things match as closely possible, I renamed the form inputs to `bfee` (BaseFee) and `qfee` (QuoteFee) which is what the backend is expecting. - The database had no fields in the `Trade` table for either fee. Added those. **Note: This will require a change to the database, and I don't currently see a migration pattern. Is is there one in mind?** - Also updated the appropriate queries to return the new fee values from the database. Resolves #53
ImDevinC
commented
Aug 24, 2025
| return nil, fmt.Errorf("invalid trade type: %s", req.Type) | ||
| } | ||
| fmt.Println("RecordTradeReq", req) | ||
| fmt.Printf("RecordTradeReq: %+v\n", req) |
Contributor
Author
There was a problem hiding this comment.
Changed to printf so it prints out the full key/value naming instead of a struct of values
Owner
|
@ImDevinC thanks for the PR. There's currently no migration plan for the Database. I wouldn't know how to do this without an engine for sqlite. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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's a few issues happening here that this resolves to properly show
fees.
backend was expecting. To make things match as closely possible, I
renamed the form inputs to
bfee(BaseFee) andqfee(QuoteFee)which is what the backend is expecting.
Tradetable for either fee. Addedthose. Note: This will require a change to the database, and I don't
currently see a migration pattern. Is is there one in mind?
the database.
Resolves #53