Browse Source

fix linting

split_build_process
Trent Larson 4 weeks ago
parent
commit
40382157f9
  1. 14
      src/views/ClaimCertificateView.vue

14
src/views/ClaimCertificateView.vue

@ -162,13 +162,18 @@ export default class ClaimCertificateView extends Vue {
);
}
if (claimData.claim.object?.amountOfThisGood && claimData.claim.object?.unitCode) {
if (
claimData.claim.object?.amountOfThisGood &&
claimData.claim.object?.unitCode
) {
const amount = claimData.claim.object.amountOfThisGood;
const unit = claimData.claim.object.unitCode;
const amountText = serverUtil.displayAmount(unit, amount);
const amountWidth = ctx.measureText(amountText).width;
// if there was no description then put this in that spot, otherwise put it below the description
const yPos = descriptionText ? CANVAS_HEIGHT * 0.525 : CANVAS_HEIGHT * 0.495;
const yPos = descriptionText
? CANVAS_HEIGHT * 0.525
: CANVAS_HEIGHT * 0.495;
ctx.font = "14px Arial";
ctx.fillText(amountText, (CANVAS_WIDTH - amountWidth) / 2, yPos);
}
@ -176,7 +181,10 @@ export default class ClaimCertificateView extends Vue {
// Draw claim issuer & recipient
if (claimData.issuer) {
ctx.font = "14px Arial";
let fullIssuer = serverUtil.didInfoForCertificate(claimData.issuer, allContacts);
let fullIssuer = serverUtil.didInfoForCertificate(
claimData.issuer,
allContacts,
);
if (fullIssuer.length > 15) {
fullIssuer = fullIssuer.substring(0, 30) + "...";
}

Loading…
Cancel
Save