Merge branch 'boltcard:main' into main

This commit is contained in:
chloehjung15 2023-02-03 10:54:12 +13:00 committed by GitHub
commit 3c84738750
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,7 @@ func db_get_card_count_for_uid(uid string) (int, error) {
} }
defer db.Close() defer db.Close()
sqlStatement := `select count(card_id) from cards where uid=$1;` sqlStatement := `select count(card_id) from cards where uid=$1 AND wiped='N';`
row := db.QueryRow(sqlStatement, uid) row := db.QueryRow(sqlStatement, uid)
err = row.Scan(&card_count) err = row.Scan(&card_count)
@ -307,7 +307,7 @@ func db_get_card_from_uid(card_uid string) (*card, error) {
sqlStatement := `SELECT card_id, k2_cmac_key, uid,` + sqlStatement := `SELECT card_id, k2_cmac_key, uid,` +
` last_counter_value, lnurlw_request_timeout_sec,` + ` last_counter_value, lnurlw_request_timeout_sec,` +
` lnurlw_enable, tx_limit_sats, day_limit_sats` + ` lnurlw_enable, tx_limit_sats, day_limit_sats` +
` FROM cards WHERE uid=$1;` ` FROM cards WHERE uid=$1 AND wiped='N';`
row := db.QueryRow(sqlStatement, card_uid) row := db.QueryRow(sqlStatement, card_uid)
err = row.Scan( err = row.Scan(
&c.card_id, &c.card_id,