Skip to content

Commit f1a8679

Browse files
authored
Merge pull request #531 from rabbitholegg/matthew/rerelease-with-fixed-tests
chore: generate new changeset
2 parents 864eb32 + 1a4879b commit f1a8679

File tree

2 files changed

+61
-38
lines changed

2 files changed

+61
-38
lines changed

.changeset/wet-windows-grab.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@rabbitholegg/questdk-plugin-coop": patch
3+
"@rabbitholegg/questdk-plugin-fabric": patch
4+
"@rabbitholegg/questdk-plugin-manifold": patch
5+
"@rabbitholegg/questdk-plugin-okutrade": patch
6+
"@rabbitholegg/questdk-plugin-registry": patch
7+
---
8+
9+
re-release with fixed tests

packages/manifold/src/Manifold.test.ts

Lines changed: 52 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -101,37 +101,45 @@ describe('Given the getMintIntent function', () => {
101101
const CONTRACT_ADDRESS = '0x6Ecbe1DB9EF729CBe972C83Fb886247691Fb6beb'
102102
const RECIPIENT_ADDRESS = '0x1234567890123456789012345678901234567890'
103103

104-
test('returns a TransactionRequest with correct properties when amount is set greater than 1', async () => {
105-
const mint: MintIntentParams = {
106-
chainId: 1,
107-
tokenId: 1,
108-
contractAddress: CONTRACT_ADDRESS,
109-
amount: BigInt('2'),
110-
recipient: RECIPIENT_ADDRESS,
111-
}
112-
const result = await getMintIntent(mint)
113-
expect(result).toEqual({
114-
from: mint.recipient,
115-
to: mint.contractAddress,
116-
data: '0x26c858a40000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
117-
})
118-
})
104+
test(
105+
'returns a TransactionRequest with correct properties when amount is set greater than 1',
106+
async () => {
107+
const mint: MintIntentParams = {
108+
chainId: 1,
109+
tokenId: 1,
110+
contractAddress: CONTRACT_ADDRESS,
111+
amount: BigInt('2'),
112+
recipient: RECIPIENT_ADDRESS,
113+
}
114+
const result = await getMintIntent(mint)
115+
expect(result).toEqual({
116+
from: mint.recipient,
117+
to: mint.contractAddress,
118+
data: '0x26c858a40000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000123456789012345678901234567890123456789000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
119+
})
120+
},
121+
{ timeout: 7000 },
122+
)
119123

120-
test('returns a TransactionRequest when amount is 1 or undefined', async () => {
121-
const mint: MintIntentParams = {
122-
chainId: 1,
123-
tokenId: 1,
124-
amount: BigInt('1'),
125-
contractAddress: CONTRACT_ADDRESS,
126-
recipient: RECIPIENT_ADDRESS,
127-
}
128-
const result = await getMintIntent(mint)
129-
expect(result).toEqual({
130-
from: mint.recipient,
131-
to: mint.contractAddress,
132-
data: '0xfa2b068f0000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000012345678901234567890123456789012345678900000000000000000000000000000000000000000000000000000000000000000',
133-
})
134-
})
124+
test(
125+
'returns a TransactionRequest when amount is 1 or undefined',
126+
async () => {
127+
const mint: MintIntentParams = {
128+
chainId: 1,
129+
tokenId: 1,
130+
amount: BigInt('1'),
131+
contractAddress: CONTRACT_ADDRESS,
132+
recipient: RECIPIENT_ADDRESS,
133+
}
134+
const result = await getMintIntent(mint)
135+
expect(result).toEqual({
136+
from: mint.recipient,
137+
to: mint.contractAddress,
138+
data: '0xfa2b068f0000000000000000000000006ecbe1db9ef729cbe972c83fb886247691fb6beb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000012345678901234567890123456789012345678900000000000000000000000000000000000000000000000000000000000000000',
139+
})
140+
},
141+
{ timeout: 7000 },
142+
)
135143
})
136144

137145
describe('Given the getFee function', () => {
@@ -245,12 +253,18 @@ describe('getExternalUrl function', () => {
245253
expect(result).toBe('https://app.manifold.xyz/c/girls-man')
246254
})
247255

248-
test('should return the fallback url for an unknown contract', async () => {
249-
const mint = {
250-
chainId: Chains.OPTIMISM,
251-
contractAddress: getAddress('0x7935cd348193bab133f3081f53eb99ee6f0d685b'),
252-
}
253-
const result = await getExternalUrl(mint)
254-
expect(result).toBe('https://app.manifold.xyz/')
255-
})
256+
test(
257+
'should return the fallback url for an unknown contract',
258+
async () => {
259+
const mint = {
260+
chainId: Chains.OPTIMISM,
261+
contractAddress: getAddress(
262+
'0x7935cd348193bab133f3081f53eb99ee6f0d685b',
263+
),
264+
}
265+
const result = await getExternalUrl(mint)
266+
expect(result).toBe('https://app.manifold.xyz/')
267+
},
268+
{ timeout: 7000 },
269+
)
256270
})

0 commit comments

Comments
 (0)