Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tolgayayci committed Mar 16, 2024
1 parent 46b152a commit 762e696
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 37 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# SOROBAN CLI GUI
> :warning: **This application in still beta!** When using application be aware of something unexpected may be occur. **Use at your own risk**, don't try important things like very important identities and so on!
SOROBAN CLI GUI is a cross platform, electron based application designed to streamline the use of the Soroban CLI. It offers a user-friendly interface for managing projects, identities, networks, and contract methods with ease.
# SORA

SORA is a cross platform, electron based application designed to streamline the use of the Soroban CLI. It offers a user-friendly interface for managing projects, identities, networks, and contract methods with ease.

---

Expand All @@ -16,7 +18,7 @@ To use this application, you must have soroban cli installed on your operating s
- To verify that soroban properly installed, run:
```soroban --version```

Now that you have soroban installed, you can install the SOROBAN CLI GUI application by following the instructions below.
Now that you have soroban installed, you can install the SORA application by following the instructions below.

###  macOS (Apple Silicon | Intel)

Expand All @@ -37,11 +39,11 @@ Now that you have soroban installed, you can install the SOROBAN CLI GUI applica

### 💻 Windows (Not Fully Supported)

You can still use the SOROBAN CLI GUI application on Windows by following the instructions below.
You can still use the SORA application on Windows by following the instructions below.

1. Install WSL 2 by following the instructions [on microsoft docs](https://learn.microsoft.com/en-us/windows/wsl/install).
2. Once you have WSL installed, you can install soroban cli by following the instructions for Linux.
3. Follow the instructions for Linux to install the SOROBAN CLI GUI application.
3. Follow the instructions for Linux to install the SORA application.
---

## Key Features
Expand All @@ -54,7 +56,7 @@ You can still use the SOROBAN CLI GUI application on Windows by following the in

**Network Management:** Network management is facilitated through the ability to add and remove networks. Users can also display the list of networks.

> **P.S:** Review the [latest release notes](https://github.com/tolgayayci/soroban-cli-gui/releases/tag/v0.1.0) for more information about the features and capabilities of the SOROBAN CLI GUI application.
> **P.S:** Review the [latest release notes](https://github.com/tolgayayci/soroban-cli-gui/releases/tag/v0.1.0) for more information about the features and capabilities of the SORA application.
## Contributing

Expand All @@ -71,4 +73,4 @@ Contributions are welcomed! If you have feature requests, bug notifications or w

## License

SOROBAN CLI GUI is released under the **MIT**. See ([LICENSE](https://github.com/tolgayayci/soroban-cli-gui/blob/main/LICENSE)) for more details.
SORA is released under the **MIT**. See ([LICENSE](https://github.com/tolgayayci/soroban-cli-gui/blob/main/LICENSE)) for more details.
1 change: 1 addition & 0 deletions main/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ if (isProd) {
flags,
path
);

return result;
} catch (error) {
console.error(`Error while executing Soroban command: ${error}`);
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"private": true,
"name": "soroban-cli-gui",
"description": "Soroban Cli Cross Platform Desktop Application",
"version": "0.1.0",
"name": "sora",
"description": "Sora Cross Platform Desktop Application",
"version": "0.1.1",
"author": "Tolga Yaycı <tolgayayci@protonmail.com>",
"main": "app/background.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions renderer/components/identities/forms/createNewIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export const newIdentityFormSchema = z.object({
.optional(),
default_seed: z.boolean().optional(),
config_dir: z.string().optional(),
rpc_url: z.string().url("RPC URL must be a valid URL.").optional(),
network_passphrase: z.string().optional(),
network: z.string().optional(),
rpc_url: z.string().url("RPC URL must be a valid URL."),
network_passphrase: z.string(),
network: z.string(),
});

export async function onNewIdentityFormSubmit(
Expand Down
6 changes: 3 additions & 3 deletions renderer/components/identities/forms/fundIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export const fundIdentityFormSchema = z.object({
)
.optional(),
global: z.boolean().optional(),
rpc_url: z.string().url("RPC URL must be a valid URL.").optional(),
network_passphrase: z.string().optional(),
network_name: z.string().optional(),
rpc_url: z.string().url("RPC URL must be a valid URL."),
network_passphrase: z.string(),
network_name: z.string(),
config_dir: z.string().optional(),
});

Expand Down
1 change: 1 addition & 0 deletions renderer/components/identities/fund-identity-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const FundIdentityModal = ({ identity, isOpen, onClose }) => {
const fundIdentityForm = useForm<z.infer<typeof fundIdentityFormSchema>>({
resolver: zodResolver(fundIdentityFormSchema),
defaultValues: {
identity_name: identity.name,
global: false,
},
});
Expand Down
25 changes: 14 additions & 11 deletions renderer/components/projects/forms/createNewProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,27 @@ export const createNewProjectFormSchema = z.object({
.enum([
"account",
"alloc",
"atomic-multiswap",
"atomic-swap",
"atomic_multiswap",
"atomic_swap",
"auth",
"cross-contract",
"custom-types",
"deep-contract-auth",
"cross_contract",
"custom_types",
"deep_contract_auth",
"deployer",
"errors",
"eth_abi",
"events",
"fuzzing",
"increment",
"liquidity-pool",
"liquidity_pool",
"logging",
"simple-account",
"single-offer",
"mint_lock",
"simple_account",
"single_offer",
"timelock",
"token",
"upgradeable-contract",
"upgradeable_contract",
"workspace",
])
.optional(),
});
Expand All @@ -47,13 +50,13 @@ export async function onCreateNewProjectForm(
try {
const command = "contract";
const subcommand = "init";
const args = [data.path];
const args = [data.path + "/" + data.project_name];
const flags = [
data.include_examples ? `-w ${data.with_example}` : null,
].filter(Boolean);

const result = await window.sorobanApi
.runSorobanCommand(command, subcommand, args, flags, data.path)
.runSorobanCommand(command, subcommand, args, flags)
.then(async () => {
await window.sorobanApi.manageProjects("add", {
name: data.project_name,
Expand Down
21 changes: 12 additions & 9 deletions renderer/components/projects/project-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,24 +268,27 @@ export default function ProjectModal({
{[
"account",
"alloc",
"atomic-multiswap",
"atomic-swap",
"atomic_multiswap",
"atomic_swap",
"auth",
"cross-contract",
"custom-types",
"deep-contract-auth",
"cross_contract",
"custom_types",
"deep_contract_auth",
"deployer",
"errors",
"eth_abi",
"events",
"fuzzing",
"increment",
"liquidity-pool",
"liquidity_pool",
"logging",
"simple-account",
"single-offer",
"mint_lock",
"simple_account",
"single_offer",
"timelock",
"token",
"upgradeable-contract",
"upgradeable_contract",
"workspace",
].map((exampleValue) => (
<SelectItem
key={exampleValue}
Expand Down
2 changes: 1 addition & 1 deletion renderer/lib/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const projectImportSuccess = (contentName: string) => ({

export const projectImportError = (contentName: string) => ({
title: "Error",
description: `Failed to import ${contentName}. Make sure you selected folder that containing Cargo.toml and includes stylus-sdk dependency!`,
description: `Failed to import ${contentName}. Make sure you selected folder that containing Cargo.toml and includes soroban-sdk dependency!`,
});

export const projectRenameSuccess = (contentName: string) => ({
Expand Down

0 comments on commit 762e696

Please sign in to comment.