Skip to content

Trade url is wrong (when using trade history) #172

@Araxeus

Description

@Araxeus

steps to reproduce:

  1. go to https://www.pathofexile.com/trade/history
  2. click any saved trade
  3. the extension forwards to https://www.pathofexile.com/trade/search//mytradehash (indeed with two /) which doesn't exist

it should have instead forwarded to https://www.pathofexile.com/trade/search/Keepers/mytradehash

I opened the issue about the "trade history" tab because its frequently used and where i noticed it, but this issue also affects the "settings" and "about" tabs too

Notes:

1: you might think those tabs don't know which league is currently selected, but check the value of document.querySelector('a[data-target="search"]').href its always the right one

2: the issue is probably that the extension only considers the current url

private parseCurrentPath(): ExactTradeLocationStruct {
const tradeRealms = ['xbox', 'sony', 'poe2'];
const pathParts = window.location.pathname.split('/').slice(1);

3: I tried fixing it myslef by replacing const pathParts = window.location.pathname.split('/').slice(1); with

 const pathParts = (document.querySelector('a[data-target="search"]')?.href || window.location.pathname.)split('/').slice(1);

but I failed at cloning this repo and running the dev command - i'm getting 1000 warnings about critical vulnerabilities and even when I ignored them like a fool, the build steps still fails... and well im not going to open a pull request for a change i can't test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions