Skip to content

Commit

Permalink
Merge pull request #8733 from LedgerHQ/chore/buffer-polyfill-buffer-b…
Browse files Browse the repository at this point in the history
…itcoin-fix

override polyfill for bitcoin
  • Loading branch information
Wozacosta authored Dec 19, 2024
2 parents 340a171 + 21bb612 commit 5e95bd7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-suits-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/coin-bitcoin": patch
---

chore: override buffer polyfill for bitcoin integration test
8 changes: 8 additions & 0 deletions libs/coin-modules/coin-bitcoin/src/bridge.integration.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DatasetTest } from "@ledgerhq/types-live";
import { Buffer as OriginalBuffer } from "buffer";
// import { testBridge } from "@ledgerhq/coin-framework/test-helpers/bridge-integration-suite";

import type { Transaction } from "./types";
Expand All @@ -13,6 +14,13 @@ import zencash from "./datasets/zencash";
import litecoin from "./datasets/litecoin";
import zcash from "./datasets/zcash";

// NOTE: overrides polyfill set here libs/ledger-live-common/jest.polyfills.js
Object.defineProperty(globalThis, "Buffer", {
value: OriginalBuffer,
writable: true,
configurable: true,
});

/*
import { createBridges } from "./bridge/js";
import { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
Expand Down

0 comments on commit 5e95bd7

Please sign in to comment.