Skip to content

Commit 87ebabf

Browse files
authored
Bump up packages versions (blockscout#2229)
* Bump up packages vertions * fix wagmi config, wc csp policy and id type in account resources
1 parent 4d9e174 commit 87ebabf

File tree

24 files changed

+1061
-1347
lines changed

24 files changed

+1061
-1347
lines changed

configs/envs/.env.eth

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ETH
4949
NEXT_PUBLIC_NETWORK_EXPLORERS=[{'title':'GeckoTerminal','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/geckoterminal.png','baseUrl':'https://www.geckoterminal.com/','paths':{'token':'/eth/pools'}},{'title':'Etherscan','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/etherscan.png','baseUrl':'https://etherscan.io/','paths':{'tx':'/tx','address':'/address','token':'/token','block':'/block'}}, {'title':'blockchair','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/blockchair.png','baseUrl':'https://blockchair.com/','paths':{'tx':'/ethereum/transaction','address':'/ethereum/address','token':'/ethereum/erc-20/token','block':'/ethereum/block'}},{'title':'sentio','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/sentio.png','baseUrl':'https://app.sentio.xyz/','paths':{'tx':'/tx/1','address':'/contract/1'}}, {'title':'Tenderly','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/tenderly.png','baseUrl':'https://dashboard.tenderly.co','paths':{'tx':'/tx/mainnet'}}, {'title':'0xPPL','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/0xPPL.png','baseUrl':'https://0xppl.com','paths':{'tx':'/Ethereum/tx','address':'/','token':'/c/Ethereum'}}, {'title':'3xpl','logo':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/explorer-logos/3xpl.png','baseUrl':'https://3xpl.com/','paths':{'tx':'/ethereum/transaction','address':'/ethereum/address'}} ]
5050
NEXT_PUBLIC_NETWORK_ID=1
5151
NEXT_PUBLIC_NETWORK_NAME=Ethereum
52-
NEXT_PUBLIC_NETWORK_RPC_URL=https://eth.llamarpc.com
52+
NEXT_PUBLIC_NETWORK_RPC_URL=https://eth.drpc.org
5353
NEXT_PUBLIC_NETWORK_SHORT_NAME=Ethereum
5454
NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE=validation
5555
NEXT_PUBLIC_OG_ENHANCED_DATA_ENABLED=true

lib/api/resources.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,26 +161,26 @@ export const RESOURCES = {
161161
path: '/api/account/v2/email/resend',
162162
},
163163
custom_abi: {
164-
path: '/api/account/v2/user/custom_abis/:id?',
164+
path: '/api/account/v2/user/custom_abis{/:id}',
165165
pathParams: [ 'id' as const ],
166166
},
167167
watchlist: {
168-
path: '/api/account/v2/user/watchlist/:id?',
168+
path: '/api/account/v2/user/watchlist{/:id}',
169169
pathParams: [ 'id' as const ],
170170
filterFields: [ ],
171171
},
172172
private_tags_address: {
173-
path: '/api/account/v2/user/tags/address/:id?',
173+
path: '/api/account/v2/user/tags/address{/:id}',
174174
pathParams: [ 'id' as const ],
175175
filterFields: [ ],
176176
},
177177
private_tags_tx: {
178-
path: '/api/account/v2/user/tags/transaction/:id?',
178+
path: '/api/account/v2/user/tags/transaction{/:id}',
179179
pathParams: [ 'id' as const ],
180180
filterFields: [ ],
181181
},
182182
api_keys: {
183-
path: '/api/account/v2/user/api_keys/:id?',
183+
path: '/api/account/v2/user/api_keys{/:id}',
184184
pathParams: [ 'id' as const ],
185185
},
186186

@@ -210,7 +210,7 @@ export const RESOURCES = {
210210
},
211211

212212
token_info_applications: {
213-
path: '/api/v1/chains/:chainId/token-info-submissions/:id?',
213+
path: '/api/v1/chains/:chainId/token-info-submissions{/:id}',
214214
pathParams: [ 'chainId' as const, 'id' as const ],
215215
endpoint: getFeaturePayload(config.features.addressVerification)?.api.endpoint,
216216
basePath: getFeaturePayload(config.features.addressVerification)?.api.basePath,

lib/web3/wagmiConfig.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ const wagmiConfig = (() => {
3535
url: config.app.baseUrl,
3636
icons: [ config.UI.navigation.icon.default ].filter(Boolean),
3737
},
38-
enableEmail: true,
38+
auth: {
39+
email: true,
40+
socials: [],
41+
},
3942
ssr: true,
4043
batch: { multicall: { wait: 100 } },
4144
});

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

nextjs/csp/policies/walletConnect.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export function walletConnect(): CspDev.DirectiveDescriptor {
1414
'*.web3modal.com',
1515
'*.web3modal.org',
1616
'*.walletconnect.com',
17+
'*.walletconnect.org',
1718
'wss://relay.walletconnect.com',
1819
'wss://www.walletlink.org',
1920
],

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,22 @@
5050
"@metamask/providers": "^10.2.1",
5151
"@monaco-editor/react": "^4.4.6",
5252
"@next/bundle-analyzer": "14.2.3",
53-
"@opentelemetry/auto-instrumentations-node": "^0.39.4",
54-
"@opentelemetry/exporter-metrics-otlp-proto": "^0.45.1",
55-
"@opentelemetry/exporter-trace-otlp-http": "^0.45.0",
56-
"@opentelemetry/resources": "^1.18.0",
57-
"@opentelemetry/sdk-node": "^0.45.0",
58-
"@opentelemetry/sdk-trace-node": "^1.18.0",
59-
"@opentelemetry/semantic-conventions": "^1.18.0",
53+
"@opentelemetry/auto-instrumentations-node": "0.43.0",
54+
"@opentelemetry/exporter-metrics-otlp-proto": "0.49.1",
55+
"@opentelemetry/exporter-trace-otlp-http": "0.49.1",
56+
"@opentelemetry/resources": "1.22.0",
57+
"@opentelemetry/sdk-node": "0.49.1",
58+
"@opentelemetry/sdk-trace-node": "1.22.0",
59+
"@opentelemetry/semantic-conventions": "1.22.0",
6060
"@sentry/cli": "^2.21.2",
6161
"@sentry/react": "7.24.0",
6262
"@sentry/tracing": "7.24.0",
6363
"@slise/embed-react": "^2.2.0",
64-
"@tanstack/react-query": "^5.4.3",
65-
"@tanstack/react-query-devtools": "^5.4.3",
64+
"@tanstack/react-query": "5.55.4",
65+
"@tanstack/react-query-devtools": "5.55.4",
6666
"@types/papaparse": "^5.3.5",
6767
"@types/react-scroll": "^1.8.4",
68-
"@web3modal/wagmi": "4.2.1",
68+
"@web3modal/wagmi": "5.1.7",
6969
"airtable": "^0.12.2",
7070
"bignumber.js": "^9.1.0",
7171
"blo": "^1.1.1",
@@ -87,7 +87,7 @@
8787
"magic-bytes.js": "1.8.0",
8888
"mixpanel-browser": "^2.47.0",
8989
"monaco-editor": "^0.34.1",
90-
"next": "14.2.3",
90+
"next": "14.2.9",
9191
"nextjs-routes": "^1.0.8",
9292
"node-fetch": "^3.2.9",
9393
"papaparse": "^5.3.2",
@@ -110,8 +110,8 @@
110110
"swagger-ui-react": "^5.9.0",
111111
"use-font-face-observer": "^1.2.1",
112112
"valibot": "0.38.0",
113-
"viem": "2.10.9",
114-
"wagmi": "2.9.2",
113+
"viem": "2.21.5",
114+
"wagmi": "2.12.10",
115115
"xss": "^1.0.14"
116116
},
117117
"devDependencies": {

stubs/account.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { TX_HASH } from './tx';
66
export const PRIVATE_TAG_ADDRESS: AddressTag = {
77
address: ADDRESS_PARAMS,
88
address_hash: ADDRESS_HASH,
9-
id: '4',
9+
id: 4,
1010
name: 'placeholder',
1111
};
1212

1313
export const PRIVATE_TAG_TX: TransactionTag = {
14-
id: '1',
14+
id: 1,
1515
name: 'placeholder',
1616
transaction_hash: TX_HASH,
1717
};
@@ -21,7 +21,7 @@ export const WATCH_LIST_ITEM_WITH_TOKEN_INFO: WatchlistAddress = {
2121
address_balance: '7072643779453701031672',
2222
address_hash: ADDRESS_HASH,
2323
exchange_rate: '0.00099052',
24-
id: '18',
24+
id: 18,
2525
name: 'placeholder',
2626
notification_methods: {
2727
email: false,
@@ -68,7 +68,7 @@ export const CUSTOM_ABI: CustomAbi = {
6868
],
6969
contract_address: ADDRESS_PARAMS,
7070
contract_address_hash: ADDRESS_HASH,
71-
id: '1',
71+
id: 1,
7272
name: 'placeholder',
7373
};
7474

types/api/account.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export interface AddressTag {
33
address_hash: string;
44
address: AddressParam;
55
name: string;
6-
id: string;
6+
id: number;
77
}
88

99
export type AddressTags = Array<AddressTag>
@@ -52,7 +52,7 @@ export interface Transaction {
5252
export interface TransactionTag {
5353
transaction_hash: string;
5454
name: string;
55-
id: string;
55+
id: number;
5656
}
5757

5858
export type TransactionTags = Array<TransactionTag>
@@ -81,7 +81,7 @@ export interface WatchlistAddress {
8181
exchange_rate: string;
8282
notification_settings: NotificationSettings;
8383
notification_methods: NotificationMethods;
84-
id: string;
84+
id: number;
8585
address: AddressParam;
8686
tokens_count: number;
8787
tokens_fiat_value: string;
@@ -107,7 +107,7 @@ export type CustomAbis = Array<CustomAbi>
107107

108108
export interface CustomAbi {
109109
name: string;
110-
id: string;
110+
id: number;
111111
contract_address_hash: string;
112112
contract_address: AddressParam;
113113
abi: Array<AbiItem>;

ui/address/details/AddressFavoriteButton.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ const AddressFavoriteButton = ({ className, hash, watchListId }: Props) => {
4949
}, [ deleteModalProps ]);
5050

5151
const formData = React.useMemo(() => {
52+
if (typeof watchListId !== 'number') {
53+
return;
54+
}
55+
5256
return {
5357
address_hash: hash,
54-
id: String(watchListId),
58+
id: watchListId,
5559
};
5660
}, [ hash, watchListId ]);
5761

@@ -83,12 +87,14 @@ const AddressFavoriteButton = ({ className, hash, watchListId }: Props) => {
8387
onSuccess={ handleAddOrDeleteSuccess }
8488
data={ formData }
8589
/>
86-
<DeleteAddressModal
87-
{ ...deleteModalProps }
88-
onClose={ handleDeleteModalClose }
89-
data={ formData }
90-
onSuccess={ handleAddOrDeleteSuccess }
91-
/>
90+
{ formData && (
91+
<DeleteAddressModal
92+
{ ...deleteModalProps }
93+
onClose={ handleDeleteModalClose }
94+
data={ formData }
95+
onSuccess={ handleAddOrDeleteSuccess }
96+
/>
97+
) }
9298
</>
9399
);
94100
};

ui/customAbi/CustomAbiModal/CustomAbiForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
9898

9999
const onSubmit: SubmitHandler<Inputs> = useCallback((formData) => {
100100
setAlertVisible(false);
101-
mutation.mutate({ ...formData, id: data?.id });
101+
mutation.mutate({ ...formData, id: data?.id ? String(data.id) : undefined });
102102
}, [ mutation, data, setAlertVisible ]);
103103

104104
const renderContractAddressInput = useCallback(({ field }: {field: ControllerRenderProps<Inputs, 'contract_address_hash'>}) => {

ui/customAbi/CustomAbiTable/CustomAbiTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const CustomAbiTable = ({ data, isLoading, onDeleteClick, onEditClick }: Props)
3030
<Tbody>
3131
{ data?.map((item, index) => (
3232
<CustomAbiTableItem
33-
key={ item.id + (isLoading ? index : '') }
33+
key={ item.id + (isLoading ? String(index) : '') }
3434
item={ item }
3535
isLoading={ isLoading }
3636
onDeleteClick={ onDeleteClick }

ui/pages/CustomAbi.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const CustomAbiPage: React.FC = () => {
6464
<Box display={{ base: 'block', lg: 'none' }}>
6565
{ data?.map((item, index) => (
6666
<CustomAbiListItem
67-
key={ item.id + (isPlaceholderData ? index : '') }
67+
key={ item.id + (isPlaceholderData ? String(index) : '') }
6868
item={ item }
6969
isLoading={ isPlaceholderData }
7070
onDeleteClick={ onDeleteClick }

ui/privateTags/AddressModal/AddressForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, onSuccess, setAlertVisibl
5151
const isEdit = data?.id;
5252
if (isEdit) {
5353
return apiFetch('private_tags_address', {
54-
pathParams: { id: data.id },
54+
pathParams: { id: String(data.id) },
5555
fetchParams: { method: 'PUT', body },
5656
});
5757
}

ui/privateTags/AddressTagTable/AddressTagTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const AddressTagTable = ({ data, onDeleteClick, onEditClick, isLoading, top }: P
3434
{ data?.map((item: AddressTag, index: number) => (
3535
<AddressTagTableItem
3636
item={ item }
37-
key={ item.id + (isLoading ? index : '') }
37+
key={ item.id + (isLoading ? String(index) : '') }
3838
onDeleteClick={ onDeleteClick }
3939
onEditClick={ onEditClick }
4040
isLoading={ isLoading }

ui/privateTags/DeletePrivateTagModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const DeletePrivateTagModal: React.FC<Props> = ({ isOpen, onClose, data, type })
2525
const mutationFn = useCallback(() => {
2626
const resourceName = type === 'address' ? 'private_tags_address' : 'private_tags_tx';
2727
return apiFetch(resourceName, {
28-
pathParams: { id: data.id },
28+
pathParams: { id: String(data.id) },
2929
fetchParams: { method: 'DELETE' },
3030
});
3131
}, [ type, apiFetch, data.id ]);

ui/privateTags/PrivateAddressTags.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const PrivateAddressTags = () => {
6161
{ addressTagsData?.items.map((item: AddressTag, index: number) => (
6262
<AddressTagListItem
6363
item={ item }
64-
key={ item.id + (isPlaceholderData ? index : '') }
64+
key={ item.id + (isPlaceholderData ? String(index) : '') }
6565
onDeleteClick={ onDeleteClick }
6666
onEditClick={ onEditClick }
6767
isLoading={ isPlaceholderData }

ui/privateTags/PrivateTransactionTags.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const PrivateTransactionTags = () => {
6262
<Box display={{ base: 'block', lg: 'none' }}>
6363
{ transactionTagsData?.items.map((item, index) => (
6464
<TransactionTagListItem
65-
key={ item.id + (isPlaceholderData ? index : '') }
65+
key={ item.id + (isPlaceholderData ? String(index) : '') }
6666
item={ item }
6767
isLoading={ isPlaceholderData }
6868
onDeleteClick={ onDeleteClick }

ui/privateTags/TransactionModal/TransactionForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, onSuccess, setAlertVi
5555

5656
if (isEdit) {
5757
return apiFetch('private_tags_tx', {
58-
pathParams: { id: data.id },
58+
pathParams: { id: String(data.id) },
5959
fetchParams: { method: 'PUT', body },
6060
});
6161
}

ui/privateTags/TransactionTagTable/TransactionTagTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const AddressTagTable = ({ data, isLoading, onDeleteClick, onEditClick, top }: P
3333
<Tbody>
3434
{ data?.map((item, index) => (
3535
<TransactionTagTableItem
36-
key={ item.id + (isLoading ? index : '') }
36+
key={ item.id + (isLoading ? String(index) : '') }
3737
item={ item }
3838
isLoading={ isLoading }
3939
onDeleteClick={ onDeleteClick }

ui/watchlist/AddressModal/AddressForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const AddressForm: React.FC<Props> = ({ data, onSuccess, setAlertVisible, isAdd
100100
if (!isAdd && data) {
101101
// edit address
102102
return apiFetch('watchlist', {
103-
pathParams: { id: data?.id || '' },
103+
pathParams: { id: data?.id ? String(data.id) : '' },
104104
fetchParams: { method: 'PUT', body },
105105
});
106106

ui/watchlist/DeleteAddressModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const DeleteAddressModal: React.FC<Props> = ({ isOpen, onClose, onSuccess, data
2020

2121
const mutationFn = useCallback(() => {
2222
return apiFetch('watchlist', {
23-
pathParams: { id: data.id },
23+
pathParams: { id: String(data.id) },
2424
fetchParams: { method: 'DELETE' },
2525
});
2626
}, [ data?.id, apiFetch ]);

ui/watchlist/WatchlistTable/WatchListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const WatchListItem = ({ item, isLoading, onEditClick, onDeleteClick }: Props) =
6565
const body = { ...item, notification_methods: { email: !notificationEnabled } };
6666
setNotificationEnabled(prevState => !prevState);
6767
return apiFetch('watchlist', {
68-
pathParams: { id: item.id },
68+
pathParams: { id: String(item.id) },
6969
fetchParams: { method: 'PUT', body },
7070
});
7171
},

ui/watchlist/WatchlistTable/WatchListTableItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const WatchlistTableItem = ({ item, isLoading, onEditClick, onDeleteClick }: Pro
6969
const body = { ...item, notification_methods: { email: !notificationEnabled } };
7070
setNotificationEnabled(prevState => !prevState);
7171
return apiFetch('watchlist', {
72-
pathParams: { id: item.id },
72+
pathParams: { id: String(item.id) },
7373
fetchParams: { method: 'PUT', body },
7474
});
7575
},

0 commit comments

Comments
 (0)