Skip to content

Commit 862b93d

Browse files
committed
fix: fix NFT balance in send flow
1 parent 56ca284 commit 862b93d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ui/ducks/send/send.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
TransactionEnvelopeType,
1313
TransactionType,
1414
} from '@metamask/transaction-controller';
15+
import { toHex } from '@metamask/controller-utils';
1516
import { getErrorMessage } from '../../../shared/modules/error';
1617
import {
1718
decimalToHex,
@@ -2731,9 +2732,7 @@ export function updateSendAsset(
27312732

27322733
if (isCurrentOwner) {
27332734
asset.error = null;
2734-
asset.balance = details.balance
2735-
? addHexPrefix(details.balance)
2736-
: '0x1';
2735+
asset.balance = details.balance ? toHex(details.balance) : '0x1';
27372736
} else {
27382737
throw new Error(
27392738
'Send slice initialized as NFT send with an NFT not currently owned by the select account',

0 commit comments

Comments
 (0)