-
Notifications
You must be signed in to change notification settings - Fork 8
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
Remove anchor wallet local implementation #59
Conversation
* Added SDK integration, flexible policy accounts, and general security updates (#41) * make policy account resizable * resiable idenitty accounts (#35) * resiable idenitty accounts * update tests, init more tests * remove commented files * update signer checks + hash policy account (#36) * update signer checks to use only authority or delegate * policy hash + patches (#38) * generic security fixes * use hash to identify policies (#39) * use hash to identify policies * use policy account in hash * Merged resizable policies and dashboards * Updated clients rwa-token-sdk for resizable policy * Added program * update anchor binary * update idls * Rename IDL types in client * use camel case + fix eslint + fix tests partially + update anchor repo * fix tests * Added @bridgesplit/sdk update to example * Updated to support new PolicyType * Updated policy enum types * Updated examples * fix typedoc issues * fix typedoc issues * Update instructions * Updated instructions * Convention update * Updated typedoc json * Updated testing path * Removed examples * fix build yaml * update package + add lint to actions * update package naming across file * rm untracked file * Added conventions * Updated client to be coral anchor. * clear github cache * Deleted old idls * update file names * fix tests --------- Co-authored-by: Bhargava Sai Macha <[email protected]> * Fixed documentation (#44) --------- Co-authored-by: Chris Hagedorn <[email protected]>
minor security fixes and test updates (#55)
Deploying medici-typedoc with
|
Latest commit: |
99d487f
|
Status: | ✅ Deploy successful! |
Preview URL: | https://e5b4a22b.medici-typedoc.pages.dev |
Branch Preview URL: | https://hotfix-rmv-anchor-wallet-cop.medici-typedoc.pages.dev |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe recent changes involve renaming a method in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- clients/README.md (1 hunks)
- clients/rwa-token-sdk/src/classes/Client.ts (1 hunks)
Additional context used
GitHub Check: run-tests
clients/rwa-token-sdk/src/classes/Client.ts
[failure] 12-12:
Expected indentation of 1 tab but found 2 spaces
[failure] 15-15:
Expected indentation of 1 tab but found 2 spaces
[failure] 16-16:
Expected indentation of 1 tab but found 2 spaces
[failure] 17-17:
Expected indentation of 1 tab but found 2 spaces
[failure] 18-18:
Expected indentation of 1 tab but found 2 spaces
[failure] 19-19:
Expected indentation of 1 tab but found 2 spaces
[failure] 20-20:
Expected indentation of 1 tab but found 2 spaces
[failure] 22-22:
Expected indentation of 1 tab but found 2 spaces
[failure] 27-27:
Expected indentation of 1 tab but found 2 spaces
[failure] 28-28:
Expected indentation of 2 tabs but found 4 spaces
Markdownlint
clients/README.md
49-49: Column: 1 (MD010, no-hard-tabs)
Hard tabs
50-50: Column: 1 (MD010, no-hard-tabs)
Hard tabs
52-52: Column: 1 (MD010, no-hard-tabs)
Hard tabs
114-114: Column: 1 (MD010, no-hard-tabs)
Hard tabs
116-116: Column: 1 (MD010, no-hard-tabs)
Hard tabs
117-117: Column: 1 (MD010, no-hard-tabs)
Hard tabs
118-118: Column: 1 (MD010, no-hard-tabs)
Hard tabs
120-120: Column: 1 (MD010, no-hard-tabs)
Hard tabs
121-121: Column: 1 (MD010, no-hard-tabs)
Hard tabs
122-122: Column: 1 (MD010, no-hard-tabs)
Hard tabs
123-123: Column: 1 (MD010, no-hard-tabs)
Hard tabs
125-125: Column: 1 (MD010, no-hard-tabs)
Hard tabs
126-126: Column: 1 (MD010, no-hard-tabs)
Hard tabs
127-127: Column: 1 (MD010, no-hard-tabs)
Hard tabs
128-128: Column: 1 (MD010, no-hard-tabs)
Hard tabs
130-130: Column: 1 (MD010, no-hard-tabs)
Hard tabs
Additional comments not posted (2)
clients/rwa-token-sdk/src/classes/Client.ts (1)
6-6
: The updated import statement correctly includesWallet
as needed for the constructor changes.clients/README.md (1)
55-55
: The method namesetupNewRegistry
is correctly updated in the documentation to match the actual method name in the code.Please replace hard tabs with spaces to adhere to the Markdown style guide.
- const setupIx = await rwaClient.assetController.setupNewRegistry( + const setupIx = await rwaClient.assetController.setupNewRegistry(Likely invalid or redundant comment.
constructor(config: Config, wallet: Wallet) { | ||
this.config = config; | ||
this.provider = new AnchorProvider( | ||
config.connection, | ||
wallet, | ||
config.confirmationOptions | ||
); | ||
this.assetController = new AssetController(this); | ||
this.dataRegistry = new DataRegistry(this); | ||
this.identityRegistry = new IdentityRegistry(this); | ||
this.policyEngine = new PolicyEngine(this); | ||
} |
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.
The constructor now correctly accepts a Wallet
parameter, aligning with the updated Anchor dependency management. However, please correct the indentation to match the project's style guide.
- constructor(config: Config, wallet: Wallet) {
- this.config = config;
- this.provider = new AnchorProvider(
- config.connection,
- wallet,
- config.confirmationOptions
- );
- this.assetController = new AssetController(this);
- this.dataRegistry = new DataRegistry(this);
- this.identityRegistry = new IdentityRegistry(this);
- this.policyEngine = new PolicyEngine(this);
- }
+ constructor(config: Config, wallet: Wallet) {
+ this.config = config;
+ this.provider = new AnchorProvider(
+ config.connection,
+ wallet,
+ config.confirmationOptions
+ );
+ this.assetController = new AssetController(this);
+ this.dataRegistry = new DataRegistry(this);
+ this.identityRegistry = new IdentityRegistry(this);
+ this.policyEngine = new PolicyEngine(this);
+ }
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
constructor(config: Config, wallet: Wallet) { | |
this.config = config; | |
this.provider = new AnchorProvider( | |
config.connection, | |
wallet, | |
config.confirmationOptions | |
); | |
this.assetController = new AssetController(this); | |
this.dataRegistry = new DataRegistry(this); | |
this.identityRegistry = new IdentityRegistry(this); | |
this.policyEngine = new PolicyEngine(this); | |
} | |
constructor(config: Config, wallet: Wallet) { | |
this.config = config; | |
this.provider = new AnchorProvider( | |
config.connection, | |
wallet, | |
config.confirmationOptions | |
); | |
this.assetController = new AssetController(this); | |
this.dataRegistry = new DataRegistry(this); | |
this.identityRegistry = new IdentityRegistry(this); | |
this.policyEngine = new PolicyEngine(this); | |
} |
Tools
GitHub Check: run-tests
[failure] 27-27:
Expected indentation of 1 tab but found 2 spaces
[failure] 28-28:
Expected indentation of 2 tabs but found 4 spaces
There was an outdated type interface in Anchor, which required us to copy the Anchor wallet instance. However, Anchor has been updated to work now and functions directly off the dependency.
Summary by CodeRabbit
Documentation
README.md
for consistency (setUpNewRegistry
tosetupNewRegistry
).Refactor
Client.ts
file to improve readability and maintainability.