Fix verification check logic

This commit is contained in:
HeesungB 2022-12-17 01:25:10 +09:00
parent 0944e5c175
commit 357b65b587

View File

@ -9,6 +9,18 @@ export const makeClaimMessage = (
verificationList: any[], verificationList: any[],
referral?: string, referral?: string,
): CosmwasmExecuteMessageResult => { ): 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( return makeCosmwasmExecMsg(
senderAddress, senderAddress,
REGISTRAR_ADDRESS, REGISTRAR_ADDRESS,