Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
chore: better react
Browse files Browse the repository at this point in the history
  • Loading branch information
bumi committed Jun 10, 2024
1 parent 389451e commit a69447c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/src/screens/channels/CurrentChannelOrder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,6 @@ function PayBitcoinChannelOrderTopup({ order }: { order: NewChannelOrder }) {
);
const estimatedTransactionFee = useEstimatedTransactionFee();

const fiatTopup = React.useCallback(() => {
const url = `https://getalby.com/topup?address=${onchainAddress}&receive_amount=${recommendedAmount}`;
openLink(url);
}, [onchainAddress, recommendedAmount]);

const getNewAddress = React.useCallback(async () => {
if (!csrf) {
return;
Expand Down Expand Up @@ -296,6 +291,11 @@ function PayBitcoinChannelOrderTopup({ order }: { order: NewChannelOrder }) {

const recommendedAmount = Math.ceil(missingAmount / 10000) * 10000;

const fiatTopup = () => {
const url = `https://getalby.com/topup?address=${onchainAddress}&receive_amount=${recommendedAmount}`;
openLink(url);
};

return (
<div className="grid gap-5">
<AppHeader
Expand Down

0 comments on commit a69447c

Please sign in to comment.