Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GA-ISSUE 292: [Pelagus] - Address shard is not displayed on account selector for addresses imported via private key #307

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions background/redux-slices/selectors/signingSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ export const selectAccountSignersByAddress = createSelector(
if (wallet.id === null) return undefined

allAccountsSeen.add(address)
const shard = getShardFromAddress(address)

return [
address,
{
type: "private-key",
walletID: wallet.id,
shard,
},
]
}
Expand Down
1 change: 1 addition & 0 deletions background/services/keyring/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export type KeyringAccountSigner = {
export type PrivateKeyAccountSigner = {
type: "private-key"
walletID: string
shard: string
}

type SerializedPrivateKey = {
Expand Down
2 changes: 1 addition & 1 deletion ui/components/AccountItem/SelectAccountListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function SelectAccountListItem({
<div className="account-info">
<div className="name">{account.shortName}</div>
<div className="details">
{account?.accountSigner?.type === "keyring" &&
{account?.accountSigner?.type !== "read-only" &&
`${account?.accountSigner?.shard} • `}
{account?.shortenedAddress}
</div>
Expand Down
Loading