Skip to content

Commit

Permalink
fix: update get btc address
Browse files Browse the repository at this point in the history
  • Loading branch information
janniks committed May 17, 2022
1 parent 91b511b commit 8ad4d83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/stacking/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ export function poxAddressToBtcAddress(...args: PoxAddressArgs): string {
return btcAddress;
}

export function getBTCAddress(version: Buffer, checksum: Buffer) {
const btcAddress = address.toBase58Check(checksum, Number(version.toString()));
return btcAddress;
export function getBTCAddress(version: number | Buffer, checksum: Buffer) {
const versionNumber: number = typeof version === 'number' ? version : version[0];
return address.toBase58Check(checksum, versionNumber);
}

export function getErrorString(error: StackingErrors): string {
Expand Down

1 comment on commit 8ad4d83

@vercel
Copy link

@vercel vercel bot commented on 8ad4d83 May 17, 2022

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.