Skip to content

Commit 90e1d6b

Browse files
committed
Update error message, fix virtual destructor
1 parent 6259131 commit 90e1d6b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

include/tap_protocol/cktapcard.h

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class CKTapCard {
2323
public:
2424
explicit CKTapCard(std::unique_ptr<Transport> transport,
2525
bool first_look = true);
26+
virtual ~CKTapCard() = default;
2627

2728
friend std::unique_ptr<Tapsigner> ToTapsigner(CKTapCard&& cktapcard);
2829
friend std::unique_ptr<Satscard> ToSatscard(CKTapCard&& cktapcard);

src/tapsigner.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Tapsigner::ChangeResponse Tapsigner::Change(const std::string& new_cvc,
171171
const std::string& cvc) {
172172
if (new_cvc.size() < 6 || new_cvc.size() > 32) {
173173
throw TapProtoException(TapProtoException::INVALID_CVC_LENGTH,
174-
"Invalid cvc length");
174+
"PIN must be between 6 and 32 digits.");
175175
}
176176
const auto [_, resp] = SendAuth(
177177
{

src/utils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ XCVC CalcXCVC(const Bytes &cmd, const nlohmann::json::binary_t &card_nonce,
4040
const nlohmann::json::binary_t &his_pubkey, const Bytes &cvc) {
4141
if (cvc.size() < 6 || cvc.size() > 32) {
4242
throw TapProtoException(TapProtoException::INVALID_CVC_LENGTH,
43-
"Invalid cvc length");
43+
"PIN must be between 6 and 32 digits.");
4444
}
4545

4646
const auto [my_privkey, my_pubkey] = CT_pick_keypair();

0 commit comments

Comments
 (0)