Skip to content

Commit 2084f71

Browse files
committed
frontend: remove currency selector and fix suggested account name for BTC-only.
When there is only one coin supported, we want the back button on the choose name step to close the dialog. And we want the account name to be suggested.
1 parent e03fd74 commit 2084f71

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Fix wrong btc/ltc transaction timestamp during header sync
1111
- Ethereum bugfix: show all internal transactions that share the same transaction ID
1212
- Allow up to 6 unused BTC/LTC accounts (previously 5)
13+
- Fix empty suggested name for BTC account when only BTC is supported by the BitBox.
1314

1415
## v4.48.4
1516
- macOS: fix potential USB communication issue with BitBox02 bootloaders <v1.1.2 and firmwares <v9.23.1

frontends/web/src/routes/account/add/add.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ export const AddAccount = ({ accounts }: TAddAccountGuide) => {
9191
navigate(-1);
9292
break;
9393
case 'choose-name':
94-
setStep('select-coin');
95-
setErrorMessage(undefined);
94+
if (onlyOneSupportedCoin()) {
95+
navigate(-1);
96+
} else {
97+
setStep('select-coin');
98+
setErrorMessage(undefined);
99+
}
96100
break;
97101
case 'success':
98102
setStep('choose-name');
@@ -155,7 +159,10 @@ export const AddAccount = ({ accounts }: TAddAccountGuide) => {
155159
ref={inputRef}
156160
id="accountName"
157161
onInput={e => setAccountName(e.target.value)}
158-
value={accountName} />
162+
value={
163+
accountName ||
164+
(onlyOneSupportedCoin() ? supportedCoins[0].suggestedAccountName : '')
165+
} />
159166
);
160167
case 'success':
161168
return (

0 commit comments

Comments
 (0)