Skip to content

Commit a0d82f7

Browse files
chore(wrapped-keys-lit-actions): LIT-3920 - Use existing ethers instance for base58 encoding instead of importing bs58
1 parent b9f8d4e commit a0d82f7

File tree

1 file changed

+3
-2
lines changed
  • packages/wrapped-keys-lit-actions/src/lib/solana/internal

1 file changed

+3
-2
lines changed

packages/wrapped-keys-lit-actions/src/lib/solana/internal/signMessage.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { Keypair } from '@solana/web3.js';
2-
import bs58 from 'bs58';
32
import nacl from 'tweetnacl';
43

4+
/* global ethers */
5+
56
function signMessage({ messageToSign, solanaKeyPair }) {
67
try {
78
const signature = nacl.sign.detached(
@@ -49,5 +50,5 @@ export async function signMessageSolanaKey({ messageToSign, privateKey }) {
4950
throw new Error('Signature did not verify to expected Solana public key');
5051
}
5152

52-
return bs58.encode(signature);
53+
return ethers.utils.base58.encode(signature);
5354
}

0 commit comments

Comments
 (0)