Skip to content

Fix trade result parsing for 3.29 API changes#2402

Draft
wangyan66 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
wangyan66:fix/trade-pseudomod-parsing
Draft

Fix trade result parsing for 3.29 API changes#2402
wangyan66 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
wangyan66:fix/trade-pseudomod-parsing

Conversation

@wangyan66

Copy link
Copy Markdown

Description of the problem being solved:

The PoE2 trade API now returns pseudo mods and item mods as objects containing a description field instead of plain strings.

This caused Trade for these items -> Find best to crash while parsing weighted trade results:

TradeQueryRequests.lua:438: attempt to call method 'match' (a nil value)

It could also crash while parsing item mods:

Common.lua:1004: attempt to call method 'gsub' (a nil value)

This change supports both the new object format and the legacy string format for pseudo, enchant, rune, implicit, and explicit mods.

Steps taken to verify a working solution:

  • Reproduced both crashes with Trade for these items -> Find best.
  • Verified that weighted trade searches complete and return items after the fix.
  • Ran the complete Busted test suite: 566 successes, 0 failures, 0 errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant