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

PKG -- [sdk] Restore previous account resolution ordering #1910

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jribbink
Copy link
Contributor

@jribbink jribbink commented Jun 13, 2024

Closes #1818

This restores the old behaviour which influenced ordering of account resolution in the SDK before #1532. Essentially, the currentUser account ended up always being resolved in the second collectAccounts call, after all of the other accounts (i.e. custom authz functions) had been resolved in the first call.

await collectAccounts(ix, Object.values(ix.accounts))
await collectAccounts(ix, Object.values(ix.accounts))

This nuance made a guarantee that the custom authz functions would resolve first, and that the pre-authz service would always know addresses resolved by the custom authz function.

IMO we should avoid exposing addresses/keyIds to pre-authz anyways and shouldn't be giving any guarnatee on ordering here as it's prone to error and only held together by a nuance of the design (how can we even guarantee whose authz function runs first? which gets priority?) - but this is a separate issue and the goal here is to restore functionality.

@jribbink jribbink requested a review from a team as a code owner June 13, 2024 20:12
Copy link

changeset-bot bot commented Jun 13, 2024

🦋 Changeset detected

Latest commit: 86eb487

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@onflow/sdk Patch
@onflow/fcl-core Patch
@onflow/fcl-react-native Patch
@onflow/fcl Patch
@onflow/fcl-wc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

[BUG] Dapper Wallet problems with Newer Releases
2 participants