Skip to content

Commit

Permalink
Merge pull request #131 from rabbitholegg/mmackz-zora-hotfix
Browse files Browse the repository at this point in the history
fix(zora): fix casing issue with token addresses when using arrays
  • Loading branch information
mmackz authored Dec 15, 2023
2 parents a5f9750 + b189ebe commit 35fe751
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/calm-tigers-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rabbitholegg/questdk-plugin-zora": patch
---

fix casing issue with contract address
2 changes: 1 addition & 1 deletion packages/zora/src/Zora.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const mint = async (
].toLowerCase() as Address

const mintContract = universalMinter
? { $or: [contractAddress, universalMinter] }
? { $or: [contractAddress.toLowerCase(), universalMinter] }
: contractAddress

const andArray = []
Expand Down
4 changes: 4 additions & 0 deletions packages/zora/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getAddress } from 'viem'
import { createTestCase } from './utils'
import {
BASIC_PURCHASE,
Expand All @@ -11,6 +12,9 @@ export const passingTestCases = [
createTestCase(MINT_WITH_REWARDS, 'Minting with rewards'),
createTestCase(MINT_WITH_REWARDS_1155, 'Minting with rewards 1155'),
createTestCase(MINT_BATCH_WITHOUT_FEES, 'When using the batch mint function'),
createTestCase(MINT_WITH_REWARDS, 'when contractAddress is checksummed', {
contractAddress: getAddress(MINT_WITH_REWARDS.params.contractAddress),
}),
]

export const failingTestCases = [
Expand Down

0 comments on commit 35fe751

Please sign in to comment.