Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds support for new stock lending transaction types to the TransactionType enum so that loan, return, and manufactured dividend events can be decoded.
- Introduce three new enum cases for stock lending: loaned securities, recalled securities, and manufactured dividends.
- Map each case to its corresponding raw JSON key.
Comments suppressed due to low confidence (3)
Sources/Wealthsimple/WealthsimpleTransaction.swift:80
- [nitpick] The name
stockLoanBorrowis misleading (it suggests borrowing stock, but the comment says "Loaning out stock"). Consider renaming tostockLentorstockLoanOutto match the documented behavior and raw value.
case stockLoanBorrow = "fPLLoanedSecurities"
Sources/Wealthsimple/WealthsimpleTransaction.swift:82
- [nitpick] The case name
stockLoanReturndoesn’t align withfPLRecalledSecurities. Consider renaming tostockLoanRecallto more closely mirror the raw key and meaning of recalling lent shares.
case stockLoanReturn = "fPLRecalledSecurities"
Sources/Wealthsimple/WealthsimpleTransaction.swift:76
- New enum cases have been added here; ensure there are corresponding unit tests that verify
TransactionTypecan decodefPLLoanedSecurities,fPLRecalledSecurities, andmanufacturedDividendcorrectly.
public enum TransactionType: String {
|
Minimum coverage required: 0%
Coverage Report
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
No description provided.