Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
fix: sell button on buy modal
Browse files Browse the repository at this point in the history
  • Loading branch information
alantoa committed Oct 27, 2023
1 parent 64c85d4 commit 9cebac9
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions packages/app/components/creator-token/buy-creator-token.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,6 @@ export const BuyCreatorToken = () => {
});

const renderBuyButton = () => {
if (usdcBalance.data?.balance === 0n && !wallet.isMagicWallet) {
return (
<Button
onPress={() =>
Linking.openURL(
"https://app.uniswap.org/swap?outputCurrency=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base"
)
}
>
Buy USDC on Uniswap
</Button>
);
}

if (selectedAction === "sell") {
return (
<Button
Expand Down Expand Up @@ -118,6 +104,18 @@ export const BuyCreatorToken = () => {
: "Sell"}
</Button>
);
} else if (usdcBalance.data?.balance === 0n && !wallet.isMagicWallet) {
return (
<Button
onPress={() =>
Linking.openURL(
"https://app.uniswap.org/swap?outputCurrency=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base"
)
}
>
Buy USDC on Uniswap
</Button>
);
} else {
return (
<Button
Expand Down

0 comments on commit 9cebac9

Please sign in to comment.