Conversation
# Conflicts: # xrpl4j-core/src/main/resources/definitions.json
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/Permission.java
Outdated
Show resolved
Hide resolved
| /** | ||
| * Set of transaction types that cannot be delegated. | ||
| */ | ||
| Set<String> NON_DELEGABLE_TRANSACTIONS = Sets.newHashSet( |
There was a problem hiding this comment.
We should use TransactionType enum so that string value remains consistent.
There was a problem hiding this comment.
I'm not seeing this fix implemented. Can we keep comments unresolved until they're pushed (to aid in code review)?
There was a problem hiding this comment.
There was a problem hiding this comment.
I resolved this because the values were at least using TransactionType enum to get string value. But, yes we should do this - Set<TransactionType> NON_DELEGABLE_TRANSACTIONS
There was a problem hiding this comment.
Updated to use Set NON_DELEGABLE_TRANSACTIONS
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/DelegateSet.java
Show resolved
Hide resolved
| transactionWithSignature = CredentialDelete.builder().from((CredentialDelete) transaction) | ||
| .transactionSignature(signature) | ||
| .build(); | ||
| } else if (DelegateSet.class.isAssignableFrom(transaction.getClass())) { |
There was a problem hiding this comment.
nit: Since we are adding tests in SignatureUtilsTest for all transaction types, we should add it for DelegateSet.
There was a problem hiding this comment.
I see this comment as resolved, but when I run SignatureUtilsTest.java with coverage, it shows this as still uncovered.
There was a problem hiding this comment.
Added coverage for this line and reran tests with coverage to confirm
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/ledger/DelegateObject.java
Show resolved
Hide resolved
xrpl4j-integration-tests/src/test/java/org/xrpl/xrpl4j/tests/DelegateSetIT.java
Show resolved
Hide resolved
* Introduce `transactionFlags()` in a manner that doesn’t break immutables. * Add unit tests to all transactions to verify functionality. * Note this addition is required for Batch functionality to verify inner transaction flags in a generic manner.
First of three PRs for adding support for Batch transactions (XLS-56) * Update tfInnerBatchTxn to all transactions * Increase coverage of BatchFlags
…r permission object with different string vals
xrpl4j-integration-tests/src/test/java/org/xrpl/xrpl4j/tests/DelegateSetIT.java
Outdated
Show resolved
Hide resolved
...-core/src/main/java/org/xrpl/xrpl4j/codec/binary/definitions/DefaultDefinitionsProvider.java
Outdated
Show resolved
Hide resolved
...-core/src/main/java/org/xrpl/xrpl4j/codec/binary/definitions/DefaultDefinitionsProvider.java
Outdated
Show resolved
Hide resolved
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/codec/binary/types/UInt32Type.java
Outdated
Show resolved
Hide resolved
| * change.</p> | ||
| */ | ||
| @Beta | ||
| BATCH("Batch"), |
There was a problem hiding this comment.
Note: This branch was updated via GH to pull-in changes from main. Because Batch is now in main, this enum is a duplicate, and breaks the build. We'll want to remove this one to get the build working.
There was a problem hiding this comment.
Removed enum
…lign with enum, removed package-lock, removed beta batch (becuse batch now in main)
…t metaledger changes
… to those changes
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/ledger/LedgerObject.java
Outdated
Show resolved
Hide resolved
…issue, added Delegate to LedgerEntryRequestParams and associated tests
Patel-Raj11
left a comment
There was a problem hiding this comment.
Looks good for beta release.
...-core/src/main/java/org/xrpl/xrpl4j/codec/binary/definitions/DefaultDefinitionsProvider.java
Show resolved
Hide resolved
...-core/src/main/java/org/xrpl/xrpl4j/codec/binary/definitions/DefaultDefinitionsProvider.java
Show resolved
Hide resolved
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/DelegateSet.java
Outdated
Show resolved
Hide resolved
xrpl4j-core/src/test/java/org/xrpl/xrpl4j/model/transactions/json/DelegateSetJsonTest.java
Show resolved
Hide resolved
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/DelegateSet.java
Show resolved
Hide resolved
| /** | ||
| * Set of transaction types that cannot be delegated. | ||
| */ | ||
| Set<String> NON_DELEGABLE_TRANSACTIONS = Sets.newHashSet( |
There was a problem hiding this comment.
I'm not seeing this fix implemented. Can we keep comments unresolved until they're pushed (to aid in code review)?
xrpl4j-core/src/test/java/org/xrpl/xrpl4j/model/ledger/DelegateObjectJsonTest.java
Outdated
Show resolved
Hide resolved
xrpl4j-core/src/test/java/org/xrpl/xrpl4j/model/transactions/DelegateSetTest.java
Show resolved
Hide resolved
| @Test | ||
| public void testAllNonDelegatableTransactionTypesWithEnum() { | ||
| // Test all non-delegatable transaction types using TransactionType enum | ||
| TransactionType[] nonDelegatableTypes = { |
There was a problem hiding this comment.
Should we instead reuse DelegateSet#NON_DELEGABLE_TRANSACTIONS here?
Overall, I worry too about future transaction added to the library that eventually become untested, either here or in testAllDelegatableTransactionTypes. Maybe we should first take all transactions in the enum, and remove the undelegateble ones? That way, if anyone adds a new TransactionType in the future, it will get included in here automatically.
WDYT?
There was a problem hiding this comment.
Test now takes all TransactionType vals
As of now, new delegable transaction types just need to be added to the TransactionType enum. Adding non delegable transactions just involves an additional change to a single file so I think the current implementation is fine.
xrpl4j-integration-tests/src/test/java/org/xrpl/xrpl4j/tests/DelegateIT.java
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #689 +/- ##
============================================
+ Coverage 92.91% 92.99% +0.07%
- Complexity 2220 2265 +45
============================================
Files 437 443 +6
Lines 6025 6135 +110
Branches 536 549 +13
============================================
+ Hits 5598 5705 +107
- Misses 279 281 +2
- Partials 148 149 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: David Fuelling <sappenin@gmail.com>
xrpl4j-bom/pom.xml
Outdated
| <artifactId>xrpl4j-parent</artifactId> | ||
| <groupId>org.xrpl</groupId> | ||
| <version>HEAD-SNAPSHOT</version> | ||
| <version>HEAD-SNAPSOT</version> |
Adds support for account permission delegation (XLS-0075)