-
Notifications
You must be signed in to change notification settings - Fork 148
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
Fix/5143/ledger routing #5226
Fix/5143/ledger routing #5226
Conversation
c7f8485
to
32eba94
Compare
</Box> | ||
</Flex> | ||
)); | ||
export function AccountListUnavailable() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no point using memo
on components that don't receive any props
@@ -25,8 +25,8 @@ export default function PluggingInLedgerCableAnimation(props: BoxProps) { | |||
|
|||
return ( | |||
<Box height="200px" overflow="hidden" position="relative" width="100%" {...props}> | |||
<Box position="absolute" left={0} right={0}> | |||
<Lottie options={options} width={380} style={invertStyle} /> | |||
<Box position="absolute" left={0} right={0} style={invertStyle}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were getting a runtime error for invalid props to Lottie so I moved these styles up a level
@@ -17,8 +17,8 @@ export function MessagePreviewBox({ message, hash }: MessageBoxProps) { | |||
py="space.05" | |||
overflowX="auto" | |||
> | |||
{message.split(/\r?\n/).map(line => ( | |||
<styled.span key={line} textStyle="label.01"> | |||
{message.split(/\r?\n/).map((line, index) => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was throwing a duplicate keys runtime error
@@ -34,10 +38,14 @@ export const ChooseAccount = memo(() => { | |||
{url && <RequesterFlag requester={url.toString()} />} | |||
<LogomarkIcon width="248px" height="58px" /> | |||
<Stack gap="space.04"> | |||
<styled.h1 textStyle="heading.05">Choose an account to connect</styled.h1> | |||
<styled.h1 textStyle="heading.05"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I improvised and added a message here:
When using Ledger, you an connect BTC and not STX. If this is the case and you try and connect your wallet with Gamma / some service you got a popup saying 'Choose an account to connect' but no accounts are listed.
I initially changed it to the below, however I didn't think it made sense to say 'Choose account' then 'No Accounts'
const { chain } = useCurrentNetwork(); | ||
|
||
const [isLoading, setIsLoading] = useState(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code stops the button from having a loading spinner if you close the dialog and start again.
@@ -9,7 +9,7 @@ import { pxStringToNumber } from '@shared/utils/px-string-to-number'; | |||
|
|||
export interface DialogProps { | |||
isShowing: boolean; | |||
onClose(): void; | |||
onClose?(): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some dialogs can't be closed
|
||
export interface DialogHeaderProps { | ||
isWaitingOnPerformedAction?: boolean; | ||
onClose?(): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onClose
gets cloned from the <Dialog onClose=
2552e7d
to
4c3ef03
Compare
WIP:
Header
to removedialog
variant and replace instead with simplerDialogHeader
X
that can't be clicked just don't show anything