Skip to content

Commit

Permalink
Merge branch 'feature/staging-rollout12-v1.40.0' into morph-stg
Browse files Browse the repository at this point in the history
  • Loading branch information
DenSmolonski committed May 21, 2024
2 parents 6fbfc41 + d3edda5 commit 48cb206
Show file tree
Hide file tree
Showing 105 changed files with 4,060 additions and 2,929 deletions.
1 change: 1 addition & 0 deletions .env.protofire
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPLICATION_VERSION=1.40.0
27 changes: 0 additions & 27 deletions .github/dependabot.yml

This file was deleted.

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 @@ -44,10 +44,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 @@ -59,10 +59,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
57 changes: 56 additions & 1 deletion src/config/entities/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export default () => ({
about: {
name: 'safe-client-gateway',
version: process.env.APPLICATION_VERSION,
version: process.env.APPLICATION_VERSION || 'v1.39.0',
buildNumber: process.env.APPLICATION_BUILD_NUMBER,
},
amqp: {
Expand Down Expand Up @@ -68,6 +68,55 @@ export default () => ({
84531: { nativeCoin: 'ethereum', chainName: 'base' },
84532: { nativeCoin: 'ethereum', chainName: 'base' },
2810: { nativeCoin: 'ethereum', chainName: 'morph-holesky' },
1284: { nativeCoin: 'moonbeam', chainName: 'moonbeam' },
1285: { nativeCoin: 'moonriver', chainName: 'moonriver' },
1287: { nativeCoin: 'moonbeam', chainName: 'moonbeam' },
59144: { nativeCoin: 'ethereum', chainName: 'linea' },
59140: { nativeCoin: 'ethereum', chainName: 'linea' },
245022934: { nativeCoin: 'neon', chainName: 'neon-evm' },
534351: { nativeCoin: 'ethereum', chainName: 'scroll' },
80085: { nativeCoin: 'berachain-bera', chainName: 'berachain' },
17000: { nativeCoin: 'ethereum', chainName: 'ethereum' },
255: { nativeCoin: 'ethereum', chainName: 'kroma' },
2358: { nativeCoin: 'ethereum', chainName: 'kroma' },
11155420: { nativeCoin: 'ethereum', chainName: 'ethereum' },
7777777: { nativeCoin: 'ethereum', chainName: 'zora-network' },
999999999: { nativeCoin: 'ethereum', chainName: 'zora-network' },
34443: { nativeCoin: 'ethereum', chainName: 'mode' },
919: { nativeCoin: 'ethereum', chainName: 'mode' },
1111: { nativeCoin: 'wemix-token', chainName: 'wemix-network' },
1112: { nativeCoin: 'wemix-token', chainName: 'wemix-network' },
7000: { nativeCoin: 'zetachain', chainName: 'zetachain' },
7001: { nativeCoin: 'zetachain', chainName: 'zetachain' },
168587773: { nativeCoin: 'ethereum', chainName: 'blast' },
1666600000: { nativeCoin: 'harmony', chainName: 'harmony-shard-0' },
1666700000: { nativeCoin: 'harmony', chainName: 'harmony-shard-0' },
23294: { nativeCoin: 'oasis-network', chainName: 'oasis-sapphire' },
23295: { nativeCoin: 'oasis-network', chainName: 'oasis-sapphire' },
30: { nativeCoin: 'rootstock', chainName: 'rootstock' },
31: { nativeCoin: 'rootstock', chainName: 'rootstock' },
18233: { nativeCoin: 'ethereum', chainName: 'unreal' },
111188: { nativeCoin: 'ethereum', chainName: 're-al' },
713715: { nativeCoin: 'sei-network', chainName: 'sei-network' },
1135: { nativeCoin: 'ethereum', chainName: 'lisk' },
4202: { nativeCoin: 'ethereum', chainName: 'lisksep' },
81457: { nativeCoin: 'ethereum', chainName: 'blast' },
252: { nativeCoin: 'ethereum', chainName: 'fraxtal' },
424: { nativeCoin: 'ethereum', chainName: 'PGN' },
1729: { nativeCoin: 'ethereum', chainName: 'reya' },
810180: { nativeCoin: 'ethereum', chainName: 'zklink' },
810182: { nativeCoin: 'ethereum', chainName: 'zklink' },
4157: { nativeCoin: 'crossfi-2', chainName: 'crossfi-2' },
2523: { nativeCoin: 'ethereum', chainName: 'fraxtal' },
60808: { nativeCoin: 'ethereum', chainName: 'gobob' },
111: { nativeCoin: 'ethereum', chainName: 'gobob' },
123420111: { nativeCoin: 'ethereum', chainName: 'opcelestia-raspberry' },
88153591557: { nativeCoin: 'ethereum', chainName: 'arb-blueberry' },
94204209: { nativeCoin: 'ethereum', chainName: 'polygon-blackberry' },
690: { nativeCoin: 'ethereum', chainName: 'redstone-mainnet' },
17069: { nativeCoin: 'ethereum', chainName: 'redstone-garnet' },
7560: { nativeCoin: 'ethereum', chainName: 'cyber' },
111557560: { nativeCoin: 'ethereum', chainName: 'cyber' },
},
highRefreshRateTokens:
process.env.HIGH_REFRESH_RATE_TOKENS?.split(',') ?? [],
Expand Down Expand Up @@ -194,6 +243,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 @@ -221,6 +272,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 48cb206

Please sign in to comment.