Skip to content

Commit b937635

Browse files
committed
fix: use destination wallet input when minting ABL tokens
The mint flow was ignoring the Destination Wallet field and always minting to the connected wallet's ATA. Read the input value and fall back to the connected wallet only when empty.
1 parent 26545e7 commit b937635

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tokens/token-2022/transfer-hook/allow-block-list-token/src/components/abl-token/abl-token-manage-token-detail.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,11 @@ function TokenManagement({ tokenInfo }: { tokenInfo: TokenInfo }) {
100100
if (!publicKey || !tokenInfo) return;
101101

102102
try {
103+
const recipient = destinationWallet.trim() ? new PublicKey(destinationWallet.trim()) : publicKey;
103104
await mintTo.mutateAsync({
104105
mint: new PublicKey(tokenInfo.address),
105106
amount: new BN(mintAmount),
106-
recipient: publicKey,
107+
recipient,
107108
});
108109
console.log("Minted successfully");
109110
} catch (err) {

0 commit comments

Comments
 (0)