Open
Conversation
3 tasks
HashEngineering
commented
Aug 14, 2023
Comment on lines
+43
to
+52
| private fun compare(a: Any, b: Any?, operator: String): Boolean { | ||
| when (operator) { | ||
| "==" -> { | ||
| return when { | ||
| a is ByteArray && b is ByteArray -> a.contentEquals(b as? ByteArray) | ||
| a is Identifier && b is ByteArray -> a == Identifier.from(b) | ||
| a is ByteArray && b is Identifier -> Identifier.from(a) == b | ||
| else -> a == b | ||
| } | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
We need to support some queries for DashPay.
HashEngineering
commented
Aug 14, 2023
Comment on lines
+85
to
+89
| a is Int && b is Int -> b.toInt() > a.toInt() | ||
| a is Long && b is Long -> b.toLong() > a.toLong() | ||
| a is Int && b is Long -> b.toInt() > a.toLong() | ||
| a is Long && b is Int -> b.toLong() > a.toInt() | ||
| else -> throw throw UnsupportedOperationException("> has unknown operands: " + a.javaClass.name + " and " + b?.javaClass?.name) |
Collaborator
Author
There was a problem hiding this comment.
maybe this is over kill on the Ints and Longs
HashEngineering
commented
Aug 15, 2023
Comment on lines
150
to
151
| private fun loadMockData() { | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
This is where we add mock data. Data is in CBOR format and can be taken from the logs of DashPay.
Currently there are two usernames that are created with profiles in this data. And one ContactRequest.
HashEngineering
commented
Aug 15, 2023
Comment on lines
44
to
48
| var stateRepository = if (mockDAPI()) { | ||
| MockPlatformStateRepository(this) | ||
| } else { | ||
| PlatformStateRepository(this) | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
This is written in a way to easily turn off mocking the data.
Collaborator
Author
|
This won't be merged for now, but instead will become the base branch for the Mocked State Repository. |
* feat: update asset lock handling to v20 * chore: ktlint * fix: update for dashj refactoring
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.
Issue being fixed or feature implemented
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only