-
Notifications
You must be signed in to change notification settings - Fork 33
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
[FIX]: removing unneeded NFT module and related code #108
[FIX]: removing unneeded NFT module and related code #108
Conversation
test('Successfully POSTs to the given endpoint and adds JSON header', async () => { | ||
const fetchStub = jest.fn().mockImplementation(() => successRes); | ||
(fetch as any) = fetchStub; | ||
|
||
await expect( | ||
post( | ||
'https://example.com/hello/world', | ||
API_KEY, | ||
{ public_address: '0x0123' }, | ||
{ 'Content-Type': 'application/json' }, | ||
), | ||
).resolves.toBe('hello world'); | ||
|
||
const fetchArguments = fetchStub.mock.calls[0]; | ||
expect(fetchArguments).toEqual([ | ||
'https://example.com/hello/world', | ||
{ | ||
method: 'POST', | ||
headers: { | ||
'X-Magic-Secret-key': API_KEY, | ||
'Content-Type': 'application/json', | ||
}, | ||
body: '{"public_address":"0x0123"}', | ||
}, | ||
]); | ||
}); |
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.
Can we keep this? doesn't look NFT related
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.
I added this in a PR for minting, basically needed to add in the secret key header specifically for minting -- here's where it was added: https://github.com/magiclabs/magic-admin-js/pull/107/files#diff-1dafd08f79b2abad5cee6ab033b9a92fd6e01257c287673b6eb533a9c558335aR32
This test is for this change, which is only needed by minting: https://github.com/magiclabs/magic-admin-js/pull/108/files#diff-3ca6a15d564c2c26d46054f3bde8c43d1e5c79865143e55ad08164353ef58320L54
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.
Gotcha!
π PR was released in |
π¦ Pull Request
For NFT Checkout, approved clients will call our REST API endpoints directly rather than using the SDK. Removing all references to NFT service from this repo.
β Fixed Issues
π¨ Test instructions