Skip to content

Commit 075c414

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 075c414

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-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: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const AddAccount = ({ accounts }: TAddAccountGuide) => {
6868
setStep(onlyOneCoinIsSupported ? 'choose-name' : 'select-coin');
6969
setSupportedCoins(coins);
7070
if (onlyOneCoinIsSupported) {
71-
setAccountCode(coins[0].suggestedAccountName);
71+
setAccountName(coins[0].suggestedAccountName);
7272
}
7373
inputRef.current?.focus();
7474
} catch (err) {
@@ -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');

0 commit comments

Comments
 (0)