From 357b65b5879d77c7e9d45e766ddd2c1ebddaa379 Mon Sep 17 00:00:00 2001 From: HeesungB Date: Sat, 17 Dec 2022 01:25:10 +0900 Subject: [PATCH] Fix verification check logic --- messages/icns.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/messages/icns.ts b/messages/icns.ts index c502b63..50108f7 100644 --- a/messages/icns.ts +++ b/messages/icns.ts @@ -9,6 +9,18 @@ export const makeClaimMessage = ( verificationList: any[], referral?: string, ): CosmwasmExecuteMessageResult => { + verificationList = verificationList.filter((verification) => { + if (verification.status !== "fulfilled") { + console.log("verification", verification); + } + + return verification.status === "fulfilled"; + }); + + if (verificationList.length === 0) { + throw new Error("Verifications rejected all"); + } + return makeCosmwasmExecMsg( senderAddress, REGISTRAR_ADDRESS,