Skip to content

Commit

Permalink
Merge branch 'katana_int' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
rjnrohit committed Nov 22, 2023
2 parents 8ebd36e + 8306647 commit 15b4449
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/src/components/DevnetAccountSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const DevnetAccountSelector: React.FC = () => {
setAvailableDevnetAccounts(accounts)
}
} catch (e) {
setAvailableDevnetAccounts([])
await remixClient.terminal.log({
type: 'error',
value: `Failed to get accounts information from ${devnet.url}`
Expand All @@ -110,6 +111,7 @@ const DevnetAccountSelector: React.FC = () => {
useEffect(() => {
setTimeout(() => {
if (!isDevnetAlive) {
setAvailableDevnetAccounts([])
return
}
refreshDevnetAccounts().catch(e => {
Expand Down Expand Up @@ -179,7 +181,7 @@ const DevnetAccountSelector: React.FC = () => {
<D.Root open={dropdownControl} onOpenChange={(e) => { setDropdownControl(e) }}>
<D.Trigger >
<div className='flex flex-row justify-content-space-between align-items-center p-2 br-1 devnet-account-selector-trigger'>
<label className='text-light text-sm m-0'>{(availableDevnetAccounts.length !== 0 && (availableDevnetAccounts[accountIdx]?.address) !== undefined)
<label className='text-light text-sm m-0'>{(availableDevnetAccounts !== undefined && availableDevnetAccounts.length !== 0 && (availableDevnetAccounts[accountIdx]?.address) !== undefined)
? getShortenedHash(
availableDevnetAccounts[accountIdx]?.address,
6,
Expand Down

0 comments on commit 15b4449

Please sign in to comment.