Skip to content

Commit

Permalink
fix: btc account address naming
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Oct 20, 2023
1 parent 2334b9a commit f5252ca
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/extension/src/libs/utils/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const getAccountsByNetworkName = async (

const accounts = await keyring.getAccounts(network.signer);

return accounts.filter((account) => {
const filtered = accounts.filter((account) => {
if (account.isHardware && account.HWOptions !== undefined) {
// Polkadot and Kusama ledger apps only work for those networks
if (
Expand All @@ -34,6 +34,15 @@ export const getAccountsByNetworkName = async (

return true;
});
return filtered.map((f) => {
if (
network.signer.includes(SignerType.secp256k1btc) &&
f.name === "Bitcoin Account 1"
) {
f.name = f.name.replace("Bitcoin", network.name_long);
}
return f;
});
};

export { getOtherSigners };

2 comments on commit f5252ca

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.