Skip to content

Commit 36aa140

Browse files
authored
Merge pull request #3685 from IntersectMBO/fix/drep_teardown
fix: update dRep registration to use dRep keys instead of stake keys
2 parents 68f7292 + 5313ce6 commit 36aa140

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

tests/govtool-frontend/playwright/lib/helpers/transaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ export async function registerDRepForWallet(wallet: ShelleyWallet) {
126126
wallet: wallet.json(),
127127
};
128128
const registrationRes = await kuberService.dRepRegistration(
129-
convertBufferToHex(wallet.stakeKey.private),
130-
convertBufferToHex(wallet.stakeKey.pkh),
129+
convertBufferToHex(wallet.dRepKey.private),
130+
convertBufferToHex(wallet.dRepKey.pkh),
131131
metadataAnchorAndWallet
132132
);
133133
await pollTransaction(registrationRes.txId, registrationRes.lockInfo);

tests/govtool-frontend/playwright/lib/services/kuberService.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ const kuberService = {
237237
},
238238

239239
dRepRegistration: (
240-
stakeSigningKey: string,
241-
pkh: string,
240+
dRepSigningKey: string,
241+
dRepPkh: string,
242242
metadata: WalletAndAnchorType
243243
) => {
244244
const kuber = new Kuber(
@@ -247,12 +247,12 @@ const kuberService = {
247247
);
248248

249249
const req = {
250-
certificates: [Kuber.generateCert("registerdrep", pkh, metadata)],
250+
certificates: [Kuber.generateCert("registerdrep", dRepPkh, metadata)],
251251
selections: [
252252
{
253253
type: "PaymentSigningKeyShelley_ed25519",
254254
description: "Stake Signing Key",
255-
cborHex: `5820${stakeSigningKey}`,
255+
cborHex: `5820${dRepSigningKey}`,
256256
},
257257
],
258258
};
@@ -261,15 +261,15 @@ const kuberService = {
261261
dRepDeRegistration: (
262262
addr: string,
263263
signingKey: string,
264-
stakePrivateKey: string,
264+
dRepPrivateKey: string,
265265
pkh: string
266266
) => {
267267
const kuber = new Kuber(addr, signingKey);
268268
const selections = [
269269
{
270270
type: "PaymentSigningKeyShelley_ed25519",
271271
description: "Payment Signing Key",
272-
cborHex: "5820" + stakePrivateKey,
272+
cborHex: "5820" + dRepPrivateKey,
273273
},
274274
];
275275
const req = {
@@ -287,13 +287,13 @@ const kuberService = {
287287
);
288288
const req = {
289289
certificates: wallets.map((wallet) =>
290-
Kuber.generateCert("deregisterdrep", wallet.stake.pkh)
290+
Kuber.generateCert("deregisterdrep", wallet.dRep.pkh)
291291
),
292292
selections: wallets.map((wallet) => {
293293
return {
294294
type: "PaymentSigningKeyShelley_ed25519",
295295
description: "Stake Signing Key",
296-
cborHex: `5820${wallet.stake.private}`,
296+
cborHex: `5820${wallet.dRep.private}`,
297297
};
298298
}),
299299
inputs: getWalletConfigForFaucet().address,

tests/govtool-frontend/playwright/tests/2-delegation/delegationFunctionality.delegation.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ test.describe("Delegate to others", () => {
6363
await dRepDirectoryPage.delegateToDRep(dRepId);
6464

6565
// Verify dRepId in dRep directory
66-
await expect(
67-
page.getByTestId(`${dRepId}-delegate-button`)
68-
).not.toBeVisible();
66+
await expect(page.getByTestId(`${dRepId}-delegate-button`)).not.toBeVisible(
67+
{ timeout: 60_000 }
68+
);
6969

7070
await expect(page.getByTestId(`${dRepId}-delegated-card`)).toBeVisible();
7171
await expect(
@@ -123,7 +123,7 @@ test.describe("Change delegation", () => {
123123
await dRepDirectoryPage.delegateToDRep(dRepIdSecond);
124124
await expect(
125125
page.getByTestId(`${dRepIdSecond}-delegated-card`)
126-
).toBeVisible();
126+
).toBeVisible({ timeout: 60_000 });
127127
await expect(
128128
page
129129
.getByTestId(`${dRepIdSecond}-delegated-card`)

0 commit comments

Comments
 (0)