mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 19:55:54 +00:00
Update airgapped-wallet to work with 2.0
This commit is contained in:
@@ -63,10 +63,9 @@ def sign_transaction(xrp_amount, destination, ledger_seq, wallet_seq, password):
|
||||
seed = crypt.decrypt(seed)
|
||||
|
||||
print("4. Initializing wallet using decrypted private key")
|
||||
_wallet = wallet.Wallet(seed=seed.decode(), sequence=0)
|
||||
_wallet = wallet.Wallet.from_seed(seed=seed.decode())
|
||||
|
||||
validated_seq = ledger_seq
|
||||
_wallet.sequence = wallet_seq
|
||||
|
||||
print("5. Constructing payment transaction...")
|
||||
my_tx_payment = Payment(
|
||||
@@ -75,7 +74,7 @@ def sign_transaction(xrp_amount, destination, ledger_seq, wallet_seq, password):
|
||||
destination=destination,
|
||||
last_ledger_sequence=validated_seq + 100,
|
||||
# +100 to catch up with the ledger when we transmit the signed tx blob to Machine 2
|
||||
sequence=_wallet.sequence,
|
||||
sequence=wallet_seq,
|
||||
fee="10"
|
||||
)
|
||||
|
||||
|
||||
@@ -58,19 +58,18 @@ def sign_transaction(_xrp_amount, _destination, _ledger_seq, _wallet_seq, passwo
|
||||
|
||||
# Decrypts the wallet's private key
|
||||
_seed = crypt.decrypt(_seed)
|
||||
_wallet = wallet.Wallet(seed=_seed.decode(), sequence=0)
|
||||
_wallet = wallet.Wallet.from_seed(seed=_seed.decode())
|
||||
|
||||
validated_seq = _ledger_seq
|
||||
_wallet.sequence = _wallet_seq
|
||||
|
||||
# Construct Payment transaction
|
||||
my_tx_payment = Payment(
|
||||
account=_wallet.classic_address,
|
||||
account=_wallet.address,
|
||||
amount=xrp_to_drops(xrp=_xrp_amount),
|
||||
destination=_destination,
|
||||
last_ledger_sequence=validated_seq + 100,
|
||||
# +100 to catch up with the ledger when we transmit the signed tx blob to Machine 2
|
||||
sequence=_wallet.sequence,
|
||||
sequence=_wallet_seq,
|
||||
fee="10"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Django==3.2.19
|
||||
ECPy==1.2.5
|
||||
h11==0.12.0
|
||||
httpcore==0.13.6
|
||||
httpx==0.23.0
|
||||
# httpx==0.23.0
|
||||
idna==3.2
|
||||
image==1.5.33
|
||||
pifacedigitalio==3.0.5
|
||||
@@ -21,6 +21,6 @@ rfc3986==1.5.0
|
||||
six==1.16.0
|
||||
sniffio==1.2.0
|
||||
sqlparse==0.4.4
|
||||
typing-extensions==3.10.0.0
|
||||
websockets==9.1
|
||||
xrpl-py==2.0.0
|
||||
typing-extensions==4.2.0
|
||||
websockets==10.0
|
||||
xrpl-py==2.0.0beta
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
xrpl-py==2.0.0
|
||||
xrpl-py==2.0.0beta
|
||||
wxPython==4.1.1
|
||||
toml==0.10.2
|
||||
requests==2.25.1
|
||||
|
||||
Reference in New Issue
Block a user