Skip to content

Fix nft history#1096

Merged
danielailie merged 3 commits intomainfrom
TOOL-661-fix-nft-history
Aug 13, 2025
Merged

Fix nft history#1096
danielailie merged 3 commits intomainfrom
TOOL-661-fix-nft-history

Conversation

@danielailie
Copy link
Collaborator

No description provided.

@danielailie danielailie self-assigned this Aug 12, 2025
vladbucur1
vladbucur1 previously approved these changes Aug 12, 2025
andreibancioiu
andreibancioiu previously approved these changes Aug 12, 2025
@andreibancioiu andreibancioiu requested a review from Copilot August 12, 2025 18:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the NFT history functionality by extracting the base64 to Bech32 address conversion logic into a shared utility function. The change centralizes address conversion logic that was previously duplicated across multiple asset history services.

  • Adds a new base64ToBech32 utility function to handle address conversion
  • Replaces inline base64ToBech32() method calls with the new utility function
  • Updates import statements to include the new utility function

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/utils/helpers.ts Adds new base64ToBech32 utility function for address conversion
src/modules/asset-history/services/assets-history.nfts-swap-auction.service.ts Replaces inline address conversion with utility function calls
src/modules/asset-history/services/assets-history.nft-events.service.ts Replaces inline address conversion with utility function calls and reorders imports
src/modules/asset-history/services/assets-history.auction.service.ts Replaces inline address conversion with utility function calls

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

};

export function base64ToBech32(topic: string) {
if (topic) {
Copy link

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The truthy check for 'topic' may not be sufficient. An empty string would pass this check but would cause an error in the Buffer.from() call. Consider using a more specific check like 'if (topic && topic.length > 0)' or handle the empty string case explicitly.

Suggested change
if (topic) {
if (topic && topic.length > 0) {

Copilot uses AI. Check for mistakes.
@danielailie danielailie dismissed stale reviews from andreibancioiu and vladbucur1 via 4150aef August 13, 2025 06:41
@danielailie danielailie merged commit 6aeee94 into main Aug 13, 2025
1 check passed
@danielailie danielailie deleted the TOOL-661-fix-nft-history branch August 13, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants