Skip to content

test: add integration test for getTokenAccountBalance#95

Merged
lpahlavi merged 4 commits intomainfrom
lpahlavi/XC-325-get-token-account-balance-validator-tests
May 9, 2025
Merged

test: add integration test for getTokenAccountBalance#95
lpahlavi merged 4 commits intomainfrom
lpahlavi/XC-325-get-token-account-balance-validator-tests

Conversation

@lpahlavi
Copy link
Contributor

@lpahlavi lpahlavi commented May 7, 2025

(XC-325) Add integration test for getTokenAccountBalance with Solana validator.

@lpahlavi lpahlavi marked this pull request as ready for review May 7, 2025 12:08
@lpahlavi lpahlavi requested a review from a team as a code owner May 7, 2025 12:08
Copy link
Contributor

@gregorydemay gregorydemay left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @lpahlavi ! Main question for me is whether to put the common code related to SPL in some separate crate if it could be useful to developers using SOL RPC

Comment on lines +330 to +332
.modify_params(|params| {
params.commitment = Some(CommitmentLevel::Confirmed)
})
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I have the impression we could simplify all the tests here by changing icp_client to

    fn icp_client(&self) -> SolRpcClient<PocketIcLiveModeRuntime> {
        self.setup
            .client_live_mode()
            .with_default_commitment_level(CommitmentLevel::Confirmed)
            .build()
    }

so that the client uses by default Confirmed and modify_params is then no longer necessary. Better to do that in a separate PR, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, good idea! I will do that in a separate PR.

@lpahlavi lpahlavi merged commit c4da24f into main May 9, 2025
12 checks passed
@lpahlavi lpahlavi deleted the lpahlavi/XC-325-get-token-account-balance-validator-tests branch May 9, 2025 12:24
@github-actions github-actions bot mentioned this pull request Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants