From c5032d845532d975196e096281b5b48f98e2bb37 Mon Sep 17 00:00:00 2001 From: bry Date: Tue, 12 Sep 2023 16:07:39 -0500 Subject: [PATCH] Fix swaps --- src/features/swaps/SwapScreen.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/features/swaps/SwapScreen.tsx b/src/features/swaps/SwapScreen.tsx index 48424d6cc..78071c196 100644 --- a/src/features/swaps/SwapScreen.tsx +++ b/src/features/swaps/SwapScreen.tsx @@ -351,14 +351,16 @@ const SwapScreen = () => { ? new PublicKey(recipient) : new PublicKey(currentAccount.solanaAddress) - if (youPayMint.equals(HNT_MINT) && youReceiveTokenAmount) { + if ( + youPayMint.equals(HNT_MINT) && + youReceiveMint.equals(DC_MINT) && + youReceiveTokenAmount + ) { await submitMintDataCredits({ dcAmount: new BN(youReceiveTokenAmount), recipient: recipientAddr, }) - } - - if (!youPayMint.equals(HNT_MINT)) { + } else { await submitTreasurySwap(youPayMint, youPayTokenAmount, recipientAddr) }