-
Notifications
You must be signed in to change notification settings - Fork 375
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
[Wallet] Fix 8 digit codes for mainnet #6663
Conversation
cb3b4b3
to
14b2536
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally on mainnet and is working for me 😄
Would note that Mainnet isn't the best testing ground for this as most validators haven't updated yet. So I'd probably recommend doing it on Alfajores as well |
@nambrot this PR specifically fix 8 digit codes on mainnet, on alfajores it works fine without this PR. Also, all validators on mainnet are on >= 1.1.0 version now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍
Nice seeing one less dependency.
const resp = await fetch( | ||
`${attestationServiceURLClaim.url}${ | ||
attestationServiceURLClaim.url.substr(-1) === '/' ? '' : '/' | ||
}status` | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too bad JavaScript doesn't provide a builtin way to join url parts.
We do have a string helper though which does the same as what you did:
celo-monorepo/packages/sdk/base/src/string.ts
Lines 1 to 7 in 4276a18
export function appendPath(baseUrl: string, path: string) { | |
const lastChar = baseUrl[baseUrl.length - 1] | |
if (lastChar === '/') { | |
return baseUrl + path | |
} | |
return baseUrl + '/' + path | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested deep in the identity package we do https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/identity/src/offchain/utils.ts#L360.
Description
/
in the end is missingTested
Verification flow on Android device
Backwards compatibility
Yes