difftreelog
test normalize account id in burnFrom tests
in: master
1 file changed
tests/src/burnItem.test.tsdiffbeforeafterboth166 });166 });167167168168169 it.only('Burn item in Fungible collection', async () => {169 it('Burn item in Fungible collection', async () => {170 const createMode = 'Fungible';170 const createMode = 'Fungible';171 const collectionId = await createCollectionExpectSuccess({mode: {type: createMode, decimalPoints: 0 }});171 const collectionId = await createCollectionExpectSuccess({mode: {type: createMode, decimalPoints: 0 }});172 const tokenId = await createItemExpectSuccess(alice, collectionId, createMode); // Helper creates 10 fungible tokens172 const tokenId = await createItemExpectSuccess(alice, collectionId, createMode); // Helper creates 10 fungible tokens173 await addCollectionAdminExpectSuccess(alice, collectionId, bob);173 await addCollectionAdminExpectSuccess(alice, collectionId, bob);174174175 await usingApi(async (api) => {175 await usingApi(async (api) => {176 // Destroy 1 of 10176 // Destroy 1 of 10177 const tx = api.tx.nft.burnFrom(collectionId, alice.address, tokenId, 1);177 const tx = api.tx.nft.burnFrom(collectionId, normalizeAccountId(alice.address), tokenId, 1);178 const events = await submitTransactionAsync(bob, tx);178 const events = await submitTransactionAsync(bob, tx);179 const result = getGenericResult(events);179 const result = getGenericResult(events);180180188 });188 });189 });189 });190190191 it.only('Burn item in ReFungible collection', async () => {191 it('Burn item in ReFungible collection', async () => {192 const createMode = 'ReFungible';192 const createMode = 'ReFungible';193 const collectionId = await createCollectionExpectSuccess({mode: {type: createMode }});193 const collectionId = await createCollectionExpectSuccess({mode: {type: createMode }});194 const tokenId = await createItemExpectSuccess(alice, collectionId, createMode);194 const tokenId = await createItemExpectSuccess(alice, collectionId, createMode);195 await addCollectionAdminExpectSuccess(alice, collectionId, bob);195 await addCollectionAdminExpectSuccess(alice, collectionId, bob);196196197 await usingApi(async (api) => {197 await usingApi(async (api) => {198 const tx = api.tx.nft.burnFrom(collectionId, alice.address, tokenId, 100);198 const tx = api.tx.nft.burnFrom(collectionId, normalizeAccountId(alice.address), tokenId, 100);199 const events = await submitTransactionAsync(bob, tx);199 const events = await submitTransactionAsync(bob, tx);200 const result = getGenericResult(events);200 const result = getGenericResult(events);201 // Get alice balance201 // Get alice balance