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

With anchor program - TypeError: Cannot read property 'slice' of undefined #35

Open
lucalaneth opened this issue Sep 10, 2022 · 0 comments

Comments

@lucalaneth
Copy link

lucalaneth commented Sep 10, 2022

I'm getting the following errors while using the anchor wallet within this package. This test RPC call uses wallet as signer:

  await program.value.rpc.testMethod(amount, {
      accounts: {
        account1: testAccount1,
        account2: testAccount2,
        systemProgram: SystemProgram.programId,
      },
      signers: [wallet.value],
  })
ed25519.ts:45 Uncaught (in promise) TypeError: Cannot read property 'slice' of undefined
    at sign (ed25519.ts:45)
    at legacy.ts:661
    at Array.forEach (<anonymous>)
    at Transaction._partialSign (legacy.ts:660)
    at Transaction.partialSign (legacy.ts:652)
    at provider.ts:114
    at Array.forEach (<anonymous>)
    at Provider.send (provider.ts:113)
    at async Object.rpc [as testMethod] (rpc.ts:24)
    at async testFunction (Test.vue:135)

Then I tested the same program rpc call with @solana/wallet-adapter-react and it works fine.

Is there an example of using anchorwallet in this package as rpc call signer?

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

No branches or pull requests

1 participant