difftreelog
Test updated
in: master
1 file changed
tests/src/transfer.test.tsdiffbeforeafterboth27 transferFromExpectSuccess,27 transferFromExpectSuccess,28} from './util/helpers';28} from './util/helpers';29import {29import {30 createEthAccountWithBalance,31 subToEth,30 subToEth,32 itWeb3, 31 itWeb3, 33} from './eth/util/helpers';32} from './eth/util/helpers';300 });299 });301});300});302301303describe('Transfers to self (potentially over substrate-evm boundary)', () => {302describe.only('Transfers to self (potentially over substrate-evm boundary)', () => {304 itWeb3('Transfers to self. In case of same frontend', async ({api}) => {303 itWeb3('Transfers to self. In case of same frontend', async ({api}) => {305 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});304 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});306 const alice = privateKey('//Alice');305 const alice = privateKey('//Alice');307 const aliceProxy = subToEth(alice.address);306 const aliceProxy = subToEth(alice.address);308 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});307 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});309 const balanceAliceBefore = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);310 await transferExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy} , 10, 'ReFungible');308 await transferExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy}, 10, 'ReFungible');309 const balanceAliceBefore = await getTokenBalance(api, collectionId, {Ethereum: aliceProxy}, tokenId);311 await transferFromExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy}, alice, 10, 'ReFungible');310 await transferFromExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy}, {Ethereum: aliceProxy}, 10, 'ReFungible');312 const balanceAliceAfter = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);311 const balanceAliceAfter = await getTokenBalance(api, collectionId, {Ethereum: aliceProxy}, tokenId);313 expect(balanceAliceBefore).to.be.eq(balanceAliceAfter);312 expect(balanceAliceBefore).to.be.eq(balanceAliceAfter);314 });313 });315314316 itWeb3('Transfers to self. In case of substrate-evm boundary', async ({api, web3}) => {315 itWeb3('Transfers to self. In case of substrate-evm boundary', async ({api}) => {317 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});316 const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});318 const alice = privateKey('//Alice');317 const alice = privateKey('//Alice');319 const aliceProxy = await createEthAccountWithBalance(api, web3);318 const aliceProxy = subToEth(alice.address);320 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});319 const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});321 const balanceAliceBefore = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);320 const balanceAliceBefore = await getTokenBalance(api, collectionId, normalizeAccountId(alice), tokenId);322 await transferExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy} , 10, 'ReFungible');321 await transferExpectSuccess(collectionId, tokenId, alice, {Ethereum: aliceProxy} , 10, 'ReFungible');