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 missing stack height getter #103

Merged
merged 4 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/workflows/nox.yml

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## [0.21.1] - Unreleased

### Fixed

- Avoid panic in `Keypair.from_base58_string` [(#93)](https://github.com/kevinheavey/solders/pull/93).
- Add missing `stack_height` getter [(#103)](https://github.com/kevinheavey/solders/pull/103).

## [0.21.0] - 2024-03-13

Expand Down
5 changes: 5 additions & 0 deletions crates/transaction-status/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ impl UiCompiledInstruction {
pub fn data(&self) -> String {
self.0.data.clone()
}

#[getter]
pub fn stack_height(&self) -> Option<u32> {
self.0.stack_height
}
}

#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, From, Into)]
Expand Down
20 changes: 0 additions & 20 deletions noxfile.py

This file was deleted.

2 changes: 2 additions & 0 deletions tests/test_keypair.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ def test_str() -> None:
assert str(kp) == expected
assert Keypair.from_base58_string(expected) == kp


def test_bad_str() -> None:
raw = "foo"
with raises(ValueError):
Keypair.from_base58_string(raw)


def test_sign_message() -> None:
seed = bytes([1] * 32)
keypair = Keypair.from_seed(seed)
Expand Down
Loading