git.delta.rocks / unique-network / refs/commits / 40acebaf25f7

difftreelog

test(refungible) switch to upgraded bulk mint signature

Yaroslav Bolyukin2022-08-04parent: #d22deef.patch.diff
in: master

1 file changed

modifiedtests/src/createMultipleItemsEx.test.tsdiffbeforeafterboth
134 const alice = privateKeyWrapper('//Alice');134 const alice = privateKeyWrapper('//Alice');
135 const bob = privateKeyWrapper('//Bob');135 const bob = privateKeyWrapper('//Bob');
136
137 const users = new Map();
138 users.set(JSON.stringify({Substrate: alice.address}), 50);
139 users.set(JSON.stringify({Substrate: bob.address}), 100);
140136
141 await executeTransaction(api, alice, api.tx.unique.createMultipleItemsEx(collection, {137 await executeTransaction(api, alice, api.tx.unique.createMultipleItemsEx(collection, {
142 Fungible: users,138 Fungible: new Map([
139 [JSON.stringify({Substrate: alice.address}), 50],
140 [JSON.stringify({Substrate: bob.address}), 100],
141 ]),
143 }));142 }));
144143
145 expect(await getBalance(api, collection, alice.address, 0)).to.equal(50n);144 expect(await getBalance(api, collection, alice.address, 0)).to.equal(50n);
153 const alice = privateKeyWrapper('//Alice');152 const alice = privateKeyWrapper('//Alice');
154 const bob = privateKeyWrapper('//Bob');153 const bob = privateKeyWrapper('//Bob');
155
156 const users = new Map();
157 users.set(JSON.stringify({Substrate: alice.address}), 1);
158 users.set(JSON.stringify({Substrate: bob.address}), 2);
159154
160 await executeTransaction(api, alice, api.tx.unique.createMultipleItemsEx(collection, {155 await executeTransaction(api, alice, api.tx.unique.createMultipleItemsEx(collection, {
161 RefungibleMultipleOwners: {156 RefungibleMultipleOwners: {
162 users: users,157 users: new Map([
158 [JSON.stringify({Substrate: alice.address}), 1],
159 [JSON.stringify({Substrate: bob.address}), 2],
160 ]),
163 },161 },
164 }));162 }));
165 163
176 await usingApi(async (api, privateKeyWrapper) => {174 await usingApi(async (api, privateKeyWrapper) => {
177 const alice = privateKeyWrapper('//Alice');175 const alice = privateKeyWrapper('//Alice');
178
179 const item1User = new Map();
180 item1User.set(JSON.stringify({Substrate: alice.address}), 1);
181
182 const item2User = new Map();
183 item2User.set(JSON.stringify({Substrate: alice.address}), 3);
184176
185 await executeTransaction(api, alice, api.tx.unique.createMultipleItemsEx(collection, {177 await executeTransaction(api, alice, api.tx.unique.createMultipleItemsEx(collection, {
186 RefungibleMultipleItems: [178 RefungibleMultipleItems: [
187 {users: item1User},179 {user: {Substrate: alice.address}, pieces: 1},
188 {users: item2User},180 {user: {Substrate: alice.address}, pieces: 3},
189 ],181 ],
190 }));182 }));
191 183