Sync upstream v2.7.3 (merge conflicts)#2
Conversation
* debug wallet client error * Support raw text/html for NFT animation on the token instance page Resolves blockscout#2609 * fix writing to a contract with dynamic provider * change default interval for hot contracts * wait for load event of NFT embed frame * update screenshots * add network validation mode to dynamic provider * add rootstock mainnet preset * update preset for rootsrock mainnet * [skip ci] disable essential dapps for rootstock mainnet * pass required flag to FormFieldSelect controller * bump dynamic version * fix rabby wallet tx write
Replaces text/plain with application/json for proper ingestion on the backend
There was a problem hiding this comment.
Code Review
This pull request introduces the Rootstock network configuration, updates the project license to the Blockscout Software Licence, and implements a more secure method for embedding interactive NFTs using a dedicated HTML shell and specific CSP policies. Key feedback includes resolving several merge conflict markers found in package files and CSP logic, addressing a critical issue where gas estimation was incorrectly set to zero for certain wallet types, and fixing a typo in the NFT component. Additionally, it is recommended to use existing constants instead of magic strings for consistency.
| <<<<<<< HEAD | ||
| "private": true, | ||
| "type": "module", | ||
| "main": "dist/index.js", | ||
| "license": "MIT", | ||
| ======= | ||
| "main": "index.js", | ||
| >>>>>>> v2.7.3 |
| <<<<<<< HEAD | ||
| ======= | ||
| const marketplaceFeature = appConfig.features.marketplace; | ||
|
|
||
| const NFT_HTML_EMBED_PATH = '/nft-html-embed.html'; | ||
|
|
||
| >>>>>>> v2.7.3 |
| <<<<<<< HEAD | ||
| "@dynamic-labs/ethereum": "4.67.2", | ||
| "@dynamic-labs/sdk-react-core": "4.67.2", | ||
| "@dynamic-labs/wagmi-connector": "4.67.2", | ||
| ======= | ||
| "@dynamic-labs/ethereum": "4.74.1", | ||
| "@dynamic-labs/sdk-react-core": "4.74.1", | ||
| "@dynamic-labs/wagmi-connector": "4.74.1", | ||
| >>>>>>> v2.7.3 |
There was a problem hiding this comment.
| const estimatedGas = feature.isEnabled && feature.connectorType === 'dynamic' && walletType === 'dynamicwaas' ? | ||
| BigInt(0) : undefined; |
There was a problem hiding this comment.
Setting estimatedGas to BigInt(0) for dynamicwaas is highly likely to cause transaction failures. Standard EVM transactions require a non-zero gas limit. If manual estimation is being skipped for this wallet type, passing undefined is the correct way to let the wallet or provider perform the estimation automatically.
const estimatedGas = undefined;| const estimatedGas = feature.isEnabled && feature.connectorType === 'dynamic' && walletType === 'dynamicwaas' ? | ||
| BigInt(0) : undefined; |
| const [ isLoaded, setIsLoaded ] = React.useState(false); | ||
|
|
||
| const handleLoad = React.useCallback(() => { | ||
| const handleMesageFromFrame = React.useCallback((event: MessageEvent) => { |
There was a problem hiding this comment.
Typo in function name: handleMesageFromFrame should be handleMessageFromFrame. Please update the definition and all its references (lines 44, 49, 74, 81).
| const handleMesageFromFrame = React.useCallback((event: MessageEvent) => { | |
| const handleMessageFromFrame = React.useCallback((event: MessageEvent) => { |
| } | ||
|
|
||
| return INTERVAL_ITEMS[0].id; | ||
| return '1d'; |
Test PR creation manually — should succeed if branch state is OK