From f67a27eeeaef11732cdbb6a6ce6ebcfdd2af2919 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Wed, 9 Feb 2022 11:40:56 +0100 Subject: [PATCH] Add missing deployment slot check for verifiable build badge (#23032) --- .../account/UpgradeableLoaderAccountSection.tsx | 8 ++++++-- explorer/src/components/common/VerifiedBadge.tsx | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/explorer/src/components/account/UpgradeableLoaderAccountSection.tsx b/explorer/src/components/account/UpgradeableLoaderAccountSection.tsx index 37e1ef4a36..4b97a77b08 100644 --- a/explorer/src/components/account/UpgradeableLoaderAccountSection.tsx +++ b/explorer/src/components/account/UpgradeableLoaderAccountSection.tsx @@ -135,8 +135,12 @@ export function UpgradeableProgramSection({ ) : ( <> - {verifiableBuilds.map((b) => ( - + {verifiableBuilds.map((b, i) => ( + ))} )} diff --git a/explorer/src/components/common/VerifiedBadge.tsx b/explorer/src/components/common/VerifiedBadge.tsx index 331ebfe63a..682942b58f 100644 --- a/explorer/src/components/common/VerifiedBadge.tsx +++ b/explorer/src/components/common/VerifiedBadge.tsx @@ -2,10 +2,12 @@ import { VerifiableBuild } from "utils/program-verification"; export function VerifiedBadge({ verifiableBuild, + deploySlot, }: { verifiableBuild: VerifiableBuild; + deploySlot: number; }) { - if (verifiableBuild && verifiableBuild.verified_slot) { + if (verifiableBuild && verifiableBuild.verified_slot === deploySlot) { return (