Remove message field from onboardParticipant message and add build workflow (#7)

* Remove message field from onboardParticipant message

* Add a workflow to run lint and build

---------

Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
Isha Venikar 2024-07-05 11:25:33 +05:30 committed by GitHub
parent 51fed6aa62
commit f51b31b954
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 49 additions and 8 deletions

View File

@ -0,0 +1,23 @@
name: Lint & Build
on:
pull_request:
jobs:
lint_and_build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
- run: yarn
- name: Run lint
run: yarn lint
- name: Run build
run: yarn build

23
.github/workflows/on-pr.yaml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Lint & Build
on:
pull_request:
jobs:
lint_and_build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://npm.pkg.github.com'
- run: yarn
- name: Run lint
run: yarn lint
- name: Run build
run: yarn build

View File

@ -440,7 +440,7 @@ export class Registry {
/**
* Onboard participant.
*/
async onboardParticipant ({ ethPayload, ethSignature, message }: MessageMsgOnboardParticipant, privateKey: string, fee: StdFee): Promise<MsgOnboardParticipantResponse> {
async onboardParticipant ({ ethPayload, ethSignature }: MessageMsgOnboardParticipant, privateKey: string, fee: StdFee): Promise<MsgOnboardParticipantResponse> {
const account = new Account(Buffer.from(privateKey, 'hex'));
await account.init();
const laconicClient = await this.getLaconicClient(account);
@ -449,7 +449,6 @@ export class Registry {
account.address,
ethPayload,
ethSignature,
message,
fee
);
}

View File

@ -394,7 +394,6 @@ export class LaconicClient extends SigningStargateClient {
signer: string,
ethPayload: EthPayload,
ethSignature: string,
message: string,
fee: StdFee | 'auto' | number,
memo = ''
) {
@ -403,8 +402,7 @@ export class LaconicClient extends SigningStargateClient {
value: {
participant: signer,
ethPayload,
ethSignature,
message
ethSignature
}
};

View File

@ -31,8 +31,7 @@ const onboardingTests = () => {
await registry.onboardParticipant({
ethPayload,
ethSignature,
message: 'Message signed by cosmos private key'
ethSignature
}, privateKey, fee);
});

View File

@ -23,5 +23,4 @@ interface ethPayload {
export interface MessageMsgOnboardParticipant {
ethPayload: ethPayload
ethSignature: string
message: string
}