From 9fdb995431dce112159af490481dd159cc2b0990 Mon Sep 17 00:00:00 2001 From: Oliver Eggert Date: Thu, 8 Dec 2022 15:11:58 -0800 Subject: [PATCH] Revert cancel-an-expired-escrow.md to match master branch. --- .../use-escrows/cancel-an-expired-escrow.md | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/content/tutorials/use-specialized-payment-types/use-escrows/cancel-an-expired-escrow.md b/content/tutorials/use-specialized-payment-types/use-escrows/cancel-an-expired-escrow.md index b93ab10d2c..bcaa730bd7 100644 --- a/content/tutorials/use-specialized-payment-types/use-escrows/cancel-an-expired-escrow.md +++ b/content/tutorials/use-specialized-payment-types/use-escrows/cancel-an-expired-escrow.md @@ -8,11 +8,9 @@ labels: --- # Cancel an Expired Escrow -An escrow in the XRP Ledger is expired when its `CancelAfter` time is lower than the `close_time` of the latest validated ledger. Escrows without a `CancelAfter` time never expire. +## 1. Confirm the expired escrow -## 1. Get the latest validated ledger - -Use the [ledger method][] to look up the latest validated ledger and get the `close_time` value. +An escrow in the XRP Ledger is expired when its `CancelAfter` time is lower than the `close_time` of a validated ledger version. (If the escrow does not have a `CancelAfter` time, it never expires.) You can look up the close time of the latest validated ledger with the [ledger method][]: Request: @@ -38,10 +36,8 @@ _Websocket_ -## 2. Look up the escrow - Note to Dennis: Maybe include the look up escrows info here and remove the corresponding page entirely? <--> -Use the [account_objects method][] and compare `CancelAfter` to `close_time`: +You can look up the escrow and compare to the `CancelAfter` time using the [account_objects method][]: Request: @@ -67,7 +63,7 @@ _Websocket_ -## 3. Submit EscrowCancel transaction +## 2. Submit EscrowCancel transaction ***Anyone*** can cancel an expired escrow in the XRP Ledger by [signing and submitting](transaction-basics.html#signing-and-submitting-transactions) an [EscrowCancel transaction][]. Set the `Owner` field of the transaction to the `Account` of the `EscrowCreate` transaction that created this escrow. Set the `OfferSequence` field to the `Sequence` of the `EscrowCreate` transaction. @@ -99,13 +95,13 @@ _Websocket_ Take note of the transaction's identifying `hash` value so you can check its final status when it is included in a validated ledger version. -## 4. Wait for validation +## 3. Wait for validation {% include '_snippets/wait-for-validation.md' %} -## 5. Confirm final result +## 4. Confirm final result -Use the [tx method][] with the `EscrowCancel` transaction's identifying hash to check its final status. Look in the transaction metadata for a `DeletedNode` with `LedgerEntryType` of `Escrow`. Also look for a `ModifiedNode` of type `AccountRoot` for the sender of the escrowed payment. The `FinalFields` of the object should show the increase in XRP in the `Balance` field for the returned XRP. +Use the [tx method][] with the EscrowCancel transaction's identifying hash to check its final status. Look in the transaction metadata for a `DeletedNode` with `LedgerEntryType` of `Escrow`. Also look for a `ModifiedNode` of type `AccountRoot` for the sender of the escrowed payment. The `FinalFields` of the object should show the increase in XRP in the `Balance` field for the returned XRP. Request: @@ -133,7 +129,7 @@ _Websocket_ In the above example, `r3wN3v2vTUkr5qd6daqDc2xE4LSysdVjkT` is the sender of the escrow, and the increase in `Balance` from 99999**8**9990 drops to 99999**9**9990 drops represents the return of the escrowed 10,000 drops of XRP (0.01 XRP). -***TODO: Figure out why EscrowFinish is mentioned here. I'm not seeing how it relates to canceling escrows.*** + **Tip:** If you don't know what `OfferSequence` to use in the [EscrowFinish transaction][] to execute an escrow, use the [tx method][] to look up the transaction that created the escrow, using the identifying hash of the transaction in the Escrow's `PreviousTxnID` field. Use the `Sequence` value of that transaction as the `OfferSequence` value when finishing the escrow.