Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ip check fallback following axios regression #2054

Merged
merged 2 commits into from Dec 20, 2022

Conversation

nicolasburtey
Copy link
Member

axios had a regression that made proxycheck call failed: axios/axios#5306

this prior PR fixes the proxycheck issue: eca59ab

now most IPType are not populated with the correct info, so as a result the rewards are not working.

this PR will make a call back to proxychecker if the relevant info is not present.

also, it adds proper open telemetry info

@nicolasburtey nicolasburtey changed the title chore: fix ip check fallback following axios regression fix: ip check fallback following axios regression Dec 20, 2022
@nicolasburtey nicolasburtey marked this pull request as ready for review December 20, 2022 14:27
@@ -17,28 +23,28 @@ export const updateAccountIPsInfo = async ({
logger: Logger
}): Promise<void | RepositoryError> =>
asyncRunInSpan(
"app.users.updateAccountIPsInfo",
"app.accounts.updateAccountIPsInfo",
Copy link
Contributor

@dolcalmi dolcalmi Dec 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wrapper is not necessary because in sessionContext we are using Accounts.updateAccountIPsInfo which is already a wrapper

image

Comment on lines 95 to 100
const ipFetcherInfoForOtel = JSON.parse(JSON.stringify(ipFetcherInfo))

for (const key in ipFetcherInfoForOtel) {
ipFetcherInfoForOtel["proxycheck." + key] = ipFetcherInfoForOtel[key]
delete ipFetcherInfoForOtel[key]
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be replaced by a .map

src/app/accounts/update-account-ip.ts Outdated Show resolved Hide resolved
@nicolasburtey nicolasburtey dismissed dolcalmi’s stale review December 20, 2022 18:56

comment should has been addressed

@nicolasburtey nicolasburtey merged commit 7df3880 into main Dec 20, 2022
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.

None yet

2 participants