Skip to content

Commit

Permalink
test: console.log key first 5 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbrugneaux committed Oct 2, 2024
1 parent 5a0a741 commit c45b174
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/tests/e2e.test.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
import { testWithAnvilL1 } from "@celo/dev-utils/lib/anvil-test";
import { beforeAll, expect, test } from "bun:test";
import { CeloContract, CeloTransactionTypesPlugin } from "..";
import Web3, {
Address,
Contract,
DataFormat,
FMT_BYTES,
FMT_NUMBER,
} from "web3";
import Web3, { Address } from "web3";
import { stableTokenEurABI } from "@celo/abis";
import { hexToBytes, toWei } from "web3-utils";
import { CeloChains, TxTypeToPrefix } from "../utils";
import { waitForTransactionReceipt } from "web3-eth";
import { CIP64Transaction } from "../cip64";
import { CeloChains } from "../utils";

let stable: CeloContract<typeof stableTokenEurABI>;
let stableAddress: Address;

const web3 = new Web3(CeloChains.alfajores.rpcUrl);
console.log(process.env.TEST_ACCOUNT_1!.slice(5));

Check failure on line 11 in src/tests/e2e.test.ts

View workflow job for this annotation

GitHub Actions / Run tests

TypeError: undefined is not an object (evaluating 'process.env.TEST_ACCOUNT_1.slice')

at /home/runner/work/web3-plugin-transaction-types/web3-plugin-transaction-types/src/tests/e2e.test.ts:11:25
console.log(process.env.TEST_ACCOUNT_2!.slice(5));
const account = web3.eth.accounts.privateKeyToAccount(
process.env.TEST_ACCOUNT_1 as string
);
const account2 = web3.eth.accounts.privateKeyToAccount(
process.env.TEST_ACCOUNT_2 as string
);

web3.eth.accounts.wallet?.add(account);

beforeAll(async () => {
Expand Down

0 comments on commit c45b174

Please sign in to comment.