Skip to content

Commit

Permalink
Merge pull request #512 from rabbitholegg/matthew/fix-titles-tests
Browse files Browse the repository at this point in the history
fix(titles): fix failing simulate mint test
  • Loading branch information
mmackz authored Aug 15, 2024
2 parents 3c1740e + b3e0ca4 commit 9143d6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 28 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-moose-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rabbitholegg/questdk-plugin-titles": patch
---

fix failing tests for titles simulateMint
32 changes: 4 additions & 28 deletions packages/titles/src/Titles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,35 +137,11 @@ describe('Given the getFee function', () => {
describe('simulateMint function', () => {
test('should simulate a V2 mint', async () => {
const contractAddress: Address =
'0x432f4Ccc39AB8DD8015F590a56244bECb8D16933'
'0xc1eee0e85cf2356357ccad2cd1a60a5935538e4d'
const mintParams = {
contractAddress,
chainId: Chains.BASE,
tokenId: 4,
recipient: '0xf70da97812CB96acDF810712Aa562db8dfA3dbEF',
}
const value = parseEther('0.0005')
const address = mintParams.recipient as Address

const result = await simulateMint(
mintParams as MintIntentParams,
value,
address,
)

const request = result.request
expect(request.address).toBe('0x432f4Ccc39AB8DD8015F590a56244bECb8D16933')
expect(request.functionName).toBe('mint')
expect(request.value).toBe(value)
})

test('should simulate a V2 mint', async () => {
const contractAddress: Address =
'0x06d7D870a41a44B5b7eBF46019bD5f8487362de3'
const mintParams = {
contractAddress,
chainId: Chains.BASE,
tokenId: 5,
chainId: Chains.ZORA,
tokenId: 1,
recipient: '0xf70da97812CB96acDF810712Aa562db8dfA3dbEF',
}
const value = parseEther('0.0005')
Expand All @@ -178,7 +154,7 @@ describe('simulateMint function', () => {
)

const request = result.request
expect(request.address).toBe('0x06d7D870a41a44B5b7eBF46019bD5f8487362de3')
expect(request.address).toBe('0xc1eee0e85cf2356357ccad2cd1a60a5935538e4d')
expect(request.functionName).toBe('mint')
expect(request.value).toBe(value)
})
Expand Down

0 comments on commit 9143d6e

Please sign in to comment.