From 8cdbf05ef6c71e4f2cf283dedd36a2e364daf3a8 Mon Sep 17 00:00:00 2001
From: Shawn Xie <35279399+shawnxie999@users.noreply.github.com>
Date: Thu, 12 Dec 2024 08:17:43 -0800
Subject: [PATCH] Use clio's include_deleted param in ledger_entry to fetch
deleted MPT (#1097)
## High Level Overview of Change
### Context of Change
Before
after
`getMPTIssuance` fails to fetch the MPT because the MPT itself has been
deleted. Clio's ledger_entry API supports querying deleted object by
specifying `include_deleted` to be true
### Type of Change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] Refactor (non-breaking change that only restructures code)
- [ ] Tests (You added tests for code that already exists, or your new
feature included in this PR)
- [ ] Documentation Updates
- [ ] Translation Updates
- [ ] Release
### TypeScript/Hooks Update
- [ ] Updated files to React Hooks
- [ ] Updated files to TypeScript
## Before / After
## Test Plan
---
src/rippled/lib/rippled.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/rippled/lib/rippled.js b/src/rippled/lib/rippled.js
index 85900ffa9..89f47ad6e 100644
--- a/src/rippled/lib/rippled.js
+++ b/src/rippled/lib/rippled.js
@@ -573,10 +573,11 @@ const getFeature = (rippledSocket, amendmentId) => {
}
const getMPTIssuance = (rippledSocket, tokenId) =>
- query(rippledSocket, {
+ queryP2P(rippledSocket, {
command: 'ledger_entry',
mpt_issuance: tokenId,
ledger_index: 'validated',
+ include_deleted: true,
}).then((resp) => {
if (
resp.error === 'entryNotFound' ||