Closed anizeani closed 2 years ago
I think we should offer a link to a block explorer, like: https://kusama.subscan.io/extrinsic/0x13d401d96b7c87a9504d680d78e6de7aac7b6277875ac8dbee4fff62eea4b71b
where do you want to have the link to subscan? after press of the participate button in the same window?
Where you show the tx hash to the user currently. just make that hash a link
I implemented the hyperlink to subscan, but subscan can't find the transaction. is it, because it will not get through?
subscan sometimes lags a little bit. have you tried a minute later? please post tx hashes of your tests here!
here's the last. maybe add a note that users have to be patient and retry after a minute https://kusama.subscan.io/extrinsic/0xd65752843160f79ebd0f83a5594a0f21653bf061e5699aeef2aa5da65ceed16e
my latest transactions (not sure about the order): 0xf203ce359e01c0ae96abbe7b0c8b0b3520c726f1ed72ce18a124350a65bd7764 (at 17.22) 0xbb69a21d7ec40996007b3685c97e7aabf01f64cc56078886f460ac68ccae3093 0xce5141f4003b08039050958c3169bc6e9dda4cdfc8581529803158bf0e42fa55 0x210fd95f847c58088effe3c606a4c6d46abdb6850f08285fcf25f842ceafc635 I see that the contributions do happen, but the transaction hash I get is not the extrinsic hash shown in subscan. Extrinsic hashes are: 0x39abefae1f1fc1c03a7b3f9ae3a0e55f4ea2bf58a9f23f67560eb62ca302b034 (at 17.22) 0xe8ba7e1f02299d8d968af18933e841e74afee405da91632de9d529d2becca69e 0x029aa0076169e002a0a039bfdfaba5d48f58ed075cffcdd1ef62a5090fe222fc 0xe6fcf9f6f2796dc7bf68c20b5a45fd60d0daf0c39cd3edd7be6b103301d44da4
@brenzi, I solved it. We didn't actually output the transaction hash, but the block hash. Of course, the block hash doesn't (and will never) match the actual transaction hash. I now get the signedBlock from the block hash and iterate over all its' extrinsics and I see, that it's the last entry:
const blockHash = status.asInBlock.toString();
// returns SignedBlock
const signedBlock = await api.rpc.chain.getBlock(hash);
// the hash for each extrinsic in the block
console.log(`"ALL EXTRINSICS OF BLOCK${signedBlock}`);
signedBlock.block.extrinsics.forEach((ex, index) => {
console.log(index, ex.hash.toHex());
});
@brenzi, it's working for me now, please test. Also tell me, if you still want to see the block hash, or only the tx hash
moreover: with my first attempt, the extrinsic failed but it was finalized. is there a way how we can tell the user that the extrinsic has failed?
You can easily test this right now, because the last few contributions have failed with LiquidityRestrictions
https://kusama.subscan.io/extrinsic/0x968fd206fcc6c6a401ed1fe05d49c87cebff988ecabea8c8fe28e4c20912d369
and please test ASAP, before we merge #97 as this will prevent the error from happening
the link to subscan and the tx hash are wrong!!
I send from the demo account EijCociWDFh6ZBKY3P6KnvujkmcttiNVrTLS8WvcQ7KDHRx
but the link points to another extrinsic by another address:
The crowdloan page shows me: link: https://kusama.subscan.io/extrinsic/0x15168b95a3f0ce3675d12464807a1b984daa1ab7003e56fd59dba74e0825bc97 tx hash: 0x15168b95a3f0ce3675d12464807a1b984daa1ab7003e56fd59dba74e0825bc97 block hash: 0xe0bb0d06afec6879c648b715ec8dd5c8e7ba6ca3a48668de1efc4b20f39e7c1b
block hash is correct, but it seems you just take the last extrinsic in that block, not the correct one
LGTM, except the mobile view.
As cannot participate on mobile it is not so important.
fixes #46 fixes #101 fixes #102 TransactionHandler saves tx when InBlock and not when Finalized. block hash and tx hash are displayed with link to subscan and copy button to copy hash to clipboard. Remarks: