Skip to content

Commit

Permalink
Closes #158
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankC01 committed Aug 26, 2023
1 parent f1c7f5a commit d5101eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- [bug](https://github.com/FrankC01/pysui/issues/158) Failure evaluating Command in `verify_transaction(...)`
- Fails gracefully if calling `get_gas_from_faucet` on SuiClient's with non-supported config.

### Changed
Expand Down
9 changes: 5 additions & 4 deletions pysui/sui/sui_txn/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ def build_for_inspection(self) -> str:
@versionchanged(
version="0.31.0", reason="Validating against all PTB constraints"
)
@versionchanged(
version="0.34.0", reason="Fixed Command argument evaluation"
)
def verify_transaction(
self, ser_kind: Optional[bytes] = None
) -> tuple[TransactionConstraints, Union[dict, None]]:
Expand Down Expand Up @@ -252,16 +255,14 @@ def verify_transaction(
args_one = len(prog_txn.value.Arguments)
type_args_one = len(prog_txn.value.Type_Arguments)
case "TransferObjects":
args_one = len(prog_txn.value.Arguments)
args_one = len(prog_txn.value.Objects)
case "MergeCoins":
args_one = len(prog_txn.value.FromCoins)
case "SplitCoin":
args_one = len(prog_txn.value.Amount)
case "MakeMoveVec":
args_one = len(prog_txn.value.Vector)
case "Publish":
args_one = len(prog_txn.value.Modules)
case "Upgrade":
case "Publish" | "Upgrade":
args_one = len(prog_txn.value.Modules)
case _:
pass
Expand Down

0 comments on commit d5101eb

Please sign in to comment.