Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
|
There was a problem hiding this comment.
Pull Request Overview
This PR integrates polkadot/api into the project and rewrites the sendTransaction logic to utilize Polkadot blockchain constructs. Key changes include:
- Adding imports and instantiation of the Polkadot API and related modules.
- Rewriting the transaction payload derivation and extrinsic signature logic.
- Updating package.json to include the newest "@polkadot/api" dependency.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx | Integrates Polkadot API calls and creates a new extrinsic signature flow for transactions. |
| advanced/dapps/react-dapp-v2/package.json | Adds the "@polkadot/api" dependency required for new blockchain functionalities. |
Comments suppressed due to low confidence (2)
advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx:978
- [nitpick] The variable name 'call' is ambiguous; consider renaming it to 'transferCall' to better reflect its purpose.
const call = api.tx.balances.transfer(address, 1000000000000); // 1 DOT
advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx:1024
- There is an inconsistency in the representation of 'specVersion' and 'transactionVersion'; while the transactionPayload formats these as hex strings, the addSignature call uses raw numeric values. Consider aligning these formats for consistency.
extrinsic.addSignature(address, `0x${result.signature.replaceAll('0x', '')}`, { ...transactionPayload, specVersion: api.runtimeVersion.specVersion, transactionVersion: api.runtimeVersion.transactionVersion, });
|
@quetool could you check please why it fails to build? |
Maybe it's this? I don't know, I'm not expert here, better you checkout that branch and check cause I didn't introduce this. I ran ppm build and it didn't fix |
|
@ganchoradkov I really don't know why it fails |
… feature/polkadot_transaction_hash

Installed and using "@polkadot/api" to sign and send transaction and verify that we can obtain a transaction hash.
Needs to be ran with some coins either on Polkadot mainnet or westend. I wasn't able to get them on any faucet.