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:
parent
51fed6aa62
commit
f51b31b954
23
.gitea/workflows/on-pr.yaml
Normal file
23
.gitea/workflows/on-pr.yaml
Normal 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
23
.github/workflows/on-pr.yaml
vendored
Normal 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
|
@ -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
|
||||
);
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -31,8 +31,7 @@ const onboardingTests = () => {
|
||||
|
||||
await registry.onboardParticipant({
|
||||
ethPayload,
|
||||
ethSignature,
|
||||
message: 'Message signed by cosmos private key'
|
||||
ethSignature
|
||||
}, privateKey, fee);
|
||||
});
|
||||
|
||||
|
@ -23,5 +23,4 @@ interface ethPayload {
|
||||
export interface MessageMsgOnboardParticipant {
|
||||
ethPayload: ethPayload
|
||||
ethSignature: string
|
||||
message: string
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user