diff --git a/.github/workflows/nox.yml b/.github/workflows/nox.yml deleted file mode 100644 index 74af683c..00000000 --- a/.github/workflows/nox.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: nox -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - nox: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] - steps: - - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - - name: Install nox - run: pip install nox - - run: nox diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bc9e386..ff05a641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/crates/transaction-status/src/lib.rs b/crates/transaction-status/src/lib.rs index 3c1f9ddf..efc122e5 100644 --- a/crates/transaction-status/src/lib.rs +++ b/crates/transaction-status/src/lib.rs @@ -106,6 +106,11 @@ impl UiCompiledInstruction { pub fn data(&self) -> String { self.0.data.clone() } + + #[getter] + pub fn stack_height(&self) -> Option { + self.0.stack_height + } } #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, From, Into)] diff --git a/noxfile.py b/noxfile.py deleted file mode 100644 index 6d5732d0..00000000 --- a/noxfile.py +++ /dev/null @@ -1,20 +0,0 @@ -# type: ignore -import nox - - -@nox.session -def python(session): - session.install( - "pytest", - "pytest-asyncio", - "maturin", - "sphinx", - "based58", - "pybip39", - "typing-extensions", - "jsonalias", - "myst-parser", - "mnemonic", - ) - session.install(".", "--no-build-isolation") - session.run("make", "test", external=True) diff --git a/tests/test_keypair.py b/tests/test_keypair.py index 916ab6e4..109eb1bf 100644 --- a/tests/test_keypair.py +++ b/tests/test_keypair.py @@ -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)