Skip to content
Open
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
152 changes: 16 additions & 136 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/components/multisig/proxy/offchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
} from "@meshsdk/core";
import type { UTxO, MeshTxBuilder } from "@meshsdk/core";
// import { parseDatumCbor } from "@meshsdk/core-cst";
import { DREP_DEPOSIT_STRING } from "@/utils/protocol-deposit-constants";
import { parseProposalId } from "@/lib/governance";

import { MeshTxInitiator } from "./common";
Expand Down Expand Up @@ -503,7 +502,7 @@ export class MeshProxyContract extends MeshTxInitiator {
anchorDataHash: anchorHash!,
});
} else if (action === "deregister") {
txHex.drepDeregistrationCertificate(drepId, DREP_DEPOSIT_STRING);
txHex.drepDeregistrationCertificate(drepId);
} else if (action === "update") {
txHex.drepUpdateCertificate(drepId, {
anchorUrl: anchorUrl!,
Expand Down
3 changes: 1 addition & 2 deletions src/components/pages/wallet/governance/drep/retire.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { MeshProxyContract } from "@/components/multisig/proxy/offchain";
import { api } from "@/utils/api";
import { useCallback } from "react";
import { useToast } from "@/hooks/use-toast";
import { DREP_DEPOSIT_STRING } from "@/utils/protocol-deposit-constants";
import useActiveWallet from "@/hooks/useActiveWallet";

export default function Retire({ appWallet, manualUtxos }: { appWallet: Wallet; manualUtxos: UTxO[] }) {
Expand Down Expand Up @@ -243,7 +242,7 @@ export default function Retire({ appWallet, manualUtxos }: { appWallet: Wallet;
txBuilder
.txInScript(scriptCbor)
.changeAddress(changeAddress)
.drepDeregistrationCertificate(dRepId, DREP_DEPOSIT_STRING);
.drepDeregistrationCertificate(dRepId);

// Only add certificateScript if it's different from the spending script
// to avoid "extraneous scripts" error
Expand Down
9 changes: 0 additions & 9 deletions src/components/pages/wallet/staking/StakingActions/stake.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { MultisigWallet } from "@/utils/multisigSDK";
import { ToastAction } from "@radix-ui/react-toast";
import { toast } from "@/hooks/use-toast";
import { getTxBuilder } from "@/utils/get-tx-builder";
import { STAKE_KEY_DEPOSIT } from "@/utils/protocol-deposit-constants";
import useTransaction from "@/hooks/useTransaction";

type StakingAction = "register" | "deregister" | "delegate" | "withdrawal" | "registerAndDelegate";
Expand All @@ -20,10 +19,6 @@ type StakingActionConfig = {
successMessage: string;
};

function shouldApplyStakeDeposit(action: StakingAction): boolean {
return action === "register" || action === "registerAndDelegate";
}

function buildStakingActionConfigs({
txBuilder,
rewardAddress,
Expand Down Expand Up @@ -131,10 +126,6 @@ export default function StakeButton({
});
const actionConfig = actionConfigs[action];

if (shouldApplyStakeDeposit(action)) {
txBuilder.protocolParams({ keyDeposit: STAKE_KEY_DEPOSIT });
}

actionConfig.execute();

txBuilder.changeAddress(appWallet.address);
Expand Down
Loading
Loading