Skip to content

Commit 685b61e

Browse files
test(wrapped-keys-lit-actions): LIT-3920 - Update Solana sign transaction test to expect base58 signature response (#652)
1 parent de847ec commit 685b61e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

local-tests/tests/wrapped-keys/testSignTransactionWithSolanaEncryptedKey.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
clusterApiUrl,
1212
} from '@solana/web3.js';
1313
import { getPkpSessionSigs } from 'local-tests/setup/session-sigs/get-pkp-session-sigs';
14+
import { ethers } from 'ethers';
1415

1516
const { importPrivateKey, signTransactionWithEncryptedKey } = api;
1617

@@ -125,7 +126,7 @@ export const testSignTransactionWithSolanaEncryptedKey = async (
125126
// const confirmation = await solanaConnection.confirmTransaction(signedTx);
126127
// console.log(confirmation); // { context: { slot: 321490379 }, value: { err: null } }
127128

128-
const signatureBuffer = Buffer.from(signedTx, 'base64');
129+
const signatureBuffer = Buffer.from(ethers.utils.base58.decode(signedTx));
129130
solanaTransaction.addSignature(solanaKeypair.publicKey, signatureBuffer);
130131

131132
if (!solanaTransaction.verifySignatures()) {

0 commit comments

Comments
 (0)