You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getLinkedAgw action already falls back to client.account?.address when no address is provided, but its signature still required a GetLinkedAgwParameters object.
This makes the second argument optional so consumers can call getLinkedAgw(client) directly, matching the existing behavior exposed through linkableWalletActions().getLinkedAgw() and reducing unnecessary boilerplate.
Changes
make parameters optional in getLinkedAgw
add a unit test covering direct action usage without parameters
Risk
Low. This is a small additive API improvement with no change to the existing fallback/error behavior.
PR-Codex overview
This PR introduces a default parameter for the getLinkedAgw function and adds a comprehensive test suite for it, ensuring that the function behaves correctly when parameters are omitted.
Detailed summary
Updated getLinkedAgw function to have a default value for parameters.
Added test cases in getLinkedAgw.test.ts to verify functionality.
Mocked readContract to simulate contract interactions.
Checked that getLinkedAgw uses the connected account when no parameters are provided.
✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Low Risk
Low risk: this only relaxes the getLinkedAgw call signature to allow omitting the params object and adds a unit test; runtime behavior and validation paths remain the same.
Overview getLinkedAgw now defaults its parameters argument to {}, allowing consumers to call getLinkedAgw(client) and rely on the existing fallback to client.account?.address.
Adds a unit test that mocks readContract and verifies the no-parameters call uses the connected account and returns the linked AGW address.
Written by Cursor Bugbot for commit 791cb36. This will update automatically on new commits. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
getLinkedAgwaction already falls back toclient.account?.addresswhen no address is provided, but its signature still required aGetLinkedAgwParametersobject.This makes the second argument optional so consumers can call
getLinkedAgw(client)directly, matching the existing behavior exposed throughlinkableWalletActions().getLinkedAgw()and reducing unnecessary boilerplate.Changes
parametersoptional ingetLinkedAgwRisk
Low. This is a small additive API improvement with no change to the existing fallback/error behavior.
PR-Codex overview
This PR introduces a default parameter for the
getLinkedAgwfunction and adds a comprehensive test suite for it, ensuring that the function behaves correctly when parameters are omitted.Detailed summary
getLinkedAgwfunction to have a default value forparameters.getLinkedAgw.test.tsto verify functionality.readContractto simulate contract interactions.getLinkedAgwuses the connected account when no parameters are provided.