Skip to content

Commit

Permalink
Fix broken CI (#296)
Browse files Browse the repository at this point in the history
* Try fix

* Fix it!
boundless-forest authored Feb 24, 2023
1 parent 31b79c5 commit 3ae132a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/ethereum/test-balance.ts
Original file line number Diff line number Diff line change
@@ -2,19 +2,18 @@ import Web3 from "web3";
import { describe } from "mocha";
import { step } from "mocha-steps";
import { expect } from "chai";
import { HOST_HTTP_URL, FAITH, FAITH_P } from "../config";
import { HOST_HTTP_URL, FAITH, FAITH_P, ALITH } from "../config";

const web3 = new Web3(HOST_HTTP_URL);
describe("Test balances", () => {
const VALUE = "0x200";
const TO = "0x1111111111111111111111111111111111111111";
const GAS_PRICE = "0x3B9ACA00"; // 1000000000

let init_from;
let init_to;
it("Account has correct balance", async function () {
step("Account has correct balance", async function () {
init_from = await web3.eth.getBalance(FAITH);
init_to = await web3.eth.getBalance(TO);
init_to = await web3.eth.getBalance(ALITH);

expect(Number(init_from)).to.be.greaterThan(Number(VALUE));
});
@@ -23,7 +22,7 @@ describe("Test balances", () => {
let tx = await web3.eth.accounts.signTransaction(
{
from: FAITH,
to: TO,
to: ALITH,
value: VALUE,
gasPrice: GAS_PRICE,
gas: "0x100000",
@@ -42,6 +41,6 @@ describe("Test balances", () => {
const expectedToBalance = (BigInt(init_to) + BigInt(VALUE)).toString();

expect(await web3.eth.getBalance(FAITH)).to.equal(expectedFromBalance);
expect(await web3.eth.getBalance(TO)).to.equal(expectedToBalance);
expect(await web3.eth.getBalance(ALITH)).to.equal(expectedToBalance);
});
});

0 comments on commit 3ae132a

Please sign in to comment.