Skip to content

Commit

Permalink
convert token_id to BeBigUint
Browse files Browse the repository at this point in the history
  • Loading branch information
laruh committed Sep 3, 2024
1 parent 5625d35 commit 01b9974
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mm2src/coins/nft/storage/wasm/wasm_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ impl NftTransferHistoryStorageOps for NftCacheIDBLocked<'_> {
.map(|(_item_id, item)| transfer_details_from_item(item))
.collect();
let transfers = transfers?;
log!("transfers {:?}", transfers);
log!("log transfers {:?}", transfers);

for mut transfer in transfers {
transfer.token_uri = transfer_meta.token_uri.clone();
Expand All @@ -609,10 +609,10 @@ impl NftTransferHistoryStorageOps for NftCacheIDBLocked<'_> {
.with_value(&chain_str)?
.with_value(&transfer.common.transaction_hash)?
.with_value(transfer.common.log_index)?
.with_value(transfer.token_id.clone())?;
.with_value(BeBigUint::from(transfer.token_id.clone()))?;

let item = NftTransferHistoryTable::from_transfer_history(&transfer)?;
log!("item {:?}", item);
log!("log item {:?}", item);
table.replace_item_by_unique_multi_index(index_keys, &item).await?;
}
Ok(())
Expand Down Expand Up @@ -700,7 +700,7 @@ impl NftTransferHistoryStorageOps for NftCacheIDBLocked<'_> {
.with_value(&chain_str)?
.with_value(&transfer.common.transaction_hash)?
.with_value(transfer.common.log_index)?
.with_value(transfer.token_id.clone())?;
.with_value(BeBigUint::from(transfer.token_id.clone()))?;

let item = NftTransferHistoryTable::from_transfer_history(&transfer)?;
table.replace_item_by_unique_multi_index(index_keys, &item).await?;
Expand Down Expand Up @@ -787,7 +787,7 @@ async fn update_transfer_phishing_for_index(
.with_value(chain)?
.with_value(&transfer.common.transaction_hash)?
.with_value(transfer.common.log_index)?
.with_value(transfer.token_id)?;
.with_value(BeBigUint::from(transfer.token_id))?;
table
.replace_item_by_unique_multi_index(index_keys, &transfer_item)
.await?;
Expand Down

0 comments on commit 01b9974

Please sign in to comment.