Fix onboarding disabled error check
This commit is contained in:
parent
e0328c8c95
commit
bb7cd9b2cb
@ -11,9 +11,9 @@ import { Comet38Client } from '@cosmjs/tendermint-rpc';
|
|||||||
|
|
||||||
import { MsgCancelBondEncodeObject, MsgCreateBondEncodeObject, MsgRefillBondEncodeObject, MsgWithdrawBondEncodeObject, bondTypes, typeUrlMsgCancelBond, typeUrlMsgCreateBond, typeUrlMsgRefillBond, typeUrlMsgWithdrawBond } from './types/cerc/bond/message';
|
import { MsgCancelBondEncodeObject, MsgCreateBondEncodeObject, MsgRefillBondEncodeObject, MsgWithdrawBondEncodeObject, bondTypes, typeUrlMsgCancelBond, typeUrlMsgCreateBond, typeUrlMsgRefillBond, typeUrlMsgWithdrawBond } from './types/cerc/bond/message';
|
||||||
import { Coin } from './proto/cosmos/base/v1beta1/coin';
|
import { Coin } from './proto/cosmos/base/v1beta1/coin';
|
||||||
import { MsgAssociateBondEncodeObject, MsgDeleteNameEncodeObject, MsgDissociateBondEncodeObject, MsgDissociateRecordsEncodeObject, MsgReassociateRecordsEncodeObject, MsgReserveAuthorityEncodeObject, MsgSetAuthorityBondEncodeObject, MsgSetNameEncodeObject, MsgSetRecordEncodeObject, registryTypes, typeUrlMsgAssociateBond, typeUrlMsgDeleteName, typeUrlMsgDissociateBond, typeUrlMsgDissociateRecords, typeUrlMsgReassociateRecords, typeUrlMsgReserveAuthority, typeUrlMsgSetAuthorityBond, typeUrlMsgSetName, typeUrlMsgSetRecord, NAMESERVICE_ERRORS, ONBOARDING_DISABLED_ERROR } from './types/cerc/registry/message';
|
import { MsgAssociateBondEncodeObject, MsgDeleteNameEncodeObject, MsgDissociateBondEncodeObject, MsgDissociateRecordsEncodeObject, MsgReassociateRecordsEncodeObject, MsgReserveAuthorityEncodeObject, MsgSetAuthorityBondEncodeObject, MsgSetNameEncodeObject, MsgSetRecordEncodeObject, registryTypes, typeUrlMsgAssociateBond, typeUrlMsgDeleteName, typeUrlMsgDissociateBond, typeUrlMsgDissociateRecords, typeUrlMsgReassociateRecords, typeUrlMsgReserveAuthority, typeUrlMsgSetAuthorityBond, typeUrlMsgSetName, typeUrlMsgSetRecord, NAMESERVICE_ERRORS } from './types/cerc/registry/message';
|
||||||
import { MsgCommitBidEncodeObject, MsgRevealBidEncodeObject, auctionTypes, typeUrlMsgCommitBid, typeUrlMsgRevealBid } from './types/cerc/auction/message';
|
import { MsgCommitBidEncodeObject, MsgRevealBidEncodeObject, auctionTypes, typeUrlMsgCommitBid, typeUrlMsgRevealBid } from './types/cerc/auction/message';
|
||||||
import { MsgOnboardParticipantEncodeObject, onboardingTypes, typeUrlMsgOnboardParticipant } from './types/cerc/onboarding/message';
|
import { MsgOnboardParticipantEncodeObject, ONBOARDING_DISABLED_ERROR, onboardingTypes, typeUrlMsgOnboardParticipant } from './types/cerc/onboarding/message';
|
||||||
import { MsgAssociateBondResponse, MsgDeleteNameResponse, MsgDissociateBondResponse, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse, MsgReserveAuthorityResponse, MsgSetAuthorityBondResponse, MsgSetNameResponse, MsgSetRecordResponse, Payload } from './proto/cerc/registry/v1/tx';
|
import { MsgAssociateBondResponse, MsgDeleteNameResponse, MsgDissociateBondResponse, MsgDissociateRecordsResponse, MsgReassociateRecordsResponse, MsgReserveAuthorityResponse, MsgSetAuthorityBondResponse, MsgSetNameResponse, MsgSetRecordResponse, Payload } from './proto/cerc/registry/v1/tx';
|
||||||
import { Record, Signature } from './proto/cerc/registry/v1/registry';
|
import { Record, Signature } from './proto/cerc/registry/v1/registry';
|
||||||
import { Account } from './account';
|
import { Account } from './account';
|
||||||
@ -381,7 +381,7 @@ export class LaconicClient extends SigningStargateClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
processWriteError (error: string) {
|
processWriteError (error: string) {
|
||||||
const errorMessage = NAMESERVICE_ERRORS.find(message => error.includes(message) || ONBOARDING_DISABLED_ERROR);
|
const errorMessage = [...NAMESERVICE_ERRORS, ONBOARDING_DISABLED_ERROR].find(message => error.includes(message));
|
||||||
|
|
||||||
if (!errorMessage) {
|
if (!errorMessage) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
@ -15,6 +15,8 @@ export interface MsgOnboardParticipantEncodeObject extends EncodeObject {
|
|||||||
readonly value: MsgOnboardParticipant;
|
readonly value: MsgOnboardParticipant;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const ONBOARDING_DISABLED_ERROR = 'Validator onboarding is disabled';
|
||||||
|
|
||||||
interface ethPayload {
|
interface ethPayload {
|
||||||
address: string
|
address: string
|
||||||
msg: string
|
msg: string
|
||||||
|
@ -94,8 +94,6 @@ export const NAMESERVICE_ERRORS = [
|
|||||||
'Access denied.'
|
'Access denied.'
|
||||||
];
|
];
|
||||||
|
|
||||||
export const ONBOARDING_DISABLED_ERROR = 'Validator onboarding is disabled';
|
|
||||||
|
|
||||||
export interface MessageMsgReserveAuthority {
|
export interface MessageMsgReserveAuthority {
|
||||||
name: string
|
name: string
|
||||||
owner: string
|
owner: string
|
||||||
|
Loading…
Reference in New Issue
Block a user