From ce9439d6d69014b46c3108c2ac2fabbdc93d6952 Mon Sep 17 00:00:00 2001 From: Obiajulu <47371105+ObiajuluM@users.noreply.github.com> Date: Tue, 6 Sep 2022 12:24:54 -0700 Subject: [PATCH] Update cancel_escrow.py --- content/_code-samples/escrow/py/cancel_escrow.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/content/_code-samples/escrow/py/cancel_escrow.py b/content/_code-samples/escrow/py/cancel_escrow.py index 32ca68dbf8..46a3ec54c1 100644 --- a/content/_code-samples/escrow/py/cancel_escrow.py +++ b/content/_code-samples/escrow/py/cancel_escrow.py @@ -2,19 +2,18 @@ from xrpl.models import EscrowCancel from xrpl.clients import JsonRpcClient from xrpl.transaction import (safe_sign_and_autofill_transaction, send_reliable_submission) -from xrpl.wallet import Wallet +from xrpl.wallet import Wallet, generate_faucet_wallet client = JsonRpcClient("https://s.altnet.rippletest.net:51234") # connect to the testnetwork # Cancel an escrow # If the escrow wasnt created with a CancelAfter time, it never expires and this transaction fails -sender_seed = "sxxxxxxxxxxxxxxxxxxxxxx" # sender seeed -escrow_creator = "rxxxxxxxxxxxxxxxxxxxxxxxxxxx" # escrow creator/ sender address +escrow_creator = generate_faucet_wallet(client=client).classic_address # escrow creator/ sender address escrow_seq = int # escrow sequence # generate wallet object -sender_wallet = Wallet(seed=sender_seed, sequence=0) +sender_wallet = generate_faucet_wallet(client=client) # build escrow cancel transaction cancel_txn = EscrowCancel(account=sender_wallet.classic_address, owner=escrow_creator, offer_sequence=escrow_seq)