Port PoB 2 Oauth API#9812
Conversation
| if node.oidx == data.orbitIndex and not data.isMastery then | ||
| for _, extendedId in ipairs(importedGroups[proxyGroup].nodes) do | ||
| if id == tonumber(extendedId) and inExtendedHashes(id) then | ||
| if id == extendedId and inExtendedHashes(tonumber(id)) then |
There was a problem hiding this comment.
Hopefully this doesn't break anything else. The cluster data is exactly the same as previously, but this seemed to be comparing strings to numbers. Type hints / checking would be really useful here, because I'm not sure what is correct here
|
The changes seem to break mcagnion's tests, even though the functionality seems to work. I'm not really seeing why that is. Otherwise everything seems to work so far |
|
If |
Thanks, that was indeed it. Seems very obvious in hindsight lol |
| self.lastRealm = node.attrib.lastRealm | ||
| self.lastLeague = node.attrib.lastLeague | ||
| self.lastToken = node.attrib.lastToken |
| local accounts = { elem = "Accounts", attrib = { lastAccountName = self.lastAccountName, lastRealm = self.lastRealm, lastLeague = self.lastLeague, lastToken = self.lastToken, lastRefreshToken = self.lastRefreshToken, tokenExpiry = tostring(self.tokenExpiry) } } | ||
| for accountName, account in pairs(self.gameAccounts) do |
| describe("TestImport", function() | ||
| local dkjson = require "dkjson" | ||
|
|
||
| local sampleJson, err = io.open("../spec/System/SampleCharacter.json", "r") |
There was a problem hiding this comment.
Hopefully testing like this is ok? This is probably not very portable across newer leagues, but I couldn't think of anything more practical for testing passive tree imports. This is mostly just what the GGG API returned for my current league lvl 99 kboc hierophant
|
I've noticed that there's something in the compare tab that breaks the trade tool. To reproduce:
This isn't caused by this PR either as it's also present on the beta version. I tried to fix it, but couldn't figure out what was causing it. My assumption is it could be related to how the compare tab wraps the items tab? Edit: possibly caused by compare tab overwriting the onframe function when it wraps the tab? |

I can't find relevant issues, but this primarily fixes annoying issues with POESESSID expiring all the time. For imports, this also automatically adds bandit and pantheon choices, as the OAuth API contains info for them.
Probably enables #5418 via the oauth API, though the current scope does not include
account:stashes.Description of the problem being solved:
Steps taken to verify a working solution:
What this PR still needs
I think this is getting quite close to done, but seeing as it is making a lot of changes to a vital part of the UI, it probably needs a lot more testing. I'm not sure I got all of the differences between the PoE site character data and API data. There might be some legacy things that I don't know about, and I'm not sure about other quirks (like for example the league field in the API is nullable: why?). I also can't test other realm imports since I've only ever played on PC.
The account name import doesn't seem to report 404s at all. I'm not sure if this ever worked, because the website just results in a 403 for me.
Questions about the UX/UI design were also raised on Discord.
Link to a build that showcases this PR:
N/A
Before screenshot:
After screenshot: