Skip to content

Commit

Permalink
Merge tag 'v0.5.7' into develop
Browse files Browse the repository at this point in the history
no message
  • Loading branch information
Luphia1984 committed May 21, 2023
2 parents e47eceb + 868a294 commit 81f6f67
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ declare class Lunar {
public getData({ contract, func, params, data }: { contract: string, data?: string, func?: string, params?: string[], state?: string }): Promise<string>;
public send({ to, amount, data }: { to: string, amount: number, data:string }): Promise<string>;
public signTypedData(params: IJSON): Promise<string>;
public verify(message: string, signature: string): boolean;
public verifyTypedData(params: IJSON, signature: string): boolean;
public verify(message: string, signature: string, expectSigner?: string): boolean;
public verifyTypedData(params: IJSON, signature: string, expectSigner?: string): boolean;
public interfaceOf({ contract, abi }: { contract: string, abi: any }): Promise<any>;
}
export default Lunar;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cafeca/lunar",
"version": "0.5.6",
"version": "0.5.7",
"description": "Blockchain Connect Module",
"main": "dist/index.js",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ declare global {
export class Lunar {
private static instance: Lunar;
// static version = `v${version}`;
public static version = `v0.5.6`;
public static version = `v0.5.7`;
public static Blockchains = Blockchains;
public static Wallets = Wallets;
public static keccak256 = keccak256;
Expand Down Expand Up @@ -208,7 +208,7 @@ export class Lunar {
const message = JSON.stringify(params);
const json = JSON.parse(message);
const address = json?.message?.signer;
const expectSigner = signer || address || '';
const expectSigner = address || signer || '';
const result = address?
(expectSigner === address.toLowerCase() && this.verify(message, signature, expectSigner)) :
this.verify(message, signature, expectSigner);
Expand Down

0 comments on commit 81f6f67

Please sign in to comment.