Skip to content

Commit 3a51022

Browse files
committed
improves VaultDelete failrue conditions
1 parent 5f196f0 commit 3a51022

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

XLS-0065-single-asset-vault/README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -469,19 +469,26 @@ The `VaultDelete` transaction deletes an existing vault object.
469469

470470
### 5.1 Fields
471471

472-
| Field Name | Required? | JSON Type | Internal Type | Default Value | Description |
473-
| ----------------- | :----------------: | :-------: | :-----------: | :-----------: | :-------------------------------------------------------: |
474-
| `TransactionType` | Yes | `string` | `Uint16` | `60` | Transaction type. |
475-
| `VaultID` | Yes | `string` | `Hash256` | `N/A` | The ID of the vault to be deleted. |
476-
| `Data` | No | `string` | `BLOB` | Empty | Arbitrary metadata about the Vault. Limited to 256 bytes. |
472+
| Field Name | Required? | JSON Type | Internal Type | Default Value | Description |
473+
| ----------------- | :-------: | :-------: | :-----------: | :-----------: | :-------------------------------------------------------: |
474+
| `TransactionType` | Yes | `string` | `Uint16` | `60` | Transaction type. |
475+
| `VaultID` | Yes | `string` | `Hash256` | `N/A` | The ID of the vault to be deleted. |
476+
| `Data` | No | `string` | `BLOB` | Empty | Arbitrary metadata about the Vault. Limited to 256 bytes. |
477477

478478
### 5.2 Failure Conditions
479479

480-
1. `Vault` object with the `VaultID` does not exist on the ledger.
481-
2. The submitting account is not the `Owner` of the vault.
482-
3. `AssetsTotal`, `AssetsAvailable`, or `MPTokenIssuance(Vault.ShareMPTID).OutstandingAmount` are greater than zero.
483-
4. The `OwnerDirectory` of the Vault _pseudo-account_ contains pointers to objects other than the `Vault`, the `MPTokenIssuance` for its shares, or an `MPToken` or trust line for its asset.
484-
5. `Data` field is greater than 256 bytes (`temMALFORMED`).
480+
#### 5.2.1. Data Verification
481+
482+
1. `VaultID` is empty. (`temMALFORMED`)
483+
2. `Data` field is provided and `fixLendingProtocolV1_1` amendment is not enabled. (`temDISABLED`)
484+
3. `Data` field is greater than 256 bytes. (`temMALFORMED`)
485+
486+
#### 5.2.2. Protocol-Level Failures
487+
488+
1. `Vault` object with the `VaultID` does not exist on the ledger. (`tecNO_ENTRY`)
489+
2. The submitting account is not the `Owner` of the vault. (`tecNO_PERMISSION`)
490+
3. `AssetsTotal`, `AssetsAvailable`, or `MPTokenIssuance(Vault.ShareMPTID).OutstandingAmount` are greater than zero. (`tecHAS_OBLIGATIONS`)
491+
4. The `OwnerDirectory` of the Vault _pseudo-account_ contains objects other than the `Vault`, the `MPTokenIssuance` for its shares, or an `MPToken` or trust line for its asset. (`tecHAS_OBLIGATIONS`)
485492

486493
### 5.3 State Changes
487494

0 commit comments

Comments
 (0)