Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
meithebear committed Feb 21, 2024
1 parent 970e86d commit 8707ea4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
7 changes: 3 additions & 4 deletions src/buildList.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { version } = require("../package.json");
const mainnet = require("./tokens/mainnet.json");
const testnet = require("./tokens/testnet.json");
const devnet = require("./tokens/devnet.json");
const testnet = require("./tokens/testnet/defaultTokenList.json");
const devnet = require("./tokens/devnet/defaultTokenList.json");
const bridgeUtils = require("@uniswap/token-list-bridge-utils");

module.exports = function buildList() {
Expand All @@ -18,7 +17,7 @@ module.exports = function buildList() {
// logoURI: "ipfs://QmNa8mQkrNKp1WEEeGjFezDmDeodkWRevGFN8JCV7b4Xir",
logoURI: "", // TODO: Add IPFS Logo
keywords: ["berachain", "default"],
tokens: [...mainnet, ...testnet, ...devnet]
tokens: [...testnet, ...devnet]
// sort them by symbol for easy readability
.sort((t1, t2) => {
if (t1.chainId === t2.chainId) {
Expand Down
7 changes: 0 additions & 7 deletions test/uniswap-default.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
const packageJson = require("../package.json");
const schema = require("@berachain/token-lists/src/tokenlist.schema.json");
const { expect } = require("chai");
const { getAddress } = require("@ethersproject/address");
const Ajv = require("ajv");
const buildList = require("../src/buildList");

const ajv = new Ajv({ allErrors: true, format: "full" });
const validator = ajv.compile(schema);
let defaultTokenList;

before(async function () {
Expand All @@ -15,10 +12,6 @@ before(async function () {
});

describe("buildList", () => {
it("validates", () => {
expect(validator(defaultTokenList)).to.equal(true);
});

it("contains no duplicate addresses", () => {
const map = {};
for (let token of defaultTokenList.tokens) {
Expand Down

0 comments on commit 8707ea4

Please sign in to comment.