Skip to content

Commit

Permalink
fix: evm proxy history object string
Browse files Browse the repository at this point in the history
  • Loading branch information
phamphong9981 committed Sep 6, 2024
1 parent 0d407f9 commit 554e7b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/services/evm/crawl_evm_proxy_history.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,13 @@ export default class CrawlProxyContractEVMService extends BullableService {
}

newJSONProxy.proxy_contract = _.toLower(evmEvent.address);
newJSONProxy.implementation_contract =
_.toLower(implementationAddress as string | undefined) || null;
if (implementationAddress) {
newJSONProxy.implementation_contract = _.toLower(
implementationAddress as string
);
} else {
newJSONProxy.implementation_contract = null;
}
newJSONProxy.block_height = evmEvent.block_height;
newJSONProxy.tx_hash = evmEvent.tx_hash;
newJSONProxy.last_updated_height = lastUpdatedHeight;
Expand Down

0 comments on commit 554e7b6

Please sign in to comment.