Skip to content

Commit

Permalink
🐛fix(lld): account name on receive flow (#7439)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasWerey authored Jul 26, 2024
1 parent 37c0b90 commit 0ddefd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/four-olives-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

On receive flow default account name was displayed instead of the account name selected by the user
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { getLLDCoinFamily } from "~/renderer/families";
import { firstValueFrom } from "rxjs";
import { useCompleteActionCallback } from "~/renderer/components/PostOnboardingHub/logic/useCompleteAction";
import { getDefaultAccountName } from "@ledgerhq/live-wallet/accountName";
import { useMaybeAccountName } from "~/renderer/reducers/wallet";

const Separator = styled.div`
border-top: 1px solid #99999933;
Expand Down Expand Up @@ -171,7 +172,8 @@ const StepReceiveFunds = (props: StepProps) => {

const mainAccount = account ? getMainAccount(account, parentAccount) : null;
invariant(account && mainAccount, "No account given");
const name = token ? token.name : getDefaultAccountName(account);
const maybeAccountName = useMaybeAccountName(account);
const name = token ? token.name : maybeAccountName || getDefaultAccountName(account);
const initialDevice = useRef(device);
const address = mainAccount.freshAddress;
const [modalVisible, setModalVisible] = useState(false);
Expand Down

0 comments on commit 0ddefd3

Please sign in to comment.