Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(#2681): remove logging to sentry on failed drep registration tx #2696

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ changes.

### Removed

-
- Remove logging to sentry for DRep registration transaction [Issue 2681](https://github.com/IntersectMBO/govtool/issues/2681)

## [v2.0.7](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.7) 2025-01-20

Expand Down
34 changes: 12 additions & 22 deletions govtool/frontend/src/hooks/forms/useRegisterAsdRepForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { useFormContext } from "react-hook-form";
import { blake2bHex } from "blakejs";
import * as Sentry from "@sentry/react";
import { NodeObject } from "jsonld";
import { CertificatesBuilder } from "@emurgo/cardano-serialization-lib-asmjs";

Expand Down Expand Up @@ -127,29 +126,23 @@ export const useRegisterAsdRepForm = (
async (data: DRepDataFormValues) => {
if (!hash) return;
const uri = data.storingURL;
try {
const certBuilder = CertificatesBuilder.new();
const certBuilder = CertificatesBuilder.new();

const registerCert = voter?.isRegisteredAsSoleVoter
? await buildDRepUpdateCert(uri, hash)
: await buildDRepRegCert(uri, hash);
const registerCert = voter?.isRegisteredAsSoleVoter
? await buildDRepUpdateCert(uri, hash)
: await buildDRepRegCert(uri, hash);

certBuilder.add(registerCert);
certBuilder.add(registerCert);

if (!registeredStakeKeysListState.length) {
const stakeKeyRegCert = await buildStakeKeyRegCert();
certBuilder.add(stakeKeyRegCert);
}
if (!registeredStakeKeysListState.length) {
const stakeKeyRegCert = await buildStakeKeyRegCert();
certBuilder.add(stakeKeyRegCert);
}

const voteDelegationCert = await buildVoteDelegationCert(dRepID);
certBuilder.add(voteDelegationCert);
const voteDelegationCert = await buildVoteDelegationCert(dRepID);
certBuilder.add(voteDelegationCert);

return certBuilder;
} catch (error) {
Sentry.setTag("hook", "useRegisterAsdRepForm");
Sentry.captureException(error);
throw error;
}
return certBuilder;
},
[
buildDRepRegCert,
Expand Down Expand Up @@ -222,9 +215,6 @@ export const useRegisterAsdRepForm = (
},
});
} else {
Sentry.setTag("hook", "useRegisterAsdRepForm");
Sentry.captureException(error);

openWalletErrorModal({
error,
onSumbit: () => backToDashboard(),
Expand Down
Loading