-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert the changes pertaining to introducing network ID in the config…
… file
- Loading branch information
Showing
3 changed files
with
24 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from unittest import TestCase | ||
|
||
from xrpl.asyncio.transaction.main import _RESTRICTED_NETWORKS | ||
from xrpl.clients import WebsocketClient | ||
from xrpl.models.transactions import AccountSet | ||
from xrpl.transaction import autofill | ||
|
||
_FEE = "0.00001" | ||
|
||
|
||
# TODO: move to test_transaction and use the standard integration test setup | ||
class TestNetworkID(TestCase): | ||
# Autofill should override tx networkID for network with ID > 1024 | ||
# and build_version from 1.11.0 or later. | ||
def test_networkid_override(self): | ||
with WebsocketClient("wss://hooks-testnet-v3.xrpl-labs.com") as client: | ||
tx = AccountSet( | ||
account="rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", | ||
fee=_FEE, | ||
domain="www.example.com", | ||
) | ||
tx_autofilled = autofill(tx, client) | ||
self.assertGreaterEqual(client.network_id, _RESTRICTED_NETWORKS) | ||
self.assertEqual(tx_autofilled.network_id, client.network_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters