Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Neeharika-Sompalli <neeharika.sompalli@swirldslabs.com>
  • Loading branch information
Neeharika-Sompalli committed May 23, 2023
1 parent 773c5fb commit 28c271b
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -144,16 +144,17 @@ public CryptoCreateRecordBuilder newRecordBuilder() {
@Override
public void pureChecks(@NonNull final TransactionBody txn) throws PreCheckException {
final var op = txn.cryptoCreateAccountOrThrow();
validateTruePreCheck(op.initialBalance() < 0L, INVALID_INITIAL_BALANCE);
validateTruePreCheck(!op.hasAutoRenewPeriod(), INVALID_RENEWAL_PERIOD);
validateTruePreCheck(op.initialBalance() >= 0L, INVALID_INITIAL_BALANCE);
validateTruePreCheck(op.hasAutoRenewPeriod(), INVALID_RENEWAL_PERIOD);
validateTruePreCheck(
op.sendRecordThreshold() < 0L, INVALID_SEND_RECORD_THRESHOLD); // FUTURE: should this return
op.sendRecordThreshold() >= 0L, INVALID_SEND_RECORD_THRESHOLD); // FUTURE: should this return
// SEND_RECORD_THRESHOLD_FIELD_IS_DEPRECATED
validateTruePreCheck(
op.receiveRecordThreshold() < 0L, INVALID_RECEIVE_RECORD_THRESHOLD); // FUTURE: should this return
op.receiveRecordThreshold() >= 0L, INVALID_RECEIVE_RECORD_THRESHOLD); // FUTURE: should this return
// RECEIVE_RECORD_THRESHOLD_FIELD_IS_DEPRECATED
validateTruePreCheck(
op.hasProxyAccountID() && !op.proxyAccountID().equals(AccountID.DEFAULT),
!op.hasProxyAccountID()
|| (op.hasProxyAccountID() && op.proxyAccountID().equals(AccountID.DEFAULT)),
PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED);
}

Expand Down

0 comments on commit 28c271b

Please sign in to comment.