magic-js icon indicating copy to clipboard operation
magic-js copied to clipboard

MagicWallet type is different from the data type being returned

Open akinwol opened this issue 1 year ago • 4 comments

✅ Prerequisites

  • [x] Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
  • [x] Are you running the latest SDK version?
  • [x] Are you reporting to the correct repository (magic-sdk)?

🐛 Description

[Description of the bug.]

🧩 Steps to Reproduce

  1. Run this code
 const userMetadata = await magic.users.getMetadataByTokenAndWallet(didToken, WalletType.SOLANA);

🤔 Expected behavior

Expectation is that userMetadata.wallets is of this

export interface MagicWallet {
    network: string | null;
    publicAddress: string | null;
    walletType: string | null;
}

😮 Actual behavior

What you get in the response is this

 wallet: {
    network: 'MAINNET',
    public_address: 'hCRR31qArEDTwUpaMP6Y2SndhUUJ4dncd1pvSmyUzi9',
    wallet_type: 'SOLANA'
  }

Seems like the response is in snake case instead of camel case

akinwol avatar May 19 '23 12:05 akinwol

@akinwol Could you also provide the magic-sdk version along with the Solana extension version?

ayv8er avatar May 21 '23 02:05 ayv8er

@ayv8er see the versions below

"@magic-ext/solana": "^13.1.3", "@magic-sdk/admin": "^1.10.0",

akinwol avatar May 26 '23 00:05 akinwol

@akinwol Could I also ask for magic-sdk version as well?

ayv8er avatar May 26 '23 00:05 ayv8er

@ayv8er "magic-sdk": "^17.1.4",

akinwol avatar May 26 '23 00:05 akinwol