Skip to content

Commit

Permalink
Merge tag 'v1.40.0' into feature/staging-rollout12-v1.39.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DenSmolonski committed May 20, 2024
2 parents 4a1cc03 + f1aca3d commit dce2588
Show file tree
Hide file tree
Showing 85 changed files with 3,329 additions and 1,887 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
LOG_SILENT: true
- name: Coveralls Parallel
continue-on-error: true
uses: coverallsapp/github-action@v2.2.3
uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.task }}
Expand All @@ -106,7 +106,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2.2.3
uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
Expand Down
3 changes: 0 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ export default tseslint.config(
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-floating-promises': 'warn',
// TODO: Address these rules: (added to update to ESLint 9)
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
"redis": "^4.6.13",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"semver": "^7.6.0",
"viem": "^2.10.1",
"semver": "^7.6.2",
"viem": "^2.10.5",
"winston": "^3.13.0",
"zod": "^3.23.6"
"zod": "^3.23.8"
},
"devDependencies": {
"@faker-js/faker": "^8.4.1",
Expand All @@ -60,10 +60,10 @@
"@types/jest": "29.5.12",
"@types/jsonwebtoken": "^9",
"@types/lodash": "^4.17.1",
"@types/node": "^20.12.10",
"@types/node": "^20.12.11",
"@types/semver": "^7.5.8",
"@types/supertest": "^6.0.2",
"eslint": "^9.0.0",
"eslint": "^9.2.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.0.11",
"jest": "29.7.0",
Expand Down
5 changes: 5 additions & 0 deletions src/config/entities/__tests__/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export default (): ReturnType<typeof configuration> => ({
zerionBalancesChainIds: ['137'],
swapsDecoding: true,
historyDebugLogs: false,
imitationMapping: false,
auth: false,
confirmationView: false,
eventsQueue: false,
Expand All @@ -199,6 +200,10 @@ export default (): ReturnType<typeof configuration> => ({
silent: process.env.LOG_SILENT?.toLowerCase() === 'true',
},
mappings: {
imitation: {
prefixLength: faker.number.int(),
suffixLength: faker.number.int(),
},
history: {
maxNestedTransfers: faker.number.int({ min: 1, max: 5 }),
},
Expand Down
6 changes: 6 additions & 0 deletions src/config/entities/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ export default () => ({
swapsDecoding: process.env.FF_SWAPS_DECODING?.toLowerCase() === 'true',
historyDebugLogs:
process.env.FF_HISTORY_DEBUG_LOGS?.toLowerCase() === 'true',
imitationMapping:
process.env.FF_IMITATION_MAPPING?.toLowerCase() === 'true',
auth: process.env.FF_AUTH?.toLowerCase() === 'true',
confirmationView:
process.env.FF_CONFIRMATION_VIEW?.toLowerCase() === 'true',
Expand Down Expand Up @@ -269,6 +271,10 @@ export default () => ({
ownersTtlSeconds: parseInt(process.env.OWNERS_TTL_SECONDS ?? `${0}`),
},
mappings: {
imitation: {
prefixLength: parseInt(process.env.IMITATION_PREFIX_LENGTH ?? `${3}`),
suffixLength: parseInt(process.env.IMITATION_SUFFIX_LENGTH ?? `${4}`),
},
history: {
maxNestedTransfers: parseInt(
process.env.MAX_NESTED_TRANSFERS ?? `${100}`,
Expand Down
9 changes: 5 additions & 4 deletions src/datasources/alerts-api/tenderly-api.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { AlertsRegistration } from '@/domain/alerts/entities/alerts-registration
import { DataSourceError } from '@/domain/errors/data-source.error';
import { NetworkResponseError } from '@/datasources/network/entities/network.error.entity';
import { AlertsDeletion } from '@/domain/alerts/entities/alerts-deletion.entity';
import { getAddress } from 'viem';

const networkService = {
post: jest.fn(),
Expand Down Expand Up @@ -71,7 +72,7 @@ describe('TenderlyApi', () => {
};

const contract: AlertsRegistration = {
address: faker.finance.ethereumAddress(),
address: getAddress(faker.finance.ethereumAddress()),
displayName: fakeDisplayName(),
chainId: faker.string.numeric(),
};
Expand Down Expand Up @@ -108,7 +109,7 @@ describe('TenderlyApi', () => {

await expect(
service.addContract({
address: faker.finance.ethereumAddress(),
address: getAddress(faker.finance.ethereumAddress()),
chainId: faker.string.numeric(),
}),
).rejects.toThrow(new DataSourceError('Unexpected error', status));
Expand All @@ -120,7 +121,7 @@ describe('TenderlyApi', () => {
describe('deleteContract', () => {
it('should delete a contract', async () => {
const contract: AlertsDeletion = {
address: faker.finance.ethereumAddress(),
address: getAddress(faker.finance.ethereumAddress()),
chainId: faker.string.numeric(),
};

Expand Down Expand Up @@ -151,7 +152,7 @@ describe('TenderlyApi', () => {

await expect(
service.deleteContract({
address: faker.finance.ethereumAddress(),
address: getAddress(faker.finance.ethereumAddress()),
chainId: faker.string.numeric(),
}),
).rejects.toThrow(new DataSourceError('Unexpected error', status));
Expand Down
Loading

0 comments on commit dce2588

Please sign in to comment.