git.delta.rocks / unique-network / refs/commits / 661be5917643

difftreelog

chore normalize substrate address

Grigoriy Simonov2022-12-23parent: #cb8120d.patch.diff
in: master

1 file changed

modifiedtests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth
525 expect(collectionData.raw.sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));525 expect(collectionData.raw.sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true));
526 expect(await collectionEvm.methods.hasCollectionPendingSponsor().call()).to.be.false;526 expect(await collectionEvm.methods.hasCollectionPendingSponsor().call()).to.be.false;
527 const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});527 const sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner});
528 const sponsorSubAddress = helper.address.normalizeSubstrateToChainFormat(helper.address.ethToSubstrate(sponsor));
528 expect(helper.address.restoreCrossAccountFromBigInt(BigInt(sponsorTuple.sub))).to.be.equal(helper.address.ethToSubstrate(sponsor));529 const actualSubAddress = helper.address.normalizeSubstrateToChainFormat(helper.address.restoreCrossAccountFromBigInt(BigInt(sponsorTuple.sub)));
530 expect(actualSubAddress).to.be.equal(sponsorSubAddress);
529531
530 const user = helper.eth.createAccount();532 const user = helper.eth.createAccount();
531 const userCross = helper.ethCrossAccount.fromAddress(user);533 const userCross = helper.ethCrossAccount.fromAddress(user);