From 222e670d9337c6b10ba4eb3c53c9fefab5bf3151 Mon Sep 17 00:00:00 2001 From: kaladinlight <35275952+kaladinlight@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:17:55 -0600 Subject: [PATCH] chore: copy metadata before mutate and warn user to update web with new hash --- cli/src/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/src/index.ts b/cli/src/index.ts index e6bfde9..50200ae 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -88,7 +88,7 @@ const processEpoch = async () => { const nextEpochStartDate = new Date(metadata.epochEndTimestamp + 1) - const hash = await ipfs.updateMetadata(metadata, { + const hash = await ipfs.updateMetadata(Object.assign({}, metadata), { epoch: { number: metadata.epoch, hash: epochHash }, metadata: { epoch: metadata.epoch + 1, @@ -104,6 +104,9 @@ const processEpoch = async () => { info( 'Please update the rFOX Wiki (https://github.com/shapeshift/rFOX/wiki/rFOX-Metadata) and notify the DAO accordingly. Thanks!', ) + warn( + 'Important: CURRENT_EPOCH_METADATA_IPFS_HASH must be updated in web (https://github.com/shapeshift/web/blob/develop/src/pages/RFOX/constants.ts).', + ) } const run = async () => { @@ -171,6 +174,9 @@ const update = async () => { info( 'Please update the rFOX Wiki (https://github.com/shapeshift/rFOX/wiki/rFOX-Metadata) and notify the DAO accordingly. Thanks!', ) + warn( + 'Important: CURRENT_EPOCH_METADATA_IPFS_HASH must be updated in web (https://github.com/shapeshift/web/blob/develop/src/pages/RFOX/constants.ts).', + ) } const processDistribution = async (metadata: RFOXMetadata, epoch: Epoch, wallet: Wallet, ipfs: IPFS) => {