-
Notifications
You must be signed in to change notification settings - Fork 32
Added the rest of web3 nft support such as edit, search, list etc to STAR.CLI and can now also start and stop the WEB4 OASIS API Server and WEB5 STAR API Server within STAR CLI. #352
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
Conversation
…STAR.CLI and can now also start and stop the WEB4 OASIS API Server and WEB5 STAR API Server within STAR CLI.
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 is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 13
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
|
|
||
| #endregion | ||
| } | ||
| } |
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.
Duplicate code blocks appended outside class scope
The file contains large blocks of duplicate code after the proper closing braces of the class and namespace at line 4468. Lines 4469-4951 contain method definitions and code fragments that appear outside the valid class scope, including triplicate copies of methods like ShowONETStatusAsync, ShowONETProvidersAsync, ShowONETTopologyAsync, and others. This will cause compilation errors.
| //private static ONETProtocol? _onetProtocol; | ||
| private static ONETDiscovery? _onetDiscovery; | ||
| private static Process? _web4ApiProcess; | ||
| private static Process? _web5ApiProcess; |
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.
Unused static process variables declared but never used
The static variables _web4ApiProcess and _web5ApiProcess are declared but never used. The actual implementation uses the _webApiProcesses dictionary instead to track the API processes. These appear to be leftover declarations that were replaced by the dictionary approach.
| bool.TryParse(inputArgs[3], out softDelete); | ||
|
|
||
| if (web4) | ||
| if (web3) |
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.
Delete command parses wrong argument for softDelete default
The code parses inputArgs[3] as softDelete at line 1140 before checking if the command is for web3 or web4. For those cases, inputArgs[3] contains the id parameter, not softDelete. When bool.TryParse fails on a GUID string, it sets softDelete to false. If the user omits the optional softDelete argument, the value remains false instead of the intended default true, potentially causing unintended hard deletes.
|
|
||
| public virtual async Task SearchWeb3NFTAsync(string searchTerm = "", bool showForAllAvatars = true, ProviderType providerType = ProviderType.Default) | ||
| { | ||
| if (string.IsNullOrEmpty(searchTerm) || searchTerm == "forallavatars" || searchTerm == "forallavatars") |
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.
Duplicate condition checking same value twice
The condition searchTerm == "forallavatars" || searchTerm == "forallavatars" checks the identical value twice. This appears to be a copy-paste error where the second condition was likely intended to be a different variation (perhaps a different case or spelling). The redundant check doesn't affect functionality but indicates a potential missing check.
| else | ||
| CLIEngine.ShowMessage("Coming Soon..."); | ||
| } | ||
| else if (web4) |
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.
Wrong predicate checked in web4 search condition
The condition at line 1509 checks showWeb4Predicate != null but line 1510 calls searchWeb4Predicate. This mismatch means if showWeb4Predicate is null but searchWeb4Predicate is valid, users incorrectly see "Coming Soon..." instead of the search executing. Conversely, if showWeb4Predicate is not null but searchWeb4Predicate is null, calling the null delegate would cause a NullReferenceException. The condition should check searchWeb4Predicate != null.
Note
Introduces Web3 NFT management and ONET API server control within STAR CLI.
NFTs.cs:ListAllWeb3NFTsAsync,ListAllWeb3NFTForAvatarsAsync,ShowWeb3NFTAsync,SearchWeb3NFTAsync,UpdateWeb3NFTAsync(placeholder guidance),DeleteWeb3NFTAsyncweb3fornftsubcommands (update,delete,show,list,search) with new delegate parameters and argument parsingweb3vsweb4behavior fornftcommandsstart|stop [web4|web5]; implements process management to launch/terminateNextGenSoftware.OASIS.API.ONODE.WebAPI(http://localhost:5000) andNextGenSoftware.OASIS.STAR.WebAPI(http://localhost:5001) with status outputWritten by Cursor Bugbot for commit f522260. This will update automatically on new commits. Configure here.