-
Notifications
You must be signed in to change notification settings - Fork 375
Conversation
packages/hw-app-btc/src/Btc.js
Outdated
this.toHexDigit((number >> 8) & 0xff) + | ||
this.toHexDigit(number & 0xff) | ||
); | ||
}; |
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.
can these 2 be implemented using Buffer instead?
something like buffer=Buffer.alloc(4); buffer.writeUInt32LE(number, 0); return buffer.toString("hex")
(not tested) ?
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.
Yes, I was just transcribing the code (not trying to improve it right away). I'll fix it.
packages/hw-app-btc/src/Btc.js
Outdated
.reverse() | ||
.join(""), | ||
"hex" | ||
)) |
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.
I think it's better if we can directly create the Buffer with the number. without using a temporary string conversion
1662b71
to
1384381
Compare
1384381
to
914debe
Compare
Adding timestamp management to prepare for future altcoins integration