Skip to content

Commit 676f832

Browse files
committed
Support for CVS Health Credentials
1 parent ae7cd8b commit 676f832

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

app/components/SHCCard.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ const VACCINE_CODES = {
114114
801 : "AS03 adjuvant"
115115
}
116116

117+
const TRUST_REGISTRY = {
118+
"https://myvaccinerecord.cdph.ca.gov/creds": "State of California",
119+
"https://api.cvshealth.com/smarthealth/v1/card": "CVS Health",
120+
}
117121

118122
export default class SHCCard extends Component {
119123

@@ -138,8 +142,9 @@ export default class SHCCard extends Component {
138142
}
139143

140144
issuerName = (card) => {
141-
if (card.pub_key.toLowerCase() === "https://myvaccinerecord.cdph.ca.gov/creds")
142-
return "State of California"
145+
if (TRUST_REGISTRY[card.pub_key.toLowerCase()]) {
146+
return TRUST_REGISTRY[card.pub_key.toLowerCase()]
147+
}
143148
return card.pub_key.toLowerCase();
144149
}
145150

0 commit comments

Comments
 (0)