Skip to content

Commit

Permalink
Fix Solana signMessage return type
Browse files Browse the repository at this point in the history
  • Loading branch information
y3fers0n committed May 28, 2024
1 parent a171d80 commit 40f363e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/solana/SolanaProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ export class SolanaProvider extends BaseProvider implements ISolanaProvider {
);
}

async signMessage(message: Uint8Array): Promise<{ signature: Uint8Array }> {
async signMessage(
message: Uint8Array,
): Promise<{ signature: Uint8Array; publicKey: string | undefined }> {
const data = SolanaProvider.bufferToHex(message);

const res = await this.#privateRequest<string>({
Expand All @@ -184,7 +186,8 @@ export class SolanaProvider extends BaseProvider implements ISolanaProvider {
});

return {
signature: new Uint8Array(SolanaProvider.messageToBuffer(res).buffer),
signature: Buffer.from(SolanaProvider.messageToBuffer(res).buffer),
publicKey: this.publicKey?.toBase58(),
};
}

Expand Down

0 comments on commit 40f363e

Please sign in to comment.