refactor: Simplify set/get field call to use existing variable (#6534)

The `setFieldU32` call is currently used to set the credential's expiry using a `getFieldU32` call to obtain the expiration time. However, that value was already obtained previously and can thus be reused.
This commit is contained in:
Mayukha Vadari
2026-03-13 09:53:44 -04:00
committed by GitHub
parent c1d108e565
commit 7a3bf1692d

View File

@@ -107,7 +107,7 @@ CredentialCreate::doApply()
return tecEXPIRED;
}
sleCred->setFieldU32(sfExpiration, ctx_.tx.getFieldU32(sfExpiration));
sleCred->setFieldU32(sfExpiration, *optExp);
}
auto const sleIssuer = view().peek(keylet::account(account_));