You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the method signMessage the code says the it will return a Buffer (I assume is the NodeJS Buffer object).
But because I'm following SEP-0043 I'm converting that response to a string... But the method toString is not acting like the NodeJS Buffer so I feel is not a Buffer the response.
What did you expect to see?
A Buffer object with the features the NodeJS Buffer has
What did you see instead?
The response was an Object with the structure:
{
data: number[]
type: "Buffer"}
The text was updated successfully, but these errors were encountered:
👋 so what we do for Buffer on the browser side is use a webpack polyfill which uses https://github.com/feross/buffer for any Buffer references, or at least it should.
After reviewing the build steps, it looks like we polyfill Buffer in the extension build but not in the freighter-api build, so on the extension side we get a reference to this buffer class which should be the class you expect but on the API side we resolve buffer to this interface.
Thanks for finding this, I'm going to try to polyfill it the same way on both builds and will test this API again and get back to you here with details.
What version are you using?
Wallet version: 5.24.1
Freighter CLI version: 3.0.0
What did you do?
When using the method
signMessage
the code says the it will return aBuffer
(I assume is the NodeJS Buffer object).But because I'm following SEP-0043 I'm converting that response to a
string
... But the methodtoString
is not acting like the NodeJS Buffer so I feel is not a Buffer the response.What did you expect to see?
A
Buffer
object with the features the NodeJSBuffer
hasWhat did you see instead?
The response was an
Object
with the structure:The text was updated successfully, but these errors were encountered: