Skip to content

Commit

Permalink
[ECO-1729] Remove husky from the repo and merge/pull inbox head (#79)
Browse files Browse the repository at this point in the history
Co-authored-by: matt <[email protected]>
  • Loading branch information
xbtmatt and matt authored May 24, 2024
1 parent beb7672 commit c45ffec
Show file tree
Hide file tree
Showing 7 changed files with 276 additions and 273 deletions.
2 changes: 1 addition & 1 deletion src/inbox
4 changes: 0 additions & 4 deletions src/typescript/frontend/.husky/pre-commit

This file was deleted.

2 changes: 0 additions & 2 deletions src/typescript/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"emoji-regex": "^10.3.0",
"formik": "^2.4.4",
"framer-motion": "^10.16.4",
"husky": "^8.0.3",
"lodash": "^4.17.0",
"next": "^14.2.3",
"react": "^18.3.1",
Expand Down Expand Up @@ -86,7 +85,6 @@
"pre-commit": "pnpm run pre-commit:install && pnpm run pre-commit:run",
"pre-commit:install": "pre-commit install -c ../../../cfg/pre-commit-config.yaml",
"pre-commit:run": "pre-commit run --all-files -c ../../../cfg/pre-commit-config.yaml",
"prepare": "cd ../../../ && husky install",
"start": "next start",
"storybook": "storybook dev -p 6006"
},
Expand Down
527 changes: 266 additions & 261 deletions src/typescript/pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/typescript/sdk/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ if (!VERCEL) {
dotenv.config({ path: envPath });
// If the publisher private key is not set by now, throw an error.
if (!process.env.PUBLISHER_PK) {
throw new Error("Missing PUBLISHER_PK environment variable for test.");
/* eslint-disable-next-line no-console */
console.warn("Missing PUBLISHER_PK environment variable for test, using the default value.");
process.env.PUBLISHER_PK = "29479e9e5fe47ba9a8af509dd6da1f907510bcf8917bfb19b7079d8c63c0b720";
}

// Get the derived account from the private key.
Expand Down
6 changes: 4 additions & 2 deletions src/typescript/sdk/tests/utils/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Account, Ed25519PrivateKey } from "@aptos-labs/ts-sdk";
import { Account, Ed25519PrivateKey, Hex } from "@aptos-labs/ts-sdk";
import fs from "fs";
import path from "path";
import findGitRoot from "find-git-root";
Expand All @@ -21,7 +21,9 @@ export function getTestHelpers(): TestHelpers {
const { aptos } = getAptosClient();

const pk = fs.readFileSync(PK_PATH).toString();
const publisher = Account.fromPrivateKey({ privateKey: new Ed25519PrivateKey(pk) });
const publisher = Account.fromPrivateKey({
privateKey: new Ed25519PrivateKey(Hex.fromHexString(pk).toUint8Array()),
});
const publishPackageResult = JSON.parse(fs.readFileSync(PUBLISH_RES_PATH).toString());

return {
Expand Down
4 changes: 2 additions & 2 deletions src/typescript/sdk/tests/utils/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Account, type Aptos } from "@aptos-labs/ts-sdk";
import { type Ed25519Account, type Aptos } from "@aptos-labs/ts-sdk";

export interface Result {
transaction_hash: string;
Expand Down Expand Up @@ -30,6 +30,6 @@ export type PublishPackageResult = {

export type TestHelpers = {
aptos: Aptos;
publisher: Account;
publisher: Ed25519Account;
publishPackageResult: PublishPackageResult;
};

0 comments on commit c45ffec

Please sign in to comment.