Skip to content
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

Add support for MoveFunds action #22

Merged
merged 2 commits into from
Mar 6, 2023
Merged

Conversation

jakubcolony
Copy link
Collaborator

@jakubcolony jakubcolony commented Feb 24, 2023

This is a parallel PR to JoinColony/colonyCDapp#291

Please refer to that PR for testing instructions

@jakubcolony jakubcolony self-assigned this Feb 24, 2023
@jakubcolony jakubcolony changed the base branch from port/create-domain-action to port/unlock-token-action February 24, 2023 23:43
@jakubcolony jakubcolony marked this pull request as ready for review February 24, 2023 23:50
@jakubcolony jakubcolony requested a review from a team February 24, 2023 23:50
Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good

toPot,
} = event.args;

const colonyClient = await networkClient.getColonyClient(colonyAddress);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could optimize the ingestor somewhat if we were to store all known instances of the colony client.

I see us re-instantiating the client for a lot of tracked events.

But I actually don't know what this impact would be real-life.

Copy link
Contributor

@willm30 willm30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍

const isSupportedColonyClient = (
colonyClient: AnyColonyClient,
): colonyClient is SupportedColonyClient =>
(colonyClient as SupportedColonyClient).getDomainFromFundingPot !== undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alternatively:

'getDomainFromFundingPot' in colonyClient

Then you don't need to cast colonyClient

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think explicit casting might be better here since it will alert you if the property you're checking against doesn't exist/got removed
https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates

Base automatically changed from port/unlock-token-action to port/actions March 6, 2023 10:05
@jakubcolony jakubcolony merged commit dda5ef8 into port/actions Mar 6, 2023
@jakubcolony jakubcolony deleted the port/move-funds-action branch March 6, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants