From 1c16b6475268312fb401dda42ffe544d67cb9228 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 5 Sep 2024 10:53:55 +0530 Subject: [PATCH] Update onboarding disabled error --- src/onboarding.test.ts | 5 ++--- src/types/cerc/onboarding/message.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/onboarding.test.ts b/src/onboarding.test.ts index 25e6f51..ff51ca6 100644 --- a/src/onboarding.test.ts +++ b/src/onboarding.test.ts @@ -2,7 +2,7 @@ import { Wallet } from 'ethers'; import { DirectSecp256k1Wallet, AccountData as CosmosAccount } from '@cosmjs/proto-signing'; -import { Registry, Account } from './index'; +import { Registry, Account, ONBOARDING_DISABLED_ERROR } from './index'; import { getConfig } from './testing/helper'; import { Participant } from './proto/cerc/onboarding/v1/onboarding'; @@ -80,7 +80,6 @@ const onboardingDisabledTests = () => { }); test('Error on onboarding attempt.', async () => { - const errorMsg = 'Validator onboarding is disabled: invalid request'; const mnemonic = Account.generateMnemonic(); ethWallet = Wallet.fromMnemonic(mnemonic); @@ -100,7 +99,7 @@ const onboardingDisabledTests = () => { kycId: DUMMY_KYC_ID }, privateKey, fee); } catch (error: any) { - expect(error.toString()).toContain(errorMsg); + expect(error.toString()).toContain(ONBOARDING_DISABLED_ERROR); } }); diff --git a/src/types/cerc/onboarding/message.ts b/src/types/cerc/onboarding/message.ts index b1ab832..1056704 100644 --- a/src/types/cerc/onboarding/message.ts +++ b/src/types/cerc/onboarding/message.ts @@ -15,7 +15,7 @@ export interface MsgOnboardParticipantEncodeObject extends EncodeObject { readonly value: MsgOnboardParticipant; } -export const ONBOARDING_DISABLED_ERROR = 'Validator onboarding is disabled'; +export const ONBOARDING_DISABLED_ERROR = 'Onboarding is disabled'; interface ethPayload { address: string