DigixGlobal / governance-ui-components

Governance UI reusable components library
Other
3 stars 2 forks source link

[WIP] Add support for dropped transactions #419

Closed FrancisMurilloDigix closed 4 years ago

FrancisMurilloDigix commented 4 years ago

Description

A sample snippet for working with dropped transactions.

Test Plan

Right before making any blockchain transaction or the unlockDGD, do the following:

  1. Stop the blockchain miner via curl

    curl -i -H Content-Type\:\ application/json -XPOST http\://localhost\:8545 -d \{\"jsonrpc\"\:\"2.0\"\,\"method\"\:\"miner_stop\"\,\"params\"\:\[\]\,\"id\"\:100\}'
  2. Trigger the blockchain call Transaction should hang indefinitely. You can also check the network inspector of the browser to see that its checking for the transaction status.

  3. Restart the blockchain to drop the pending transaction With the dissolution-subgraph, just run docker-compose restart ganache. While ganache is restarting, the UI should have a notification ofTransaction Dropped .

  4. Trigger the blockchain call again The transaction can and should be triggered again but should pass since the miner is restarted.

mandres-digix commented 4 years ago

Implemented in commit 984d1a4ca0acd27a9437f66f40bcf93475377b7b.