-
Notifications
You must be signed in to change notification settings - Fork 5
test(core): add tests for getAddressType #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
expect(getAddressType(p2trRegtest!)).toBe("p2tr"); | ||
}); | ||
|
||
it("returns P2PKH type", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we won't support P2PKH addresses in the nearest future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed.
}); | ||
|
||
it("returns P2TR type", () => { | ||
const { address: p2trMainnet } = bitcoin.payments.p2tr({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const p2wpkhMainnetAddress = bitcoin.payments.p2sh({
redeem: bitcoin.payments.p2wpkh({
pubkey: keyPairMainnet.publicKey,
network: mainnet,
}),
network: mainnet,
}).address as string;
let's do like this an we can opt out biome ingores
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
biome ignores are no longer used.
an string type is now provided for the address when calling the function
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
packages/core/src/utils/fixtures/getBitcoinAddress.ts