Skip to content

chore: read-only classes for GovernanceContract & L1TxUtils#13762

Merged
spypsy merged 2 commits into
spy/single-l1-clientfrom
spy/read-only-classes
Apr 23, 2025
Merged

chore: read-only classes for GovernanceContract & L1TxUtils#13762
spypsy merged 2 commits into
spy/single-l1-clientfrom
spy/read-only-classes

Conversation

@spypsy

@spypsy spypsy commented Apr 23, 2025

Copy link
Copy Markdown
Member

Follow-up to #13715

@spypsy spypsy marked this pull request as ready for review April 23, 2025 13:23

@spalladino spalladino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Love it!

Comment on lines 33 to 35
export function isExtendedClient(client: ViemClient): client is ExtendedViemWalletClient {
return 'account' in client;
return 'account' in client && client.account !== undefined;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this method still in use after the refactor?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes, to strong type-check in L1TxUtils constructor and a couple more places (that could also be split into readOnly possibly)

@spypsy spypsy merged commit b1f734a into spy/single-l1-client Apr 23, 2025
@spypsy spypsy deleted the spy/read-only-classes branch April 23, 2025 13:30
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.

2 participants