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

Update references of sdk-py-* libraries. Adjust requirements constraints #287

Merged
merged 2 commits into from
Jul 14, 2023
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
13 changes: 7 additions & 6 deletions multiversx_sdk_cli/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@
import logging
import time
from collections import OrderedDict
from typing import Any, Dict, List, Protocol, Sequence, TextIO, Tuple
from typing import Any, Dict, List, Optional, Protocol, Sequence, TextIO, Tuple

from multiversx_sdk_cli import config, errors, utils
from multiversx_sdk_cli.accounts import Account, Address, LedgerAccount
from multiversx_sdk_cli.cli_password import load_password, load_guardian_password
from multiversx_sdk_cli.cli_password import (load_guardian_password,
load_password)
from multiversx_sdk_cli.cosign_transaction import cosign_transaction
from multiversx_sdk_cli.errors import NoWalletProvided
from multiversx_sdk_cli.interfaces import ITransaction
from multiversx_sdk_cli.cosign_transaction import cosign_transaction
from multiversx_sdk_cli.ledger.ledger_functions import do_get_ledger_address

logger = logging.getLogger("transactions")


class ITransactionOnNetwork(Protocol):
hash: str
is_completed: bool
is_completed: Optional[bool]

def to_dictionary(self) -> Dict[str, Any]:
...
Expand All @@ -31,13 +32,13 @@
def send_transactions(self, transactions: Sequence[ITransaction]) -> Tuple[int, str]:
...

def get_transaction(self, tx_hash: str) -> ITransactionOnNetwork:
def get_transaction(self, tx_hash: str, with_process_status: Optional[bool]) -> ITransactionOnNetwork:
Copy link
Contributor

Choose a reason for hiding this comment

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

In the py-network-providers the value is by default set to False

...


class Transaction(ITransaction):
def __init__(self):
self.hash: str = ""

Check warning on line 41 in multiversx_sdk_cli/transactions.py

View workflow job for this annotation

GitHub Actions / runner / mypy

[mypy] reported by reviewdog 🐶 By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] Raw Output: /home/runner/work/mx-sdk-py-cli/mx-sdk-py-cli/multiversx_sdk_cli/transactions.py:41:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
self.nonce = 0
self.value = "0"
self.receiver = ""
Expand All @@ -46,7 +47,7 @@
self.receiverUsername = ""
self.gasPrice = 0
self.gasLimit = 0
self.data: str = ""

Check warning on line 50 in multiversx_sdk_cli/transactions.py

View workflow job for this annotation

GitHub Actions / runner / mypy

[mypy] reported by reviewdog 🐶 By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] Raw Output: /home/runner/work/mx-sdk-py-cli/mx-sdk-py-cli/multiversx_sdk_cli/transactions.py:50:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
self.chainID = ""
self.version = 0
self.options = 0
Expand Down Expand Up @@ -147,7 +148,7 @@
for _ in range(0, num_periods_to_wait):
time.sleep(AWAIT_TRANSACTION_PERIOD)

tx = proxy.get_transaction(tx_hash)
tx = proxy.get_transaction(tx_hash, with_process_status=True)
if tx.is_completed:
return tx
else:
Expand Down Expand Up @@ -222,7 +223,7 @@

class BunchOfTransactions:
def __init__(self):
self.transactions: List[Transaction] = []

Check warning on line 226 in multiversx_sdk_cli/transactions.py

View workflow job for this annotation

GitHub Actions / runner / mypy

[mypy] reported by reviewdog 🐶 By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked] Raw Output: /home/runner/work/mx-sdk-py-cli/mx-sdk-py-cli/multiversx_sdk_cli/transactions.py:226:9: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]

def add_prepared(self, transaction: Transaction):
self.transactions.append(transaction)
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "multiversx-sdk-cli"
version = "7.0.0"
version = "7.1.0"
authors = [
{ name="MultiversX" },
]
Expand All @@ -26,8 +26,8 @@ dependencies = [
"semver",
"requests-cache",
"rich==13.3.4",
"multiversx-sdk-network-providers==0.6.*",
"multiversx-sdk-wallet==0.7.*",
"multiversx-sdk-network-providers>=0.11.0",
"multiversx-sdk-wallet>=0.7.0",
"multiversx-sdk-core>=0.5.0"
]

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ requests-cache
rich==13.3.4

multiversx-sdk-core>=0.5.0
multiversx-sdk-network-providers==0.6.*
multiversx-sdk-wallet==0.7.*
multiversx-sdk-network-providers>=0.11.0
multiversx-sdk-wallet>=0.7.0
Loading