git.delta.rocks / unique-network / refs/commits / da2e878d93b2

difftreelog

fix properties consumed space tests

Daniel Shiposha2023-10-12parent: #5ec9dbe.patch.diff
in: master

1 file changed

modifiedtests/src/util/playgrounds/unique.tsdiffbeforeafterboth
3121 const api = this.helper.getApi();3121 const api = this.helper.getApi();
3122 const props = (await api.query.nonfungible.tokenProperties(this.collectionId, tokenId)).toJSON();3122 const props = (await api.query.nonfungible.tokenProperties(this.collectionId, tokenId)).toJSON();
31233123
3124 return (props! as any).consumedSpace;3124 return (props != null) ? (props as any).consumedSpace : 0;
3125 }3125 }
31263126
3127 async transferToken(signer: TSigner, tokenId: number, addressObj: ICrossAccountId) {3127 async transferToken(signer: TSigner, tokenId: number, addressObj: ICrossAccountId) {
3226 const api = this.helper.getApi();3226 const api = this.helper.getApi();
3227 const props = (await api.query.refungible.tokenProperties(this.collectionId, tokenId)).toJSON();3227 const props = (await api.query.refungible.tokenProperties(this.collectionId, tokenId)).toJSON();
32283228
3229 return (props! as any).consumedSpace;3229 return (props != null) ? (props as any).consumedSpace : 0;
3230 }3230 }
32313231
3232 async transferToken(signer: TSigner, tokenId: number, addressObj: ICrossAccountId, amount = 1n) {3232 async transferToken(signer: TSigner, tokenId: number, addressObj: ICrossAccountId, amount = 1n) {