Skip to content

Commit

Permalink
add tooltip and argentX warning
Browse files Browse the repository at this point in the history
  • Loading branch information
rjnrohit committed Nov 3, 2023
1 parent 7e40e14 commit b9063cd
Show file tree
Hide file tree
Showing 13 changed files with 212 additions and 190 deletions.
4 changes: 2 additions & 2 deletions api/src/utils/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ pub const DEFAULT_CAIRO_DIR: &str = concat!(
env!("CARGO_MANIFEST_DIR"),
"/",
"cairo_compilers/",
"v2.3.0"
"v2.3.1"
);
pub const CAIRO_COMPILERS_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/", "cairo_compilers/");
#[allow(dead_code)]
pub const TEMP_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/", "temp/");

pub const DEFAULT_CAIRO_VERSION: &str = "v2.3.0";
pub const DEFAULT_CAIRO_VERSION: &str = "v2.3.1";

pub const DURATION_TO_PURGE: u64 = 60 * 5; // 5 minutes

Expand Down
8 changes: 4 additions & 4 deletions plugin/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions plugin/src/atoms/connection.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { atom } from 'jotai'
import {
type Account,
type AccountInterface,
type Provider,
type ProviderInterface
} from 'starknet'

import { type StarknetWindowObject } from 'get-starknet'

const account = atom<Account | AccountInterface | null>(null)
const provider = atom<Provider | ProviderInterface | null>(null)
const starknetWindowObject = atom<StarknetWindowObject | null>(null)

export { account, provider, starknetWindowObject }
6 changes: 6 additions & 0 deletions plugin/src/atoms/remixClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { atom } from 'jotai'

// Is plugin loaded
const pluginLoaded = atom<boolean>(true)

export { pluginLoaded }
31 changes: 0 additions & 31 deletions plugin/src/components/DevnetAccountSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,37 +214,6 @@ const DevnetAccountSelector: React.FC = () => {
</D.Content>
</D.Portal>
</D.Root>
{/* <select
className="custom-select"
aria-label=".form-select-sm example"
onChange={handleAccountChange}
value={accountIdx}
defaultValue={getSelectedAccountIndex(
availableDevnetAccounts,
selectedDevnetAccount
)}
>
{isDevnetAlive && availableDevnetAccounts.length > 0
? availableDevnetAccounts.map((account, index) => {
return (
<option value={index} key={index}>
{`${getShortenedHash(
account.address ?? '',
6,
4
)} (${getRoundedNumber(
weiToEth(account.initial_balance),
2
)} ether)`}
</option>
)
})
: ([
<option value={-1} key={-1}>
No accounts found
</option>
] as JSX.Element[])}
</select> */}
<div className="position-relative">
<button
className="btn"
Expand Down
3 changes: 1 addition & 2 deletions plugin/src/components/ui_components/Tooltip/tooltip.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ button {
font-size: var(--font-sm);
line-height: 1;
color: var(--light);
background-color: var(--primary-color);
background-color: var(--primary-color-700);
border: 1px solid var(--primary-color-900);
box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px,
hsl(206 22% 7% / 20%) 0px 10px 20px -15px;
user-select: none;
animation-duration: 400ms;
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
will-change: transform, opacity;
Expand Down
1 change: 1 addition & 0 deletions plugin/src/features/CairoVersion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const CairoVersion: React.FC = () => {
}
)
const versions = JSON.parse(await response.text())
versions.sort()
setVersions(versions)
}
} catch (e) {
Expand Down
10 changes: 5 additions & 5 deletions plugin/src/features/Compilation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ const CompilationCard: React.FC<{
</div>
)}
<button
className="btn btn-primary btn-block d-block w-100 text-break remixui_disabled mb-1 mt-1 px-0"
className="btn btn-information btn-block d-block w-100 text-break remixui_disabled mb-1 mt-1 px-0"
style={{
cursor: `${!validation || !isCurrentFileName ? 'not-allowed' : 'pointer'
cursor: `${(!validation || isCurrentFileName) ? 'not-allowed' : 'pointer'
}`
}}
disabled={!validation || !isCurrentFileName || isCompiling}
aria-disabled={!validation || !isCurrentFileName || isCompiling}
disabled={!validation || isCurrentFileName || isCompiling}
aria-disabled={!validation || isCurrentFileName || isCompiling}
onClick={onClick}
>
<div className="d-flex align-items-center justify-content-center">
Expand All @@ -145,7 +145,7 @@ const CompilationCard: React.FC<{
>
{' '}
</span>
<span style={{ paddingLeft: '0.5rem' }}>{status}</span>
<span style={{ paddingLeft: '0.5rem' }}>{ useAtomValue(statusAtom)}</span>
</>
)
: (
Expand Down
Loading

0 comments on commit b9063cd

Please sign in to comment.