diff --git a/docs/openapi.yaml b/docs/openapi.yaml index f97ea00..3a77c2d 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -542,6 +542,7 @@ paths: transaction_id: type: string description: Transaction ID + example: '581186ab56765aed64a3e73172872a6454c604c6b4e08a8ed03eabad94e74d64' responses: 200: description: Successful operation diff --git a/src/ethereum/nft.rs b/src/ethereum/nft.rs index 81ccb5c..0fc1f31 100644 --- a/src/ethereum/nft.rs +++ b/src/ethereum/nft.rs @@ -127,7 +127,10 @@ pub async fn process_nft_events( let token_id: i32 = token_id_u256.try_into() .map_err(|_| EthereumError::ConversionError)?; post.token_id = Some(token_id); - post.token_tx_id = Some(tx_id); + if post.token_tx_id.as_ref() != Some(&tx_id) { + log::warn!("overwriting incorrect tx id {:?}", post.token_tx_id); + post.token_tx_id = Some(tx_id); + }; update_post(db_client, &post).await?; token_waitlist_map.remove(&post.id); };