Skip to content

Commit

Permalink
Merge pull request #329 from omnisat/core-signmsg-back-compatibility
Browse files Browse the repository at this point in the history
make sign message fully backwards compatible
  • Loading branch information
hathbanger authored Feb 19, 2025
2 parents 91087d8 + 12f91ff commit 2a09655
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/lasereyes-core/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,17 @@ export class LaserEyesClient {
}
}

async signMessage(message: string, options?: SignMessageOptions) {
async signMessage(
message: string,
toSignAddressOrOptions?: string | SignMessageOptions
) {
let options: SignMessageOptions = {}
if (typeof toSignAddressOrOptions === 'string') {
options = { toSignAddress: toSignAddressOrOptions }
} else if (toSignAddressOrOptions) {
options = toSignAddressOrOptions
}

if (!this.$store.get().provider) return
if (this.$providerMap[this.$store.get().provider!]) {
try {
Expand Down

0 comments on commit 2a09655

Please sign in to comment.