One of the Tron2STEEM transaction shows unconfirmed incorrectly

in #crypto2 days ago

@ady-was-here (possibly) sent a swap - but the record shows "Awaiting Confirmation" for a few hours.

7ae2b62a5602834364fd40edf4b7109.png

This is the result from the trongrid API:

BlockNumber 68463950, {"id":"57304383724b0787186d47b441e17261296d8128c39fdd08e8476bbca104deb4","fee":1282000,"blockNumber":68463950,"blockTimeStamp":1736042958000,"contractResult":[""],"receipt":{"net_fee":282000}} Transaction ID: 57304383724b0787186d47b441e17261296d8128c39fdd08e8476bbca104deb4

const isSuccess = (transactionInfo.receipt && transactionInfo.receipt.result === 'SUCCESS') || ((transactionInfo.blockNumber !== undefined) && (transactionInfo.receipt.net_usage > 0);

The boolean is evaluated to false because it has a net_fee instead of net_usage. Thus, changing to the following which triggered the swap.

const isSuccess = (transactionInfo.receipt && transactionInfo.receipt.result === 'SUCCESS') || ((transactionInfo.blockNumber !== undefined) && (transactionInfo.receipt.net_usage > 0 || (transactionInfo.receipt.net_fee > 0)));

Steem to the Moon🚀!