--- a/tests/src/util/playgrounds/unique.ts +++ b/tests/src/util/playgrounds/unique.ts @@ -3119,9 +3119,9 @@ async getTokenPropertiesConsumedSpace(tokenId: number): Promise { const api = this.helper.getApi(); - const props = (await api.query.nonfungible.tokenProperties(this.collectionId, tokenId)).toJSON(); + const props = (await api.query.nonfungible.tokenProperties(this.collectionId, tokenId)).toJSON() as any; - return (props != null) ? (props as any).consumedSpace : 0; + return props?.consumedSpace ?? 0; } async transferToken(signer: TSigner, tokenId: number, addressObj: ICrossAccountId) { @@ -3224,9 +3224,9 @@ async getTokenPropertiesConsumedSpace(tokenId: number): Promise { const api = this.helper.getApi(); - const props = (await api.query.refungible.tokenProperties(this.collectionId, tokenId)).toJSON(); + const props = (await api.query.refungible.tokenProperties(this.collectionId, tokenId)).toJSON() as any; - return (props != null) ? (props as any).consumedSpace : 0; + return props?.consumedSpace ?? 0; } async transferToken(signer: TSigner, tokenId: number, addressObj: ICrossAccountId, amount = 1n) {