-
Notifications
You must be signed in to change notification settings - Fork 11
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
chore: add default padding to base64 oracles response/queries #1937
Conversation
118bea3
to
bcc03e9
Compare
I don't think this will solve the issue. I think the problem is, some of the responses are in Chinese/Japanese (e.g. in here: https://mainnet.aeternity.io/mdw/v3/oracles/ok_qJZPXvWPC7G9kFVEqNjj9NAmwMsQcpRu6E3SSCvCQuwfqpMtN/queries ) and if my findings are correct, aescan is using |
@vatanasov I'm pretty sure you don't need any of that, we don't even need the base64 padding. I simply added the padding because it works with all base64 libraries, but it works with atob regardless: @janmichek can you describe what you are using to decode base64 strings? |
@janmichek can we switch to using console.log(Buffer.from("5oiQ5Yqf5LqGIQ==", "base64").toString('utf8')); // 成功了!
console.log(Buffer.from("5oiQ5Yqf5LqGIQ", "base64").toString('utf8')); // 成功了! |
Yea I guess that should work in browser |
@sborrazas https://aescan.io/oracles/ok_2fVpBb8j58mNQcVjY7bwUVpBWZv6AySGDjqepNofU8XGGmEN53 ![]() The decoding you suggested says its a malformed string, or am I doing something wrong? |
@janmichek The response/query values for oracles are just binaries, meaning not all binaries have valid utf8 or ascii representations. Do you know what the utf8 representation for that example you gave should be? |
No, I don't know what the result should be. |
That's right, I would display something for when the binary is not a UTF-8/ASCII representation |
It will be fixed in here You can close this PR |
refs #1931