Skip to content

Commit

Permalink
fix(near::addvalidator): fix serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
imsk17 committed Dec 6, 2024
1 parent e00db5f commit 4cedd5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/handler/chains/near/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ export async function configNearHandler(
staking: ERC20Staking,
validatorAddress: string,
) {
const near = await connect({
networkId: conf.networkId,
nodeUrl: conf.rpcURL,
});

const lb = await em.findOne(Block, {
chain: conf.chain,
contractAddress: conf.contractAddress,
Expand All @@ -42,6 +37,11 @@ export async function configNearHandler(
nearWallet.accountId,
KeyPair.fromString(nearWallet.secretKey as never),
);
const near = await connect({
networkId: conf.networkId,
nodeUrl: conf.rpcURL,
keyStore: ks,
});
const mutex = new Mutex();
async function fetchProvider() {
const release = await mutex.acquire();
Expand Down
4 changes: 2 additions & 2 deletions src/handler/chains/near/utils/signData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import type { KeyPairEd25519 } from "near-api-js/lib/utils";

export class AddValidator {
@field({ type: "string" })
account_id: string;
public_key: string;

@field({ type: "string" })
public_key: string;
account_id: string;

constructor(account_id: string, public_key: string) {
this.account_id = account_id;
Expand Down

0 comments on commit 4cedd5f

Please sign in to comment.