Skip to content
This repository was archived by the owner on Dec 4, 2021. It is now read-only.
Open
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
9 changes: 5 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ import Transaction from "arweave/node/lib/transaction";
import { GQLEdgeInterface } from "ar-gql/dist/faces";

// eslint-disable-next-line
console.log = (...x: any[]) => {
if (new Error().stack?.includes("smartweave")) return;
console.info(...x);
};
// console.log = (...x: any[]) => {
// if (new Error().stack?.includes("smartweave")) return;
// console.info(...x);
// };

interface VertoLibOptions {
useCache?: boolean;
Expand Down Expand Up @@ -306,6 +306,7 @@ export default class Verto {
return getTPTokens(
this.arweave,
post,
this.useCache,
this.exchangeContract,
this.exchangeWallet
);
Expand Down
3 changes: 2 additions & 1 deletion src/lib/get_tp_tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ const unique = (arr: VertoToken[]): VertoToken[] => {
export const getTPTokens = async (
client: Arweave,
post: string,
useCache: boolean,
exchangeContract: string,
exchangeWallet: string
): Promise<VertoToken[]> => {
const config = await getConfig(client, post, exchangeWallet);

const tokens: VertoToken[] = [
...(await popularTokens(client, exchangeWallet)),
...(await getTokens(client, exchangeContract)),
...(await getTokens(client, useCache, exchangeContract)),
];
// @ts-ignore
config.blockedTokens.map((token: string) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let vertoInstance: Verto;

describe("E2E Tests", function () {
before(() => {
vertoInstance = new Verto();
vertoInstance = new Verto(undefined, undefined, { useCache: true });
});

it("Assert Verto instance", (done) => {
Expand Down