mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-29 16:15:48 +00:00
Revert cancel-an-expired-escrow.md to match master branch.
This commit is contained in:
@@ -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_
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
## 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_
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
## 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' %} <!--#{ fix md highlighting_ #}-->
|
||||
|
||||
## 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_
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user