Skip to content

Commit

Permalink
fix: be able to receive ethereum related info
Browse files Browse the repository at this point in the history
  • Loading branch information
CedrikNikita committed Nov 20, 2024
1 parent 2fee398 commit d4f1bc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ jobs:
runs-on: ubuntu-latest
env:
APP_NAME: wallet
ETHERSCAN_API_KEY: "${{ github.ref == 'refs/heads/master' && secrets.ETHERSCAN_API_KEY_PROD || secrets.ETHERSCAN_API_KEY_DEV }}"
WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
TOKEN_SALES_URL_MAINNET: ${{ secrets.TOKEN_SALES_URL_MAINNET }}
TOKEN_SALES_URL_TESTNET: ${{ secrets.TOKEN_SALES_URL_TESTNET }}
Expand Down
3 changes: 1 addition & 2 deletions src/protocols/ethereum/libs/EtherscanService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class EtherscanService {
apiUrl: string;

// TODO - update delay if we use paid API key
freeVersionTimeDelay = ETHERSCAN_API_KEY ? 250 : 5300;
freeVersionTimeDelay = 5000 + Math.floor(Math.random() * 1000);

constructor(apiUrl: string) {
this.apiUrl = apiUrl;
Expand All @@ -40,7 +40,6 @@ export class EtherscanService {
apikey: ETHERSCAN_API_KEY,
}).toString();

// Without API key amount of calls are limited to one per every 5 seconds.
// With free API key we can make 5 calls per second.
// We're adding delays between calls to avoid getting empty results.
// TODO: Use own node or paid version
Expand Down

0 comments on commit d4f1bc6

Please sign in to comment.