Skip to content

Commit

Permalink
Fix swaps
Browse files Browse the repository at this point in the history
  • Loading branch information
bryzettler committed Sep 12, 2023
1 parent 05e9c58 commit c5032d8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/features/swaps/SwapScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit c5032d8

Please sign in to comment.