diff --git a/contracts/src/governance/governor/internal.rs b/contracts/src/governance/governor/internal.rs index efabf5fc9..8e41937ad 100644 --- a/contracts/src/governance/governor/internal.rs +++ b/contracts/src/governance/governor/internal.rs @@ -252,7 +252,7 @@ pub trait GovernorInternal: return Ok(true) } - let pos = description.find("proposer=0x").unwrap(); + let pos = description.find("proposer=0x").unwrap() + 11usize; let address = &description[pos..]; if hex::decode(address).is_err() { diff --git a/tests/e2e/governance/governor.tests.ts b/tests/e2e/governance/governor.tests.ts index 107d8cb45..cfb9eb966 100644 --- a/tests/e2e/governance/governor.tests.ts +++ b/tests/e2e/governance/governor.tests.ts @@ -717,6 +717,8 @@ describe('Governor', function () { '#proposer=' + SS58ToHex(api, deployer.address) ) + console.log(SS58ToHex(api, deployer.address)) + await expect(helper.propose(alice)).to.eventually.be.rejected await api.disconnect() diff --git a/tests/e2e/governance/helper.ts b/tests/e2e/governance/helper.ts index 5f3d6a33a..2085c887a 100644 --- a/tests/e2e/governance/helper.ts +++ b/tests/e2e/governance/helper.ts @@ -48,10 +48,6 @@ export class GovernorHelper { throw new Error('Proposal not set') } - console.log('Proposal ID: ', await this.calculateProposalId()) - - console.log((await this.governor?.query.propose([this.proposal!], this.description!))?.value.ok?.err) - if(proposer) { await this.governor?.withSigner(proposer).tx.propose([this.proposal!], this.description!) }