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

programId field missing in the TokenBalance type. #3091

Open
kyee-rs opened this issue Aug 11, 2024 · 1 comment
Open

programId field missing in the TokenBalance type. #3091

kyee-rs opened this issue Aug 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kyee-rs
Copy link

kyee-rs commented Aug 11, 2024

Overview

type TokenBalance = {
    accountIndex: number;
    mint: string;
    owner?: string;
    uiTokenAmount: TokenAmount;
};

This type lacks the programId field specified here. However I can not spot the place in code where that type is being generated so I can not make a pull request.

Steps to reproduce

  1. Open the node_modules/@solana/web3.js/lib/index.d.ts (Line 2263 on v1.95.2)

Description of bug

-

@kyee-rs kyee-rs added the bug Something isn't working label Aug 11, 2024
@buffalojoec
Copy link
Collaborator

buffalojoec commented Aug 12, 2024

Since you've mentioned version 1.95, that change has to be made on the maintenance/v1.x branch. Everything in master is >2.0.

You can find the type here.

export type TokenBalance = {
accountIndex: number;
mint: string;
owner?: string;
uiTokenAmount: TokenAmount;
};

If you're interested in opening a PR, that would be great! Just make sure to update the superstruct validation (field is optional). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants