Skip to content

Commit

Permalink
fixed conflict & fix eslit error
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil committed Aug 9, 2024
1 parent 9211955 commit 26a51fa
Show file tree
Hide file tree
Showing 2 changed files with 1,346 additions and 1,218 deletions.
11 changes: 8 additions & 3 deletions packages/solana/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,14 @@ export class Web3Modal extends Web3ModalScaffold {
}

const signResponse = await provider.signMessage(encodedMessage)
let signature: Uint8Array = signResponse as Uint8Array
if ((signResponse as { signature: Uint8Array }).signature) {
signature = (signResponse as { signature: Uint8Array }).signature
let signature: Uint8Array = signResponse

if ('signature' in signResponse && signResponse.signature instanceof Uint8Array) {
signature = signResponse.signature
} else if (signResponse instanceof Uint8Array) {
signature = signResponse
} else {
throw new Error('Unexpected response format')
}

const encodeSignature = base58.encode(signature)
Expand Down
Loading

0 comments on commit 26a51fa

Please sign in to comment.