LedgerHQ / ledger-live

Mono-repository for packages related to Ledger Live and its JavaScript ecosystem.
MIT License
431 stars 324 forks source link

[Bug]: Taproot / bech32m support #5205

Closed novelnet closed 10 months ago

novelnet commented 11 months ago

Impacted Library name

@ledgerhq/hw-app-btc

Impacted Library version

latest

Describe the bug

getWalletPublicKey in @ledgerhq/hw-app-btc states that format ("legacy" | "p2sh" | "bech32" | "bech32m" | "cashaddr") is available, but is missing in addressFormatMap and therefore returns 'Ledger device: Invalid data received (0x6a80)':

/**
 * address format is one of legacy | p2sh | bech32 | cashaddr
 */
export type AddressFormat = "legacy" | "p2sh" | "bech32" | "bech32m" | "cashaddr";
const addressFormatMap = {
  legacy: 0,
  p2sh: 1,
  bech32: 2,
  cashaddr: 3,
};

Expected behavior

Generates a bech32m PublicKey with Address

Additional context

No response

Oyebob commented 11 months ago

Impacted Library name

@ledgerhq/hw-app-btc

Impacted Library version

latest

Describe the bug

getWalletPublicKey in @ledgerhq/hw-app-btc states that format ("legacy" | "p2sh" | "bech32" | "bech32m" | "cashaddr") is available, but is missing in addressFormatMap and therefore returns 'Ledger device: Invalid data received (0x6a80)':

/**
 * address format is one of legacy | p2sh | bech32 | cashaddr
 */
export type AddressFormat = "legacy" | "p2sh" | "bech32" | "bech32m" | "cashaddr";
const addressFormatMap = {
  legacy: 0,
  p2sh: 1,
  bech32: 2,
  cashaddr: 3,
};

Expected behavior

Generates a bech32m PublicKey with Address

Additional context

No response

Hi @novelnet sometimes this bug occurs.

Best thing to do to resolve it is open the defi protocol page and let the agent on the live chat know.

They can then make a proposal to complete your request and fix the bug via Defi Protocol

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.

ghost commented 10 months ago

Hi @novelnet , the addressFormatMap you refer to is deprecated and only provided for compatibility with old app versions.

The implementation used with the current app version is here, you can see that it does support bech32m here.

Feel free to re-open if you feel this isn't answering your issue.