HomePhabricator

[chronik-client] Do not use buffer type to support browser builds without…

Description

[chronik-client] Do not use buffer type to support browser builds without webpack Buffer fallbacks

Summary:
Buffer type only exists in NodeJS and not the browser. There are available polyfills. However, to use these, we would need a tool like webpack.

The Buffer type is only used to distinguish between node and browser processing env. A common way to do this is to check on window.

Use this way instead of instanceof Buffer

Test Plan: CI, see if this install works on websocket for D15665

Reviewers: #bitcoin_abc, tobias_ruck

Reviewed By: #bitcoin_abc, tobias_ruck

Subscribers: tobias_ruck

Differential Revision: https://reviews.bitcoinabc.org/D15677

Details

Provenance
bytesofmanAuthored on Mar 11 2024, 19:25
bytesofmanPushed on Mar 11 2024, 23:49
Reviewer
Restricted Project
Differential Revision
D15677: [chronik-client] Do not use buffer type to support browser builds without webpack Buffer fallbacks
Parents
rABC0c3c4e3ebb8e: [Cashtab] Better function to convert user-entered fiat prices to satoshis
Branches
Unknown
Tags
Unknown