difftreelog
Fix tests
in: master
3 files changed
tests/src/eth/collectionAdmin.test.tsdiffbeforeafterboth--- a/tests/src/eth/collectionAdmin.test.ts
+++ b/tests/src/eth/collectionAdmin.test.ts
@@ -51,7 +51,7 @@
.send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const newAdmin = privateKey('//Alice');
+ const newAdmin = privateKeyWrapper('//Alice');
const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();
@@ -180,7 +180,7 @@
.send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const newAdmin = privateKey('//Alice');
+ const newAdmin = privateKeyWrapper('//Alice');
const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
await collectionEvm.methods.addCollectionAdminSubstrate(newAdmin.addressRaw).send();
{
@@ -255,7 +255,7 @@
.send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const adminSub = privateKey('//Alice');
+ const adminSub = privateKeyWrapper('//Alice');
const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();
const adminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
@@ -280,7 +280,7 @@
.send();
const {collectionIdAddress, collectionId} = await getCollectionAddressFromResult(api, result);
- const adminSub = privateKey('//Alice');
+ const adminSub = privateKeyWrapper('//Alice');
const collectionEvm = evmCollection(web3, owner, collectionIdAddress);
await collectionEvm.methods.addCollectionAdminSubstrate(adminSub.addressRaw).send();
const notAdminEth = await createEthAccountWithBalance(api, web3, privateKeyWrapper);
tests/src/nesting/graphs.test.tsdiffbeforeafterboth13 * ```13 * ```14 */14 */15async function buildComplexObjectGraph(api: ApiPromise, sender: IKeyringPair): Promise<number> {15async function buildComplexObjectGraph(api: ApiPromise, sender: IKeyringPair): Promise<number> {16 const events = await executeTransaction(api, sender, api.tx.unique.createCollectionEx({mode: 'NFT', permissions: {nesting: 'Owner'}}));16 const events = await executeTransaction(api, sender, api.tx.unique.createCollectionEx({mode: 'NFT', permissions: {nesting: {tokenOwner: true}}}));17 const {collectionId} = getCreateCollectionResult(events);17 const {collectionId} = getCreateCollectionResult(events);181819 await executeTransaction(api, sender, api.tx.unique.createMultipleItemsEx(collectionId, {NFT: Array(8).fill({owner: {Substrate: sender.address}})}));19 await executeTransaction(api, sender, api.tx.unique.createMultipleItemsEx(collectionId, {NFT: Array(8).fill({owner: {Substrate: sender.address}})}));tests/src/nesting/rules-smoke.test.tsdiffbeforeafterboth--- a/tests/src/nesting/rules-smoke.test.ts
+++ b/tests/src/nesting/rules-smoke.test.ts
@@ -27,11 +27,11 @@
await usingApi(async api => {
const collection = await createCollectionExpectSuccess({mode: {type: 'Fungible',decimalPoints:0}});
await expect(executeTransaction(api, alice, api.tx.unique.createItem(collection, nestTarget, {Fungible: {Value: 1}})))
- .to.be.rejectedWith(/^common\.SourceCollectionIsNotAllowedToNest$/);
+ .to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
await createFungibleItemExpectSuccess(alice, collection, {Value:1n}, {Substrate: alice.address});
await expect(executeTransaction(api, alice, api.tx.unique.transfer(nestTarget, collection, 0, 1n)))
- .to.be.rejectedWith(/^common\.SourceCollectionIsNotAllowedToNest$/);
+ .to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
});
});
@@ -39,11 +39,11 @@
await usingApi(async api => {
const collection = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
await expect(executeTransaction(api, alice, api.tx.unique.createItem(collection, nestTarget, {NFT: {properties: []}})))
- .to.be.rejectedWith(/^common\.SourceCollectionIsNotAllowedToNest$/);
+ .to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
const token = await createItemExpectSuccess(alice, collection, 'NFT', {Substrate: alice.address});
await expect(executeTransaction(api, alice, api.tx.unique.transfer(nestTarget, collection, token, 1n)))
- .to.be.rejectedWith(/^common\.SourceCollectionIsNotAllowedToNest$/);
+ .to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
});
});
@@ -51,11 +51,11 @@
await usingApi(async api => {
const collection = await createCollectionExpectSuccess({mode: {type: 'ReFungible'}});
await expect(executeTransaction(api, alice, api.tx.unique.createItem(collection, nestTarget, {ReFungible: {}})))
- .to.be.rejectedWith(/^common\.SourceCollectionIsNotAllowedToNest$/);
+ .to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
const token = await createItemExpectSuccess(alice, collection, 'ReFungible', {Substrate: alice.address});
await expect(executeTransaction(api, alice, api.tx.unique.transfer(nestTarget, collection, token, 1n)))
- .to.be.rejectedWith(/^common\.SourceCollectionIsNotAllowedToNest$/);
+ .to.be.rejectedWith(/^common\.UserIsNotAllowedToNest$/);
});
});
});