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

Using Eclipse network SignTransaction or SignAllTrasnaction get error code -32603 #8

Open
thedonmon opened this issue Jul 1, 2024 · 0 comments

Comments

@thedonmon
Copy link

thedonmon commented Jul 1, 2024

Just using a standard txn generation and trying to sign all. Im using the snap adapter for eclipse network rpc: https://staging-rpc.dev2.eclipsenetwork.xyz

Cant seem to get the snap to sign successfully, tried both sign and signAll. I see the code implements both so maybe theres a bug somewhere in sending the data to the metamask rpc call?

const { wallet } = useWallet();
{
var instructions = generateIx(); //shorted for brevity
const tx = new Transaction().add(...instructions)
        tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash
        tx.feePayer = wallet.publicKey
        tx.sign(...mints, ...members)
        txs.push(tx)
    }
     const signedTxns = await wallet.signAllTransactions(txs);

Console error when signing:

code: -32603, message: 'Received non-JSON-serializable value: Expected the…| array | record`, but received: [object Object].'}

my only suspicion is its throwing here:
https://github.com/drift-labs/snap-solana/blob/master/snap-wallet-adapter/src/index.ts#L182 since sending a buffer not encoded might throw since its a complex object over the wire

But I do get the popup window, just confirming always fails:

https://github.com/drift-labs/snap-solana/blob/master/snap-core/src/index.ts#L235

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