Skip to content

Commit

Permalink
Merge pull request #2491 from IntersectMBO/fix/2490-failure-on-submit…
Browse files Browse the repository at this point in the history
…ting-the-proposals-with-unregistered-or-registered-but-wrongly-handled-by-govtool-stake-keys
  • Loading branch information
MSzalowski authored Dec 10, 2024
2 parents c17e75d + ce5223c commit e073eb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ changes.

### Added

-
- Add stake key registration certificate to voting and gov action proposal if not registered [Issue 2490](https://github.com/IntersectMBO/govtool/issues/2490)

### Fixed

Expand Down
10 changes: 10 additions & 0 deletions govtool/frontend/src/context/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,14 @@ const CardanoProvider = (props: Props) => {
}
}

// register stake key if it is not registered
if (!certBuilder && !registeredStakeKeysListState.length) {
const stakeKeyRegCertBuilder = CertificatesBuilder.new();
const stakeKeyRegCert = await buildStakeKeyRegCert();
stakeKeyRegCertBuilder.add(stakeKeyRegCert);
txBuilder.set_certs_builder(stakeKeyRegCertBuilder);
}

if (votingBuilder) {
txBuilder.set_voting_builder(votingBuilder);
}
Expand Down Expand Up @@ -728,6 +736,8 @@ const CardanoProvider = (props: Props) => {
guardrailScript,
epochParams?.cost_model?.costs,
disconnectWallet,
registeredStakeKeysListState,
stakeKey,
],
);

Expand Down

0 comments on commit e073eb7

Please sign in to comment.