Skip to content

Commit

Permalink
Removed deprecated unmint code
Browse files Browse the repository at this point in the history
  • Loading branch information
macterra committed Oct 23, 2023
1 parent 3d25c36 commit 7dfe3f7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
8 changes: 0 additions & 8 deletions frontend/src/TxnLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,6 @@ const TxnLog = ({ profile, refreshProfile }) => {
setCredits(-record.credits);
}

if (record.type === 'unmint') {
const response = await fetch(`/api/v1/asset/${record.xid}`);
const metadata = await response.json();

setMessage(<div>Unminted {assetLink(metadata)}.</div>);
setCredits(record.credits);
}

if (record.type === 'upload') {
const response = await fetch(`/api/v1/asset/${record.xid}`);
const metadata = await response.json();
Expand Down
30 changes: 0 additions & 30 deletions xidb.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,36 +335,6 @@ const repairAsset = (xid) => {
}
}

// Revise history to remove everything before unmints
// const history = getHistory(xid); // history is in reverse order!

// if (history) {
// let lastUnmintIndex = -1;

// for (let i = 0; i < history.length; i++) {
// if (history[i].type === 'unmint') {
// lastUnmintIndex = i;
// break;
// }
// }

// if (lastUnmintIndex !== -1) {
// const jsonlPath = path.join(config.assets, xid, 'history.jsonl');
// fs.rmSync(jsonlPath);

// for (let i = lastUnmintIndex - 1; i >= 0; i--) {
// const recordString = JSON.stringify(history[i]);
// fs.appendFileSync(jsonlPath, recordString + '\n');
// }

// return {
// xid: xid,
// fixed: true,
// message: `removed unmints from history`,
// }
// }
// }

if (assetData.nft) {

let doSave = false;
Expand Down

0 comments on commit 7dfe3f7

Please sign in to comment.