Skip to content

Commit

Permalink
upgrade encodeCashAddress usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-zwets committed Sep 12, 2024
1 parent 6d0ee9b commit eddf603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Wallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const WalletInfo: React.FC<Props> = ({network, wallets, setWallets}) => {
function hash160ToCash(hex: string, forTestnet?: boolean, tokenSupport?: boolean) {
const prefix = forTestnet ? "bchtest" : "bitcoincash";
const type = tokenSupport ? "p2pkhWithTokens" : "p2pkh";
return encodeCashAddress(prefix, type, hexToBin(hex));
return encodeCashAddress({ prefix, type, payload: hexToBin(hex) }).address;
}

function removeWallet(index:number) {
Expand Down

0 comments on commit eddf603

Please sign in to comment.