Skip to content

Commit

Permalink
Merge branch 'main' into be-api-return-eth-token-even-if-it-doesnt-ex…
Browse files Browse the repository at this point in the history
…ist-in-db
  • Loading branch information
vasyl-ivanchuk committed Oct 18, 2023
2 parents 52ae700 + e5e2cf3 commit 0efd321
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/app/src/components/NetworkSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const getNetworkUrl = (network: NetworkConfig) => {
@apply relative;
.network-list-wrapper {
@apply absolute right-0 top-full h-auto w-full lg:w-[200px];
@apply absolute right-0 top-full h-auto w-full lg:w-[260px];
}
.network-list {
@apply absolute right-0 top-1 z-10 mb-1 max-h-56 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm;
Expand Down
18 changes: 17 additions & 1 deletion packages/app/src/configs/dev.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,30 @@
"icon": "/images/icons/zksync-arrows.svg",
"l1ExplorerUrl": "https://goerli.etherscan.io",
"l2ChainId": 280,
"l2NetworkName": "zkSync Era Testnet",
"l2NetworkName": "zkSync Era Goerli Testnet",
"l2WalletUrl": "https://goerli.staging-portal.zksync.dev/",
"maintenance": false,
"name": "goerli",
"newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri",
"published": true,
"rpcUrl": "https://testnet.era.zksync.dev"
},
{
"apiUrl": "https://block-explorer-api.sepolia.zksync.dev",
"verificationApiUrl": "https://explorer.sepolia.era.zksync.dev",
"bridgeUrl": "https://staging.goerli.bridge.zksync.dev",
"hostnames": [],
"icon": "/images/icons/zksync-arrows.svg",
"l1ExplorerUrl": "https://sepolia.etherscan.io",
"l2ChainId": 300,
"l2NetworkName": "zkSync Era Sepolia Testnet",
"l2WalletUrl": "https://staging-portal.zksync.dev/?network=era-boojnet",
"maintenance": false,
"name": "sepolia",
"newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri",
"published": true,
"rpcUrl": "https://sepolia.era.zksync.dev"
},
{
"apiUrl": "https://block-explorer-api.stage.zksync.dev",
"verificationApiUrl": "https://z2-dev-api-explorer.zksync.dev",
Expand Down
18 changes: 17 additions & 1 deletion packages/app/src/configs/staging.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,30 @@
"icon": "/images/icons/zksync-arrows.svg",
"l1ExplorerUrl": "https://goerli.etherscan.io",
"l2ChainId": 280,
"l2NetworkName": "zkSync Era Testnet",
"l2NetworkName": "zkSync Era Goerli Testnet",
"l2WalletUrl": "https://goerli.staging-portal.zksync.dev/",
"maintenance": false,
"name": "goerli",
"newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri",
"published": true,
"rpcUrl": "https://testnet.era.zksync.dev"
},
{
"apiUrl": "https://block-explorer-api.sepolia.zksync.dev",
"verificationApiUrl": "https://explorer.sepolia.era.zksync.dev",
"bridgeUrl": "https://staging.goerli.bridge.zksync.dev",
"hostnames": [],
"icon": "/images/icons/zksync-arrows.svg",
"l1ExplorerUrl": "https://sepolia.etherscan.io",
"l2ChainId": 300,
"l2NetworkName": "zkSync Era Sepolia Testnet",
"l2WalletUrl": "https://staging-portal.zksync.dev/?network=era-boojnet",
"maintenance": false,
"name": "sepolia",
"newProverUrl": "https://storage.googleapis.com/zksync-era-testnet-proofs/proofs_fri",
"published": true,
"rpcUrl": "https://sepolia.era.zksync.dev"
},
{
"apiUrl": "https://block-explorer-api.stage.zksync.dev",
"verificationApiUrl": "https://z2-dev-api-explorer.zksync.dev",
Expand Down
10 changes: 5 additions & 5 deletions packages/app/tests/e2e/features/artifacts/artifactsSet1.feature
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ Feature: Main Page
Then Check the "<Value>" value is actual for "<Dropdown>" switcher

Examples:
| Value | Dropdown |
| zkSync Era Testnet | network |
| zkSync Era Mainnet | network |
| EN | language |
| UA | language |
| Value | Dropdown |
| zkSync Era Goerli Testnet | network |
| zkSync Era Mainnet | network |
| EN | language |
| UA | language |

@id254:II @featureEnv
Scenario Outline: Check dropdown "<Dropdown>" for "<Value>" and verify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ Feature: Redirection
Then Current page have "<url>" address

Examples:
| Initial page | Network | url |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Testnet | /address/0x000000000000000000000000000000000000800A/?network=goerli |
| /address/0x000000000000000000000000000000000000800A | Goerli (Stage2) | /address/0x000000000000000000000000000000000000800A/?network=goerli-beta |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Mainnet | /address/0x000000000000000000000000000000000000800A/?network=mainnet |
| Initial page | Network | url |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Goerli Testnet | /address/0x000000000000000000000000000000000000800A/?network=goerli |
| /address/0x000000000000000000000000000000000000800A | Goerli (Stage2) | /address/0x000000000000000000000000000000000000800A/?network=goerli-beta |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Mainnet | /address/0x000000000000000000000000000000000000800A/?network=mainnet |

@id561:I @id562:I @id563:I @stagingEnv
Scenario Outline: Verify redirection to "<Network>" network
Expand All @@ -73,6 +73,6 @@ Feature: Redirection
Then Current page have "<url>" address

Examples:
| Initial page | Network | url |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Mainnet | /address/0x000000000000000000000000000000000000800A/?network=mainnet |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Testnet | /address/0x000000000000000000000000000000000000800A/?network=goerli |
| Initial page | Network | url |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Mainnet | /address/0x000000000000000000000000000000000000800A/?network=mainnet |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Goerli Testnet | /address/0x000000000000000000000000000000000000800A/?network=goerli |
8 changes: 4 additions & 4 deletions packages/worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@
"coverageDirectory": "../coverage",
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
"branches": 99,
"functions": 99,
"lines": 99,
"statements": 99
}
},
"testEnvironment": "node",
Expand Down
6 changes: 5 additions & 1 deletion packages/worker/src/blockchain/blockchain.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ export class BlockchainService implements OnModuleInit {
erc20Contract.decimals(),
erc20Contract.name(),
]);
return { symbol, decimals, name };
return {
symbol: symbol?.replace(/\0/g, ""),
decimals,
name: name?.replace(/\0/g, ""),
};
}

public async getBalance(address: string, blockNumber: number, tokenAddress: string): Promise<BigNumber> {
Expand Down

0 comments on commit 0efd321

Please sign in to comment.