difftreelog
test(refungible) switch to upgraded bulk mint signature
in: master
1 file changed
tests/src/createMultipleItemsEx.test.tsdiffbeforeafterboth134 const alice = privateKeyWrapper('//Alice');134 const alice = privateKeyWrapper('//Alice');135 const bob = privateKeyWrapper('//Bob');135 const bob = privateKeyWrapper('//Bob');136137 const users = new Map();138 users.set(JSON.stringify({Substrate: alice.address}), 50);139 users.set(JSON.stringify({Substrate: bob.address}), 100);140136141 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 }));144143145 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');155156 const users = new Map();157 users.set(JSON.stringify({Substrate: alice.address}), 1);158 users.set(JSON.stringify({Substrate: bob.address}), 2);159154160 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 163176 await usingApi(async (api, privateKeyWrapper) => {174 await usingApi(async (api, privateKeyWrapper) => {177 const alice = privateKeyWrapper('//Alice');175 const alice = privateKeyWrapper('//Alice');178179 const item1User = new Map();180 item1User.set(JSON.stringify({Substrate: alice.address}), 1);181182 const item2User = new Map();183 item2User.set(JSON.stringify({Substrate: alice.address}), 3);184176185 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