difftreelog
fix PR commets
in: master
4 files changed
tests/src/eth/nativeFungible.test.tsdiffbeforeafterboth24 before(async function() {24 before(async function() {25 await usingEthPlaygrounds(async (helper, privateKey) => {25 await usingEthPlaygrounds(async (helper, privateKey) => {26 donor = await privateKey({url: import.meta.url});26 donor = await privateKey({url: import.meta.url});27 // [alice] = await helper.arrange.createAccounts([30n], donor);28 });27 });29 });28 });3029101 const balanceReceiverAfter = await helper.balance.getEthereum(receiver);100 const balanceReceiverAfter = await helper.balance.getEthereum(receiver);102101103 expect(balanceOwnerBefore - 50n > balanceOwnerAfter).to.be.true;102 expect(balanceOwnerBefore - 50n > balanceOwnerAfter).to.be.true;104 expect(balanceReceiverBefore === balanceReceiverAfter - 50n).to.be.true;103 expect(balanceReceiverBefore + 50n).to.be.equal(balanceReceiverAfter);105 });104 });106105107 itEth('transferFrom()', async ({helper}) => {106 itEth('transferFrom()', async ({helper}) => {131 before(async function() {130 before(async function() {132 await usingEthPlaygrounds(async (helper, privateKey) => {131 await usingEthPlaygrounds(async (helper, privateKey) => {133 donor = await privateKey({url: import.meta.url});132 donor = await privateKey({url: import.meta.url});134 // [alice] = await helper.arrange.createAccounts([30n], donor);135 });133 });136 });134 });137135tests/src/eth/util/playgrounds/unique.dev.tsdiffbeforeafterboth--- a/tests/src/eth/util/playgrounds/unique.dev.ts
+++ b/tests/src/eth/util/playgrounds/unique.dev.ts
@@ -142,7 +142,7 @@
async collection(address: string, mode: TCollectionMode, caller?: string, mergeDeprecated = false) {
let abi;
- if (address === '0x17C4e6453cC49aaAAEaCA894E6d9683e00000000') {
+ if (address === this.helper.ethAddress.fromCollectionId(0)) {
abi = nativeFungibleAbi;
} else {
abi ={
tests/src/sub/nesting/common.test.tsdiffbeforeafterboth--- a/tests/src/sub/nesting/common.test.ts
+++ b/tests/src/sub/nesting/common.test.ts
@@ -103,7 +103,7 @@
nesting: {tokenOwner: true, restricted: testCase.restrictedMode ? [collectionForNesting.collectionId] : null},
});
- // Alice can mint and nest token:
+ // Bob can nest Native FT into their NFT:
await collectionForNesting.transfer(bob, targetTokenBob.nestingAccount(), 50n);
expect(await collectionForNesting.getBalance(targetTokenBob.nestingAccount())).eq(50n);
});
tests/src/sub/nesting/nesting.negative.test.tsdiffbeforeafterboth--- a/tests/src/sub/nesting/nesting.negative.test.ts
+++ b/tests/src/sub/nesting/nesting.negative.test.ts
@@ -69,7 +69,7 @@
? collectionForNesting.mint(alice, 100n, targetToken.nestingAccount())
: collectionForNesting.transfer(alice, targetToken.nestingAccount(), 100n)).to.be.rejectedWith('common.UserIsNotAllowedToNest');
- // Alice can mint and nest token:
+ // Alice can't mint and nest tokens:
if (testCase.mode === 'ft') {
await collectionForNesting.mint(alice, 100n);
}
@@ -100,7 +100,7 @@
case 'nft': nestedTokenBob = await (nestedCollectionBob as UniqueNFTCollection).mintToken(bob); break;
case 'rft': nestedTokenBob = await (nestedCollectionBob as UniqueRFTCollection).mintToken(bob, 100n); break;
case 'ft': await (nestedCollectionBob as UniqueFTCollection).mint(bob, 100n); break;
- case 'native ft': break;
+ case 'native ft': await expect((nestedCollectionBob as UniqueFTCollection).mint(bob, 100n)).to.be.rejectedWith('common.UnsupportedOperation'); break;
}
// Bob non-owner of targetToken and non admin of targetCollection, so
@@ -109,7 +109,7 @@
case 'nft': await expect((nestedCollectionBob as UniqueNFTCollection).mintToken(bob, targetToken.nestingAccount())).to.be.rejectedWith('common.UserIsNotAllowedToNest'); break;
case 'rft': await expect((nestedCollectionBob as UniqueRFTCollection).mintToken(bob, 100n, targetToken.nestingAccount())).to.be.rejectedWith('common.UserIsNotAllowedToNest'); break;
case 'ft': await expect((nestedCollectionBob as UniqueFTCollection).mint(bob, 100n, targetToken.nestingAccount())).to.be.rejectedWith('common.UserIsNotAllowedToNest'); break;
- case 'native ft': break;
+ case 'native ft': await expect((nestedCollectionBob as UniqueFTCollection).mint(bob, 100n, targetToken.nestingAccount())).to.be.rejectedWith('common.UnsupportedOperation'); break;
}
// 2. cannot nest existing token: