Skip to content

Commit

Permalink
fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
popenta committed Nov 8, 2023
1 parent 61177f5 commit 473291e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions multiversx_sdk_cli/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from multiversx_sdk_cli.accounts import Account
from multiversx_sdk_cli.constants import ADDRESS_ZERO_BECH32, DEFAULT_HRP
from multiversx_sdk_cli.contracts import SmartContract
from multiversx_sdk_cli.transactions import (do_prepare_transaction,
tx_to_dictionary_as_inner)
from multiversx_sdk_cli.transactions import (
do_prepare_transaction, tx_to_dictionary_as_inner_for_relayed_V1)

MaxNumShards = 256
ShardIdentiferLen = 2
Expand Down Expand Up @@ -50,7 +50,7 @@ def register(args: Any):
tx = do_prepare_transaction(args)

if hasattr(args, "relay") and args.relay:
args.outfile.write(tx_to_dictionary_as_inner(tx))
args.outfile.write(tx_to_dictionary_as_inner_for_relayed_V1(tx))
return

cli_shared.send_or_simulate(tx, args)
Expand Down
4 changes: 2 additions & 2 deletions multiversx_sdk_cli/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _send_transaction_and_wait_for_result(proxy: INetworkProvider, payload: ITra
raise errors.KnownError("Took too long to get transaction.")


def tx_to_dictionary_as_inner(tx: Transaction) -> Dict[str, Any]:
def tx_to_dictionary_as_inner_for_relayed_V1(tx: Transaction) -> Dict[str, Any]:
dictionary: Dict[str, Any] = {}

dictionary["nonce"] = tx.nonce
Expand Down Expand Up @@ -186,7 +186,7 @@ def _dict_to_json(dictionary: Dict[str, Any]) -> bytes:


def compute_relayed_v1_data(tx: Transaction) -> str:
inner_dictionary = tx_to_dictionary_as_inner(tx)
inner_dictionary = tx_to_dictionary_as_inner_for_relayed_V1(tx)
serialized = _dict_to_json(inner_dictionary)
serialized_hex = serialized.hex()
return f"relayedTx@{serialized_hex}"
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ dependencies = [
"semver",
"requests-cache",
"rich==13.3.4",
"multiversx-sdk-network-providers==0.12.0",
"multiversx-sdk-wallet==0.8.2,",
"multiversx-sdk-core==0.7.1"
"multiversx-sdk-network-providers<0.13.0",
"multiversx-sdk-wallet<0.9.0,",
"multiversx-sdk-core<0.8.0"
]

[tool.hatch.build]
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ semver
requests-cache
rich==13.3.4

multiversx-sdk-core==0.7.1
multiversx-sdk-network-providers==0.12.1
multiversx-sdk-wallet==0.8.2
multiversx-sdk-core<0.8.0
multiversx-sdk-network-providers<0.13.0
multiversx-sdk-wallet<0.9.0

0 comments on commit 473291e

Please sign in to comment.