Skip to content
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

Add optional nftEndpoint param #586

Merged
merged 2 commits into from Jul 22, 2023

Conversation

octave08
Copy link
Collaborator

@octave08 octave08 commented Jul 20, 2023

📦 Pull Request

[Provide a general summary of the pull request here.]

Create a magic instance with nftEnpoint param so that internal developers point to nft-api endpoint they want

✅ Fixed Issues

  • [List any fixed issues here like: Fixes #XXXX]

Add nftEndpoint param in SDK config

🚨 Test instructions

[Describe any additional context required to test the PR/feature/bug fix.]

⚠️ Don't forget to add a semver label!

Please only add one label:

  • patch: Bug Fix?
  • minor: New Feature?
  • major: Breaking Change?
  • skip-release: It's unnecessary to publish this change.
📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @magic-ext/algorand@13.5.0-canary.586.5627642781.0
npm install @magic-ext/aptos@1.5.0-canary.586.5627642781.0
npm install @magic-ext/auth@1.5.0-canary.586.5627642781.0
npm install @magic-ext/avalanche@13.5.0-canary.586.5627642781.0
npm install @magic-ext/bitcoin@13.5.0-canary.586.5627642781.0
npm install @magic-ext/conflux@11.5.0-canary.586.5627642781.0
npm install @magic-ext/cosmos@13.5.0-canary.586.5627642781.0
npm install @magic-ext/ed25519@9.5.0-canary.586.5627642781.0
npm install @magic-ext/flow@13.6.0-canary.586.5627642781.0
npm install @magic-ext/gdkms@1.5.0-canary.586.5627642781.0
npm install @magic-ext/harmony@13.5.0-canary.586.5627642781.0
npm install @magic-ext/icon@13.5.0-canary.586.5627642781.0
npm install @magic-ext/near@13.5.0-canary.586.5627642781.0
npm install @magic-ext/oauth@12.5.0-canary.586.5627642781.0
npm install @magic-ext/oidc@1.4.0-canary.586.5627642781.0
npm install @magic-ext/polkadot@13.5.0-canary.586.5627642781.0
npm install @magic-ext/react-native-bare-oauth@13.5.0-canary.586.5627642781.0
npm install @magic-ext/react-native-expo-oauth@13.5.0-canary.586.5627642781.0
npm install @magic-ext/solana@14.5.0-canary.586.5627642781.0
npm install @magic-ext/taquito@10.5.0-canary.586.5627642781.0
npm install @magic-ext/terra@10.5.0-canary.586.5627642781.0
npm install @magic-ext/tezos@13.5.0-canary.586.5627642781.0
npm install @magic-ext/webauthn@12.5.0-canary.586.5627642781.0
npm install @magic-ext/zilliqa@13.5.0-canary.586.5627642781.0
npm install @magic-sdk/commons@14.5.0-canary.586.5627642781.0
npm install @magic-sdk/pnp@12.5.0-canary.586.5627642781.0
npm install @magic-sdk/provider@18.5.0-canary.586.5627642781.0
npm install @magic-sdk/react-native-bare@19.5.0-canary.586.5627642781.0
npm install @magic-sdk/react-native-expo@19.5.0-canary.586.5627642781.0
npm install @magic-sdk/types@15.7.0-canary.586.5627642781.0
npm install magic-sdk@18.5.0-canary.586.5627642781.0
# or 
yarn add @magic-ext/algorand@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/aptos@1.5.0-canary.586.5627642781.0
yarn add @magic-ext/auth@1.5.0-canary.586.5627642781.0
yarn add @magic-ext/avalanche@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/bitcoin@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/conflux@11.5.0-canary.586.5627642781.0
yarn add @magic-ext/cosmos@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/ed25519@9.5.0-canary.586.5627642781.0
yarn add @magic-ext/flow@13.6.0-canary.586.5627642781.0
yarn add @magic-ext/gdkms@1.5.0-canary.586.5627642781.0
yarn add @magic-ext/harmony@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/icon@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/near@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/oauth@12.5.0-canary.586.5627642781.0
yarn add @magic-ext/oidc@1.4.0-canary.586.5627642781.0
yarn add @magic-ext/polkadot@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/react-native-bare-oauth@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/react-native-expo-oauth@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/solana@14.5.0-canary.586.5627642781.0
yarn add @magic-ext/taquito@10.5.0-canary.586.5627642781.0
yarn add @magic-ext/terra@10.5.0-canary.586.5627642781.0
yarn add @magic-ext/tezos@13.5.0-canary.586.5627642781.0
yarn add @magic-ext/webauthn@12.5.0-canary.586.5627642781.0
yarn add @magic-ext/zilliqa@13.5.0-canary.586.5627642781.0
yarn add @magic-sdk/commons@14.5.0-canary.586.5627642781.0
yarn add @magic-sdk/pnp@12.5.0-canary.586.5627642781.0
yarn add @magic-sdk/provider@18.5.0-canary.586.5627642781.0
yarn add @magic-sdk/react-native-bare@19.5.0-canary.586.5627642781.0
yarn add @magic-sdk/react-native-expo@19.5.0-canary.586.5627642781.0
yarn add @magic-sdk/types@15.7.0-canary.586.5627642781.0
yarn add magic-sdk@18.5.0-canary.586.5627642781.0

@octave08 octave08 added the minor Increment the minor version when merged label Jul 20, 2023
@octave08 octave08 self-assigned this Jul 20, 2023
@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #81912: add optional nftEndpoint param.

karljin
karljin previously approved these changes Jul 20, 2023
Comment on lines +25 to +36
test('Generate JSON RPC request payload with method `magic_get_info`', async () => {
const magic = createMagicSDK();
magic.user.request = jest.fn();

await storage.setItem('mc_active_wallet', 'metamask');

await magic.user.getInfo();

const requestPayload = magic.user.request.mock.calls[0][0];
expect(requestPayload.method).toBe('magic_get_info');
expect(requestPayload.params).toEqual([{ walletType: 'metamask' }]);
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is not related to this PR, but it helps this PR to pass the coverage threshold.

@octave08 octave08 requested a review from karljin July 20, 2023 07:03
bengriffin1
bengriffin1 previously approved these changes Jul 20, 2023
@Ariflo Ariflo dismissed bengriffin1’s stale review July 20, 2023 20:55

The merge-base changed after approval.

@octave08 octave08 force-pushed the jayhwang-sc-81912-add-optional-nftendpoint-param branch from 77b5206 to f5fea52 Compare July 20, 2023 23:44
@octave08
Copy link
Collaborator Author

@Ariflo thanks for letting me know
I rebased this PR on the changed merge-base

btw
Do you know how to solve the Canary build failure?

@Ariflo
Copy link
Contributor

Ariflo commented Jul 20, 2023

Do you know how to solve the Canary build failure?

@octave08 we believe it's currently failing due to a recent change to our CI authentication token. Infra is currently in process of getting it fixed. Hoping this get resolved today, if not early tomorrow.

CC: @darrentmagic @Ethella

@octave08 octave08 enabled auto-merge July 21, 2023 16:12
@octave08 octave08 disabled auto-merge July 21, 2023 16:18
@octave08 octave08 enabled auto-merge July 21, 2023 16:19
@octave08 octave08 added this pull request to the merge queue Jul 22, 2023
Merged via the queue into master with commit e011c6f Jul 22, 2023
4 checks passed
@octave08 octave08 deleted the jayhwang-sc-81912-add-optional-nftendpoint-param branch July 22, 2023 00:29
@Ariflo Ariflo added the released This issue/pull request has been released. label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants