Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [[4.0.0](https://github.com/multiversx/mx-sdk-dapp-form/pull/387)] - 2026-03-11
## [[4.0.0](https://github.com/multiversx/mx-sdk-dapp-form/pull/388)] - 2026-03-11

- [Upgrade build system](https://github.com/multiversx/mx-sdk-dapp-form/pull/385)
- [Fix NFT extraction address errro](https://github.com/multiversx/mx-sdk-dapp-form/pull/387)
- [Upgrade build system](https://github.com/multiversx/mx-sdk-dapp-form/pull/386)

## [[3.2.2](https://github.com/multiversx/mx-sdk-dapp-form/pull/384)] - 2026-03-11

Expand Down
7 changes: 6 additions & 1 deletion src/hooks/getInitialValues/extractNftFromData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ export const extractNftFromData = ({
usedReceiver
].every((el) => el);

const isValidReceiver = addressIsValid(bech32.encode(usedReceiver));
let isValidReceiver = addressIsValid(usedReceiver);
if (!isValidReceiver) {
try {
isValidReceiver = addressIsValid(bech32.encode(usedReceiver));
} catch (encodeErr) {}
}

if (hasAllDataFields && isValidReceiver) {
return {
Expand Down
5 changes: 4 additions & 1 deletion src/hooks/getInitialValues/searchNft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
getGlobalNftByIdentifier,
getNftByAddressAndIdentifier
} from 'apiCalls';
import { addressIsValid } from '@multiversx/sdk-dapp/out/utils/validation/addressIsValid';
import { bech32 } from 'helpers/transformations';
import { extractNftFromData } from './extractNftFromData';
import { SearchNFTPropsType } from './searchNft.types';
Expand Down Expand Up @@ -41,7 +42,9 @@ export const searchNft = async (
const apiNft = await searchNftById({ identifier, address }, apiConfig);
if (apiNft) {
return {
receiver: bech32.encode(receiver),
receiver: addressIsValid(receiver)
? receiver
: bech32.encode(receiver),
nft: apiNft,
quantity: nft ? quantity : new BigNumber(quantity, 16).toString(10)
};
Expand Down
Loading