Skip to content

Commit b1937bb

Browse files
committed
Merge branch 'develop' into feature/rep-oracle/refact-process-paid-webhooks
2 parents 7e2c628 + f8e31ec commit b1937bb

File tree

100 files changed

+1602
-873
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1602
-873
lines changed

.github/workflows/ci-dependency-review.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
- name: "Checkout Repository"
1212
uses: actions/[email protected]
1313
- name: "Dependency Review"
14-
uses: actions/dependency-review-action@v4.3.4
14+
uses: actions/dependency-review-action@v4.4.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"prettier": "^3.2.5",
4343
"ts-jest": "^29.2.2",
4444
"ts-node": "^10.9.2",
45-
"typescript": "^4.9.3"
45+
"typescript": "^5.6.3"
4646
},
4747
"resolutions": {
4848
"ejs": "^3.1.10",

packages/apps/dashboard/server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"devDependencies": {
3232
"@nestjs/cli": "^10.3.2",
3333
"@nestjs/schematics": "^10.1.3",
34-
"@nestjs/testing": "^9.4.3",
34+
"@nestjs/testing": "^10.4.6",
3535
"@types/express": "^4.17.13",
3636
"@types/jest": "29.5.1",
3737
"@types/node": "22.5.4",
@@ -49,7 +49,7 @@
4949
"ts-loader": "^9.2.3",
5050
"ts-node": "^10.0.0",
5151
"tsconfig-paths": "4.2.0",
52-
"typescript": "^5.0.0"
52+
"typescript": "^5.6.3"
5353
},
5454
"lint-staged": {
5555
"*.ts": [

packages/apps/dashboard/ui-2024/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"zustand": "^4.5.4"
4040
},
4141
"devDependencies": {
42-
"@types/react": "^18.2.66",
42+
"@types/react": "^18.3.12",
4343
"@types/react-dom": "^18.2.22",
4444
"@typescript-eslint/eslint-plugin": "^7.2.0",
4545
"@typescript-eslint/parser": "^7.2.0",
@@ -50,7 +50,7 @@
5050
"prettier": "3.2.5",
5151
"sass": "^1.78.0",
5252
"stylelint-prettier": "^5.0.0",
53-
"typescript": "^5.2.2",
53+
"typescript": "^5.6.3",
5454
"vite": "^5.4.7",
5555
"vite-plugin-svgr": "^4.2.0"
5656
}

packages/apps/dashboard/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@types/file-saver": "^2.0.5",
4848
"@types/glob": "^8.1.0",
4949
"@types/numeral": "^2.0.2",
50-
"@types/react": "^18.2.43",
50+
"@types/react": "^18.3.12",
5151
"@types/react-dom": "^18.2.25",
5252
"@types/react-gtm-module": "^2.0.3",
5353
"@types/react-test-renderer": "^18.0.0",

packages/apps/fortune/exchange-oracle/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"wagmi": "^2.12.8"
4141
},
4242
"devDependencies": {
43-
"@types/react": "^18.3.3",
43+
"@types/react": "^18.3.12",
4444
"@types/react-dom": "^18.3.0",
4545
"@types/react-router-dom": "^5.3.3",
4646
"@typescript-eslint/eslint-plugin": "^7.13.1",
@@ -49,7 +49,7 @@
4949
"eslint": "^8.57.0",
5050
"eslint-plugin-react-hooks": "^4.6.2",
5151
"eslint-plugin-react-refresh": "^0.4.11",
52-
"typescript": "^5.2.2",
52+
"typescript": "^5.6.3",
5353
"vite": "^5.4.7"
5454
},
5555
"lint-staged": {

packages/apps/fortune/exchange-oracle/client/src/constants/chains.ts

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,13 @@ switch (import.meta.env.VITE_APP_ENVIRONMENT.toLowerCase()) {
2323
break;
2424
}
2525

26-
export const RPC_URLS: Partial<Record<ChainId, string | undefined>> = {
27-
[ChainId.MAINNET]: import.meta.env.VITE_APP_RPC_URL_MAINNET || '',
28-
[ChainId.SEPOLIA]: import.meta.env.VITE_APP_RPC_URL_SEPOLIA || '',
29-
[ChainId.BSC_MAINNET]: import.meta.env.VITE_APP_RPC_URL_BSC_MAINNET || '',
30-
[ChainId.BSC_TESTNET]: import.meta.env.VITE_APP_RPC_URL_BSC_TESTNET || '',
31-
[ChainId.POLYGON]: import.meta.env.VITE_APP_RPC_URL_POLYGON || '',
32-
[ChainId.POLYGON_AMOY]: import.meta.env.VITE_APP_RPC_URL_POLYGON_AMOY || '',
33-
[ChainId.MOONBEAM]: import.meta.env.VITE_APP_RPC_URL_MOONBEAM || '',
34-
[ChainId.MOONBASE_ALPHA]:
35-
import.meta.env.VITE_APP_RPC_URL_MOONBASE_ALPHA || '',
36-
[ChainId.AVALANCHE_TESTNET]:
37-
import.meta.env.VITE_APP_RPC_URL_AVALANCHE_TESTNET || '',
38-
[ChainId.AVALANCHE]: import.meta.env.VITE_APP_RPC_URL_AVALANCHE || '',
39-
[ChainId.CELO_ALFAJORES]:
40-
import.meta.env.VITE_APP_RPC_URL_CELO_ALFAJORES || '',
41-
[ChainId.CELO]: import.meta.env.VITE_APP_RPC_URL_CELO || '',
42-
[ChainId.XLAYER]: import.meta.env.VITE_APP_RPC_URL_XLAYER || '',
43-
[ChainId.XLAYER_TESTNET]:
44-
import.meta.env.VITE_APP_RPC_URL_XLAYER_TESTNET || '',
45-
[ChainId.LOCALHOST]: 'http://127.0.0.1:8545',
46-
};
26+
const supportedChains =
27+
import.meta.env.VITE_APP_SUPPORTED_CHAINS?.split(',') || [];
4728

4829
export const SUPPORTED_CHAIN_IDS: ChainId[] = initialSupportedChainIds.filter(
49-
(chainId) => Boolean(RPC_URLS[chainId])
30+
(chainId) => supportedChains.includes(chainId.toString())
5031
);
5132

52-
// it no rpc set, throw error
5333
if (SUPPORTED_CHAIN_IDS.length === 0) {
5434
throw new Error(
5535
'No valid RPC URL provided for the supported blockchain environment'

packages/apps/fortune/exchange-oracle/client/src/providers/WagmiProvider.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import { ChainId } from '@human-protocol/sdk';
2-
31
import { FC, PropsWithChildren } from 'react';
4-
import { http, createConfig, WagmiProvider as WWagmiProvider } from 'wagmi';
2+
import { createConfig, http, WagmiProvider as WWagmiProvider } from 'wagmi';
53
import * as wagmiChains from 'wagmi/chains';
64
import { coinbaseWallet, walletConnect } from 'wagmi/connectors';
75

8-
import { RPC_URLS, LOCALHOST } from '../constants/chains';
6+
import { LOCALHOST } from '../constants/chains';
97

108
const projectId = import.meta.env.VITE_APP_WALLETCONNECT_PROJECT_ID;
119

@@ -35,19 +33,19 @@ export const wagmiConfig = createConfig({
3533
}),
3634
],
3735
transports: {
38-
[wagmiChains.mainnet.id]: http(RPC_URLS[ChainId.MAINNET]),
39-
[wagmiChains.sepolia.id]: http(RPC_URLS[ChainId.SEPOLIA]),
40-
[wagmiChains.bsc.id]: http(RPC_URLS[ChainId.BSC_MAINNET]),
41-
[wagmiChains.bscTestnet.id]: http(RPC_URLS[ChainId.BSC_TESTNET]),
42-
[wagmiChains.polygon.id]: http(RPC_URLS[ChainId.POLYGON]),
43-
[wagmiChains.polygonAmoy.id]: http(RPC_URLS[ChainId.POLYGON_AMOY]),
44-
[wagmiChains.moonbeam.id]: http(RPC_URLS[ChainId.MOONBEAM]),
45-
[wagmiChains.moonbaseAlpha.id]: http(RPC_URLS[ChainId.MOONBASE_ALPHA]),
46-
[wagmiChains.avalanche.id]: http(RPC_URLS[ChainId.AVALANCHE]),
47-
[wagmiChains.avalancheFuji.id]: http(RPC_URLS[ChainId.AVALANCHE_TESTNET]),
48-
[wagmiChains.xLayer.id]: http(RPC_URLS[ChainId.XLAYER]),
49-
[wagmiChains.xLayerTestnet.id]: http(RPC_URLS[ChainId.XLAYER_TESTNET]),
50-
[LOCALHOST.id]: http(RPC_URLS[ChainId.LOCALHOST]),
36+
[wagmiChains.mainnet.id]: http(),
37+
[wagmiChains.sepolia.id]: http(),
38+
[wagmiChains.bsc.id]: http(),
39+
[wagmiChains.bscTestnet.id]: http(),
40+
[wagmiChains.polygon.id]: http(),
41+
[wagmiChains.polygonAmoy.id]: http(),
42+
[wagmiChains.moonbeam.id]: http(),
43+
[wagmiChains.moonbaseAlpha.id]: http(),
44+
[wagmiChains.avalanche.id]: http(),
45+
[wagmiChains.avalancheFuji.id]: http(),
46+
[wagmiChains.xLayer.id]: http(),
47+
[wagmiChains.xLayerTestnet.id]: http(),
48+
[LOCALHOST.id]: http(LOCALHOST.rpcUrls.default.http[0]),
5149
},
5250
});
5351

packages/apps/fortune/exchange-oracle/server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@golevelup/ts-jest": "^0.5.0",
4141
"@nestjs/cli": "^10.3.2",
4242
"@nestjs/schematics": "^10.1.3",
43-
"@nestjs/testing": "^10.3.1",
43+
"@nestjs/testing": "^10.4.6",
4444
"@types/express": "^4.17.13",
4545
"@types/jest": "29.5.12",
4646
"@types/pg": "8.11.10",
@@ -60,6 +60,6 @@
6060
"ts-loader": "^9.2.3",
6161
"ts-node": "^10.9.2",
6262
"tsconfig-paths": "4.2.0",
63-
"typescript": "^5.0.0"
63+
"typescript": "^5.6.3"
6464
}
6565
}

packages/apps/fortune/exchange-oracle/server/src/common/interceptors/transform-enum.interceptor.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ export class TransformEnumInterceptor implements NestInterceptor {
5555
: null;
5656
}
5757

58-
private transformEnums(bodyOrQuery: any, targetClass: ClassConstructor<any>): any {
58+
private transformEnums(
59+
bodyOrQuery: any,
60+
targetClass: ClassConstructor<any>,
61+
): any {
5962
// Convert the body or query to an instance of the target class
6063
let transformedInstance = plainToInstance(targetClass, bodyOrQuery);
6164

@@ -111,4 +114,4 @@ export class TransformEnumInterceptor implements NestInterceptor {
111114
}
112115
return bodyOrQuery;
113116
}
114-
}
117+
}

0 commit comments

Comments
 (0)