This repository was archived by the owner on Sep 2, 2024. It is now read-only.
forked from getAlby/nostr-wallet-connect
-
Notifications
You must be signed in to change notification settings - Fork 4
chore: show topup/increase option ony if available #541
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e994fef
chore: show topup/increase option ony if available
bumi 9a0c1d8
Merge branch 'master' into chore/check-increase-available
bumi 7280ee1
chore: hide incoming capacity box if not availble
bumi 31d81fd
Merge remote-tracking branch 'origin/master' into chore/check-increas…
rolznz 2020699
fix: hide whole receive card on wallet page if ln client does not hav…
rolznz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ import { useBalances } from "src/hooks/useBalances"; | |
import { useInfo } from "src/hooks/useInfo"; | ||
|
||
function Wallet() { | ||
const { data: info } = useInfo(); | ||
const { data: info, hasChannelManagement } = useInfo(); | ||
const { data: balances } = useBalances(); | ||
|
||
if (!info || !balances) { | ||
|
@@ -88,11 +88,13 @@ function Wallet() { | |
</div> | ||
)} | ||
</CardContent> | ||
<CardFooter className="flex justify-end"> | ||
<Link to="/channels/outgoing"> | ||
<Button variant="outline">Top Up</Button> | ||
</Link> | ||
</CardFooter> | ||
{hasChannelManagement && ( | ||
<CardFooter className="flex justify-end"> | ||
<Link to="/channels/outgoing"> | ||
<Button variant="outline">Top Up</Button> | ||
</Link> | ||
</CardFooter> | ||
)} | ||
</Card> | ||
<Card> | ||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2"> | ||
|
@@ -120,11 +122,13 @@ function Wallet() { | |
)} | ||
</div> | ||
</CardContent> | ||
<CardFooter className="flex justify-end"> | ||
<Link to="/channels/incoming"> | ||
<Button variant="outline">Increase</Button> | ||
</Link> | ||
</CardFooter> | ||
{hasChannelManagement && ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this one still needs to be updated to hide the whole card |
||
<CardFooter className="flex justify-end"> | ||
<Link to="/channels/incoming"> | ||
<Button variant="outline">Increase</Button> | ||
</Link> | ||
</CardFooter> | ||
)} | ||
</Card> | ||
</div> | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I didn't think about this 😱
But we should hide the entire card, right? "Receiving capacity" makes no sense for LNClients without channel management
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, stupid me... :) 😱