-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: Implemented TokenRepository to interact with MirrorNodeClient API #143
Conversation
|
||
import java.util.List; | ||
|
||
public record CustomFee(List<FixedFee> fixedFees, List<FractionalFee> fractionalFees, List<RoyaltyFee> royaltyFees) { |
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.
We should add null checks for the lists. While it is ok to have empty lists I would suggest to not all null.
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.
Done
import com.hedera.hashgraph.sdk.TokenId; | ||
import org.jspecify.annotations.Nullable; | ||
|
||
public record FixedFee(long amount, @Nullable AccountId collectorAccountId, @Nullable TokenId denominatingTokenId) { |
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.
NullChecks should be added in constructor.
public record FractionalFee( | ||
long numeratorAmount, | ||
long denominatorAmount, | ||
@Nullable AccountId collectorAccountId, |
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.
NullChecks should be added in constructor.
long numeratorAmount, | ||
long denominatorAmount, | ||
long fallbackFeeAmount, | ||
@Nullable AccountId collectorAccountId, |
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.
NullChecks should be added in constructor.
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.
@Ndacyayisenga-droid can you create an issue once the PR is merged
import com.hedera.hashgraph.sdk.TokenId; | ||
import org.jspecify.annotations.Nullable; | ||
|
||
public record RoyaltyFee( |
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.
@Ndacyayisenga-droid we should check if Hedera provides a documentation for those objects and add a javadoc here (we can create an issue for that)
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.
@Ndacyayisenga-droid we should check if Hedera provides a documentation for those objects and add a javadoc here (we can create an issue for that)
There's hedera documentation for all that actually. I will get an issue once this is merged.
@manishdait that is really great work!!!! Can you please update your branch to remove the current conflict. Happy to merge it as soon as possible |
Signed-off-by: Manish Dait <[email protected]>
Signed-off-by: Manish Dait <[email protected]>
Merged! Thank you so much @manishdait for that great work! |
This pull request introduces the
TokenRepository
interface and its implementation for interacting with the Mirror Node REST API to query token information.Closes: #98