lorisleiva / solana-wallets-vue

Solana wallet integration for Vue 3
https://solana-wallets-vue-demo.netlify.app/
170 stars 62 forks source link

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

Open lucalaneth opened 2 years ago

lucalaneth commented 2 years ago

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?