diff --git a/src/api/Ethereum.ts b/src/api/Ethereum.ts index 1b40c9a7a7..e17987249b 100644 --- a/src/api/Ethereum.ts +++ b/src/api/Ethereum.ts @@ -10,6 +10,8 @@ import network from "../network"; import { blockchainBaseURL } from "./Ledger"; import { FeeEstimationFailed } from "../errors"; import { makeLRUCache } from "../cache"; +import { getEnv } from "../env"; + export type Block = { height: BigNumber; }; // TODO more fields actually @@ -131,8 +133,9 @@ export const apiForCurrency = (currency: CryptoCurrency): API => { let { data } = await network({ method: "GET", url: URL.format({ - /** @important FIXME: transactions are mocked while we are waiting for the API */ - pathname: `http://51.210.220.222/blockchain/v3/eth/addresses/${address}/transactions`, + pathname: getEnv("NFT") + ? `http://51.210.220.222/blockchain/v3/eth/addresses/${address}/transactions` + : `${baseURL}/addresses/${address}/transactions`, query: { batch_size, noinput: true, diff --git a/src/env.ts b/src/env.ts index c080edc591..e3224aab99 100644 --- a/src/env.ts +++ b/src/env.ts @@ -366,6 +366,11 @@ const envDefinitions = { parser: stringParser, desc: "switch the app into a MOCK mode for test purpose, the value will be used as a seed for the rng. Avoid falsy values.", }, + NFT: { + def: false, + parser: boolParser, + desc: "synchronizing nfts", + }, OPERATION_ADDRESSES_LIMIT: { def: 100, parser: intParser,