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

difftreelog

chore add `await` for `usingEthPlaygrounds`

Grigoriy Simonov2022-10-25parent: #4c88a15.patch.diff
in: master

1 file changed

modifiedtests/src/eth/collectionProperties.test.tsdiffbeforeafterboth
164});164});
165165
166describe('EVM collection property', () => {166describe('EVM collection property', () => {
167 let alice: IKeyringPair;167 let donor: IKeyringPair;
168168
169 before(() => {169 before(async function() {
170 usingEthPlaygrounds(async (_helper, privateKey) => {170 await usingEthPlaygrounds(async (_helper, privateKey) => {
171 alice = await privateKey('//Alice');171 donor = await privateKey({filename: __filename});
172 });172 });
173 });173 });
174174
175 async function testSetReadProperties(helper: EthUniqueHelper, mode: TCollectionMode) {175 async function testSetReadProperties(helper: EthUniqueHelper, mode: TCollectionMode) {
176 const collection = await helper[mode].mintCollection(alice, {name: 'A', description: 'B', tokenPrefix: 'C'});176 const collection = await helper[mode].mintCollection(donor, {name: 'A', description: 'B', tokenPrefix: 'C'});
177177
178 const sender = await helper.eth.createAccountWithBalance(alice, 100n);178 const sender = await helper.eth.createAccountWithBalance(donor, 100n);
179 await collection.addAdmin(alice, {Ethereum: sender});179 await collection.addAdmin(donor, {Ethereum: sender});
180180
181 const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);181 const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
182 const contract = helper.ethNativeContract.collection(collectionAddress, mode, sender);182 const contract = helper.ethNativeContract.collection(collectionAddress, mode, sender);
204 });204 });
205205
206 async function testDeleteProperties(helper: EthUniqueHelper, mode: TCollectionMode) {206 async function testDeleteProperties(helper: EthUniqueHelper, mode: TCollectionMode) {
207 const collection = await helper[mode].mintCollection(alice, {name: 'A', description: 'B', tokenPrefix: 'C'});207 const collection = await helper[mode].mintCollection(donor, {name: 'A', description: 'B', tokenPrefix: 'C'});
208208
209 const sender = await helper.eth.createAccountWithBalance(alice, 100n);209 const sender = await helper.eth.createAccountWithBalance(donor, 100n);
210 await collection.addAdmin(alice, {Ethereum: sender});210 await collection.addAdmin(donor, {Ethereum: sender});
211211
212 const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);212 const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId);
213 const contract = helper.ethNativeContract.collection(collectionAddress, mode, sender);213 const contract = helper.ethNativeContract.collection(collectionAddress, mode, sender);