public class VerifyCommand implements RegistrationCommand {
+ @Override
+ public String getName() {
+ return "verify";
+ }
+
@Override
public void attachToSubparser(final Subparser subparser) {
+ subparser.help("Verify the number using the code received via SMS or voice.");
subparser.addArgument("verificationCode").help("The verification code you received via sms or voice call.");
subparser.addArgument("-p", "--pin").help("The registration lock PIN, that was set by the user (Optional)");
}
var pin = ns.getString("pin");
try {
- m.verifyAccount(verificationCode, pin);
+ final var manager = m.verifyAccount(verificationCode, pin);
+ manager.close();
} catch (LockedException e) {
throw new UserErrorException(
"Verification failed! This number is locked with a pin. Hours remaining until reset: "