fix: attemptStake helper produces /stakestake invalid route (#1168)
Use URL.origin instead of splitting on '#' to construct the stake URL, preventing path duplication when the page is already on /stake. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
247a70f265
commit
473216fa2b
1 changed files with 2 additions and 2 deletions
|
|
@ -511,8 +511,8 @@ export async function attemptStake(
|
|||
): Promise<void> {
|
||||
console.log(`[${personaName}] Attempting to stake ${amount} KRK at tax rate ${taxRateIndex}%...`);
|
||||
|
||||
const baseUrl = page.url().split('#')[0];
|
||||
await page.goto(`${baseUrl}stake`);
|
||||
const origin = new URL(page.url()).origin;
|
||||
await page.goto(`${origin}/stake`);
|
||||
|
||||
try {
|
||||
// Wait for stake form to fully load
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue