-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
We should implement more comprehensive flag checks as preconditions in each Transaction builder.
For example, #690 introduce the ability to get TransactionFlags from the Transaction interface. To be fully correct, we would want to add precondition checks to each Transaction sub-class to make sure that transactions with the tfInnerTransaction flag didn't also include a signature, like this:
@Value.Check
default void vaidateInner(){
if (flags().tfInnerBatchTxn()) {
Preconditions.checkArgument(this.transactionSignature().isEmpty(),
"Inner transaction must not have a transaction signature."
);
Preconditions.checkArgument(this.signingPublicKey().equals(PublicKey.EMPTY_PUBLIC_KEY),
"Inner transaction must not have a signing public key."
);
}
}In addition, there are other flag checks that we might want to introduce additional checks around flags that are not allowed in OfferCreate. See the checks in xrpl-js for VaultCreate or the checks in NFTokenCreateOffers where xrpl-js checks certain conditions that xrpl4j does not.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels