From cd2a8fcd662d245094bded0e41651473913076cf Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Wed, 27 Jan 2021 09:54:31 +0000 Subject: [PATCH] tests: isWhitelisted helper --- --- a/tests/src/util/helpers.ts +++ b/tests/src/util/helpers.ts @@ -651,6 +651,14 @@ }); } +export async function isWhitelisted(collectionId: number, address: string) { + let whitelisted: boolean = false; + await usingApi(async (api) => { + whitelisted = (await api.query.nft.whiteList(collectionId, address)).toJSON() as unknown as boolean; + }); + return whitelisted; +} + export async function addToWhiteListExpectSuccess(sender: IKeyringPair, collectionId: number, address: string) { await usingApi(async (api) => { -- gitstuff