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

Question / Feature: account:Account param in certain util methods may only need SA address #67

Open
livingrockrises opened this issue Sep 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@livingrockrises
Copy link

livingrockrises commented Sep 25, 2024

Describe the feature you would like

below methods

  client,
  account,
  permissionId,
}: {
  client: PublicClient
  account: Account
  permissionId: Hex
}) => {
  return (await client.readContract({
    address: SMART_SESSIONS_ADDRESS,
    abi,
    functionName: 'getNonce',
    args: [permissionId, account.address],
  })) as bigint
}
export const isSessionEnabled = async ({
  client,
  account,
  permissionId,
}: {
  client: PublicClient
  account: Account
  permissionId: Hex
}) => {
  return (await client.readContract({
    address: SMART_SESSIONS_ADDRESS,
    abi,
    functionName: 'isSessionEnabled',
    args: [permissionId, account.address],
  })) as boolean
}

requires a whole Account object to be passed. can it be just smartAccountAddress or conditional optional params

Additional context

No response

@livingrockrises livingrockrises added the enhancement New feature or request label Sep 25, 2024
@kopy-kat
Copy link
Member

kopy-kat commented Oct 3, 2024

tbh I dont like how we handle accounts and clients in the sdk now - for v0.2 I have some ideas for how we can streamline the ux and open to feedback here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants