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