Skip to content

Commit 103c4a1

Browse files
fix: only show send/receive buttons when there are wallets in the app
1 parent fac499b commit 103c4a1

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

apps/mobile/src/features/account/accounts-widget.tsx

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,34 @@ export function AccountsWidget() {
5656
)}
5757
</Box>
5858
)}
59-
<Box my="3" px="5" flexDirection="row" gap="2">
60-
<ButtonV2
61-
onPress={() => {
62-
sendSheetRef.current?.present();
63-
}}
64-
minWidth={86}
65-
size="sm"
66-
buttonState="default"
67-
title={t({
68-
id: 'general.send',
69-
message: `Send`,
70-
})}
71-
/>
72-
<ButtonV2
73-
onPress={() => {
74-
receiveSheetRef.current?.present();
75-
}}
76-
minWidth={86}
77-
size="sm"
78-
buttonState="outline"
79-
title={t({
80-
id: 'general.receive',
81-
message: `Receive`,
82-
})}
83-
/>
84-
</Box>
59+
{wallets.hasWallets && (
60+
<Box my="3" px="5" flexDirection="row" gap="2">
61+
<ButtonV2
62+
onPress={() => {
63+
sendSheetRef.current?.present();
64+
}}
65+
minWidth={86}
66+
size="sm"
67+
buttonState="default"
68+
title={t({
69+
id: 'general.send',
70+
message: `Send`,
71+
})}
72+
/>
73+
<ButtonV2
74+
onPress={() => {
75+
receiveSheetRef.current?.present();
76+
}}
77+
minWidth={86}
78+
size="sm"
79+
buttonState="outline"
80+
title={t({
81+
id: 'general.receive',
82+
message: `Receive`,
83+
})}
84+
/>
85+
</Box>
86+
)}
8587
</Box>
8688
<Widget.Body>
8789
<ScrollView

apps/mobile/src/locales/en/messages.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ msgstr "{name}"
4949
msgid "configure_account.name.cell_caption"
5050
msgstr "{name}"
5151

52-
#: src/features/account/accounts-widget.tsx:106
52+
#: src/features/account/accounts-widget.tsx:108
5353
msgid "accounts.account.cell_caption"
5454
msgstr "{name}"
5555

@@ -1233,7 +1233,7 @@ msgid "action_bar.receive_label"
12331233
msgstr "Receive"
12341234

12351235
#: src/features/account/account.tsx:113
1236-
#: src/features/account/accounts-widget.tsx:79
1236+
#: src/features/account/accounts-widget.tsx:80
12371237
msgid "general.receive"
12381238
msgstr "Receive"
12391239

@@ -1379,7 +1379,7 @@ msgid "action_bar.send_label"
13791379
msgstr "Send"
13801380

13811381
#: src/features/account/account.tsx:101
1382-
#: src/features/account/accounts-widget.tsx:67
1382+
#: src/features/account/accounts-widget.tsx:68
13831383
msgid "general.send"
13841384
msgstr "Send"
13851385

0 commit comments

Comments
 (0)