Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print some Amino sign docs #1548

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/amino/src/signdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,7 @@ export function escapeCharacters(input: string): string {

export function serializeSignDoc(signDoc: StdSignDoc): Uint8Array {
const serialized = escapeCharacters(sortedJsonStringify(signDoc));
// eslint-disable-next-line no-console
console.log("Sign doc serialized:", serialized);
return toUtf8(serialized);
}
5 changes: 2 additions & 3 deletions packages/stargate/src/modules/gov/messages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
nonNegativeIntegerMatcher,
pendingWithoutSimapp,
simapp,
simapp50Enabled,
simappEnabled,
validator,
} from "../../testutils.spec";
Expand Down Expand Up @@ -206,9 +205,9 @@ describe("gov messages", () => {
client.disconnect();
});

it("works with Amino JSON sign mode", async () => {
fit("works with Amino JSON sign mode", async () => {
pendingWithoutSimapp();
if (simapp50Enabled()) pending("Not working, see https://github.com/cosmos/cosmos-sdk/issues/18546");
// if (simapp50Enabled()) pending("Not working, see https://github.com/cosmos/cosmos-sdk/issues/18546");
assert(voterWalletAmino);
assert(proposalId, "Missing proposal ID");
const client = await SigningStargateClient.connectWithSigner(
Expand Down
9 changes: 4 additions & 5 deletions packages/stargate/src/modules/staking/messages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
faucet,
pendingWithoutSimapp,
simapp,
simapp50Enabled,
} from "../../testutils.spec";
import { MsgCreateValidatorEncodeObject, MsgEditValidatorEncodeObject } from "./messages";

Expand Down Expand Up @@ -94,9 +93,9 @@ describe("staking messages", () => {
client.disconnect();
});

it("works with Amino JSON sign mode", async () => {
fit("works with Amino JSON sign mode", async () => {
pendingWithoutSimapp();
if (simapp50Enabled()) pending("Not working, see https://github.com/cosmos/cosmos-sdk/issues/18546");
// if (simapp50Enabled()) pending("Not working, see https://github.com/cosmos/cosmos-sdk/issues/18546");

const valWallet = await Secp256k1HdWallet.generate();
const [valAccount] = await valWallet.getAccounts();
Expand Down Expand Up @@ -235,9 +234,9 @@ describe("staking messages", () => {
client.disconnect();
});

it("works with Amino JSON sign mode", async () => {
fit("works with Amino JSON sign mode", async () => {
pendingWithoutSimapp();
if (simapp50Enabled()) pending("Not working, see https://github.com/cosmos/cosmos-sdk/issues/18546");
// if (simapp50Enabled()) pending("Not working, see https://github.com/cosmos/cosmos-sdk/issues/18546");

const valWallet = await Secp256k1HdWallet.generate();
const [valAccount] = await valWallet.getAccounts();
Expand Down
Loading