-
Notifications
You must be signed in to change notification settings - Fork 13
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
Group/v2 #89
Conversation
packages/fixed-bridge/src/Anchor.ts
Outdated
@@ -194,20 +194,24 @@ class Anchor { | |||
|
|||
// Proposal data is used to update linkedAnchors via bridge proposals | |||
// on other chains with this anchor's state | |||
public async getProposalData(leafIndex?: number): Promise<string> { | |||
public async getProposalData(executionAnchor: Anchor, leafIndex?: number): Promise<string> { |
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.
I think we should pass in the resourceID rather than the entire Anchor class.
@@ -54,8 +54,8 @@ export class BridgeSide { | |||
*** make its way to the neighbor root of the linked anchor on chain X. | |||
*** @param linkedAnchorInstance: the anchor instance on the opposite chain | |||
***/ | |||
public async createAnchorUpdateProposalData(linkedAnchorInstance: Anchor) { | |||
const proposalData = await linkedAnchorInstance.getProposalData(); | |||
public async createAnchorUpdateProposalData(linkedAnchorInstance: Anchor, thisAnchorInstance: Anchor) { |
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 isn't a good naming scheme, lets avoid thisAnchorInstance
please. Propose other names if you're unsure.
public async createAnchorUpdateProposalData(linkedAnchorInstance: Anchor) { | ||
const proposalData = await linkedAnchorInstance.getProposalData(); | ||
public async createAnchorUpdateProposalData(linkedAnchorInstance: Anchor, thisAnchorInstance: Anchor) { | ||
const proposalData = await linkedAnchorInstance.getProposalData(thisAnchorInstance); |
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.
Lets also just call the get resourceID method and pass that result to the anchor whose state we are fetching.
There's a lot more to be fixed in these classes @saiakilesh. Naming can certainly be improved and how proposals are created can be improved too. |
No description provided.