Skip to content

Commit

Permalink
Merge pull request #305 from kmartin62/main
Browse files Browse the repository at this point in the history
fix typo in error message
  • Loading branch information
Vritra4 authored Jun 19, 2022
2 parents 8471405 + 4e20d7c commit 20e884b
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion src/core/auth/ContinuousVestingAccount.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('ContinuousVestingAccount', () => {
});

expect(() => acct.toAmino(true)).toThrow(
Error('Net supported for the network')
Error('Not supported for the network')
);
});
});
16 changes: 8 additions & 8 deletions src/core/auth/ContinuousVestingAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class ContinuousVestingAccount extends JSONSerializable<

public toAmino(isClassic?: boolean): ContinuousVestingAccount.Amino {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { base_vesting_account, start_time } = this;
return {
Expand All @@ -63,7 +63,7 @@ export class ContinuousVestingAccount extends JSONSerializable<
value: data.value.base_vesting_account,
});
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return new ContinuousVestingAccount(
base_vesting_account,
Expand All @@ -73,7 +73,7 @@ export class ContinuousVestingAccount extends JSONSerializable<

public toData(isClassic?: boolean): ContinuousVestingAccount.Data {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { base_vesting_account, start_time } = this;
return {
Expand All @@ -88,7 +88,7 @@ export class ContinuousVestingAccount extends JSONSerializable<
isClassic?: boolean
): ContinuousVestingAccount {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const base_vesting_account = BaseVestingAccount.fromData({
'@type': '/cosmos.vesting.v1beta1.BaseVestingAccount',
Expand All @@ -103,7 +103,7 @@ export class ContinuousVestingAccount extends JSONSerializable<

public toProto(isClassic?: boolean): ContinuousVestingAccount.Proto {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { base_vesting_account, start_time } = this;

Expand All @@ -118,7 +118,7 @@ export class ContinuousVestingAccount extends JSONSerializable<
isClassic?: boolean
): ContinuousVestingAccount {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const baseVestingAccount = BaseVestingAccount.fromProto(
ContinuousVestingAccountProto.baseVestingAccount as BaseVestingAccount_pb
Expand All @@ -132,7 +132,7 @@ export class ContinuousVestingAccount extends JSONSerializable<

public packAny(isClassic?: boolean): Any {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return Any.fromPartial({
typeUrl: '/cosmos.vesting.v1beta1.ContinuousVestingAccount',
Expand All @@ -145,7 +145,7 @@ export class ContinuousVestingAccount extends JSONSerializable<
isClassic?: boolean
): ContinuousVestingAccount {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return ContinuousVestingAccount.fromProto(
ContinuousVestingAccount_pb.decode(pubkeyAny.value)
Expand Down
2 changes: 1 addition & 1 deletion src/core/auth/DelayedVestingAccount.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('DelayedVestingAccount', () => {
});

expect(() => acct.toAmino(true)).toThrow(
Error('Net supported for the network')
Error('Not supported for the network')
);
});
});
16 changes: 8 additions & 8 deletions src/core/auth/DelayedVestingAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class DelayedVestingAccount extends JSONSerializable<

public toAmino(isClassic?: boolean): DelayedVestingAccount.Amino {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { base_vesting_account } = this;
return {
Expand All @@ -58,14 +58,14 @@ export class DelayedVestingAccount extends JSONSerializable<
value: data.value.base_vesting_account,
});
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return new DelayedVestingAccount(base_vesting_account);
}

public toData(isClassic?: boolean): DelayedVestingAccount.Data {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { base_vesting_account } = this;
return {
Expand All @@ -83,14 +83,14 @@ export class DelayedVestingAccount extends JSONSerializable<
...data.base_vesting_account,
});
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return new DelayedVestingAccount(base_vesting_account);
}

public toProto(isClassic?: boolean): DelayedVestingAccount.Proto {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { base_vesting_account } = this;

Expand All @@ -107,14 +107,14 @@ export class DelayedVestingAccount extends JSONSerializable<
DelayedVestingAccountProto.baseVestingAccount as BaseVestingAccount_pb
);
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return new DelayedVestingAccount(baseVestingAccount);
}

public packAny(isClassic?: boolean): Any {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return Any.fromPartial({
typeUrl: '/cosmos.vesting.v1beta1.DelayedVestingAccount',
Expand All @@ -127,7 +127,7 @@ export class DelayedVestingAccount extends JSONSerializable<
isClassic?: boolean
): DelayedVestingAccount {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return DelayedVestingAccount.fromProto(
DelayedVestingAccount_pb.decode(pubkeyAny.value)
Expand Down
2 changes: 1 addition & 1 deletion src/core/auth/PeriodicVestingAccount.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('PeriodicVestingAccount', () => {
});

expect(() => acct.toAmino(true)).toThrow(
Error('Net supported for the network')
Error('Not supported for the network')
);
});
});
16 changes: 8 additions & 8 deletions src/core/auth/PeriodicVestingAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class PeriodicVestingAccount extends JSONSerializable<

public toAmino(isClassic?: boolean): PeriodicVestingAccount.Amino {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { base_vesting_account, start_time, vesting_periods } = this;
return {
Expand All @@ -69,7 +69,7 @@ export class PeriodicVestingAccount extends JSONSerializable<
value: data.value.base_vesting_account,
});
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}

return new PeriodicVestingAccount(
Expand All @@ -83,7 +83,7 @@ export class PeriodicVestingAccount extends JSONSerializable<

public toData(isClassic?: boolean): PeriodicVestingAccount.Data {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { base_vesting_account, start_time, vesting_periods } = this;
return {
Expand All @@ -103,7 +103,7 @@ export class PeriodicVestingAccount extends JSONSerializable<
...data.base_vesting_account,
});
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return new PeriodicVestingAccount(
base_vesting_account,
Expand All @@ -114,7 +114,7 @@ export class PeriodicVestingAccount extends JSONSerializable<

public toProto(isClassic?: boolean): PeriodicVestingAccount.Proto {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { base_vesting_account, vesting_periods } = this;

Expand All @@ -129,7 +129,7 @@ export class PeriodicVestingAccount extends JSONSerializable<
isClassic?: boolean
): PeriodicVestingAccount {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const baseVestingAccount = BaseVestingAccount.fromProto(
proto.baseVestingAccount as BaseVestingAccount_pb
Expand All @@ -144,7 +144,7 @@ export class PeriodicVestingAccount extends JSONSerializable<

public packAny(isClassic?: boolean): Any {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return Any.fromPartial({
typeUrl: '/cosmos.vesting.v1beta1.PeriodicVestingAccount',
Expand All @@ -157,7 +157,7 @@ export class PeriodicVestingAccount extends JSONSerializable<
isClassic?: boolean
): PeriodicVestingAccount {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return PeriodicVestingAccount.fromProto(
PeriodicVestingAccount_pb.decode(pubkeyAny.value)
Expand Down
16 changes: 8 additions & 8 deletions src/core/ibc/applications/fee/msgs/MsgPayPacketFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ export class MsgPayPacketFee extends JSONSerializable<

public static fromAmino(_: any, isClassic?: boolean): MsgPayPacketFee {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
_;
throw new Error('Amino not supported');
}

public toAmino(isClassic?: boolean): any {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
throw new Error('Amino not supported');
}
Expand All @@ -49,7 +49,7 @@ export class MsgPayPacketFee extends JSONSerializable<
isClassic?: boolean
): MsgPayPacketFee {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { fee, source_port_id, source_channel_id, signer, relayers } = data;

Expand All @@ -64,7 +64,7 @@ export class MsgPayPacketFee extends JSONSerializable<

public toData(isClassic?: boolean): MsgPayPacketFee.Data {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { fee, source_port_id, source_channel_id, signer, relayers } = this;
return {
Expand All @@ -82,7 +82,7 @@ export class MsgPayPacketFee extends JSONSerializable<
isClassic?: boolean
): MsgPayPacketFee {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return new MsgPayPacketFee(
proto.fee ? Fee.fromProto(proto.fee) : undefined,
Expand All @@ -95,7 +95,7 @@ export class MsgPayPacketFee extends JSONSerializable<

public toProto(isClassic?: boolean): MsgPayPacketFee.Proto {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { fee, source_port_id, source_channel_id, signer, relayers } = this;
return MsgPayPacketFee_pb.fromPartial({
Expand All @@ -109,7 +109,7 @@ export class MsgPayPacketFee extends JSONSerializable<

public packAny(isClassic?: boolean): Any {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return Any.fromPartial({
typeUrl: '/ibc.applications.fee.v1.MsgPayPacketFee',
Expand All @@ -119,7 +119,7 @@ export class MsgPayPacketFee extends JSONSerializable<

public static unpackAny(msgAny: Any, isClassic?: boolean): MsgPayPacketFee {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return MsgPayPacketFee.fromProto(
MsgPayPacketFee_pb.decode(msgAny.value),
Expand Down
16 changes: 8 additions & 8 deletions src/core/ibc/applications/fee/msgs/MsgPayPacketFeeAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ export class MsgPayPacketFeeAsync extends JSONSerializable<

public static fromAmino(_: any, isClassic?: boolean): any {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
_;
throw new Error('Amino not supported');
}

public toAmino(isClassic?: boolean): any {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
throw new Error('Amino not supported');
}
Expand All @@ -41,7 +41,7 @@ export class MsgPayPacketFeeAsync extends JSONSerializable<
isClassic?: boolean
): MsgPayPacketFeeAsync {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { packet_id, packet_fee } = data;

Expand All @@ -53,7 +53,7 @@ export class MsgPayPacketFeeAsync extends JSONSerializable<

public toData(isClassic?: boolean): MsgPayPacketFeeAsync.Data {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
const { packet_id, packet_fee } = this;
return {
Expand All @@ -68,7 +68,7 @@ export class MsgPayPacketFeeAsync extends JSONSerializable<
isClassic?: boolean
): MsgPayPacketFeeAsync {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return new MsgPayPacketFeeAsync(
proto.packetId ? PacketId.fromProto(proto.packetId) : undefined,
Expand All @@ -78,7 +78,7 @@ export class MsgPayPacketFeeAsync extends JSONSerializable<

public toProto(isClassic?: boolean): MsgPayPacketFeeAsync.Proto {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}

const { packet_id, packet_fee } = this;
Expand All @@ -90,7 +90,7 @@ export class MsgPayPacketFeeAsync extends JSONSerializable<

public packAny(isClassic?: boolean): Any {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return Any.fromPartial({
typeUrl: '/ibc.applications.fee.v1.MsgPayPacketFeeAsync',
Expand All @@ -103,7 +103,7 @@ export class MsgPayPacketFeeAsync extends JSONSerializable<
isClassic?: boolean
): MsgPayPacketFeeAsync {
if (isClassic) {
throw new Error('Net supported for the network');
throw new Error('Not supported for the network');
}
return MsgPayPacketFeeAsync.fromProto(
MsgPayPacketFeeAsync_pb.decode(msgAny.value),
Expand Down
Loading

0 comments on commit 20e884b

Please sign in to comment.