Skip to content

Commit

Permalink
fix: stop showing nano loading for non nano transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroferreira1 committed Apr 12, 2024
1 parent 22b23a6 commit 8bdd32b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/tx/TxData.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class TxData extends React.Component {
}
],
ncDeserializer: null,
ncLoading: true,
ncLoading: false,
};

// Array of token uid that was already found to show the symbol
Expand All @@ -91,12 +91,13 @@ class TxData extends React.Component {
}

handleNanoContractFetch = async () => {
this.setState({ ncLoading: true });
if (this.props.transaction.version !== hathorLib.constants.NANO_CONTRACTS_VERSION) {
this.setState({ ncLoading: false });
return;
}

this.setState({ ncLoading: true });

const network = hathorLib.config.getNetwork();
const ncData = this.props.transaction;
const deserializer = new hathorLib.NanoContractTransactionParser(ncData.nc_blueprint_id, ncData.nc_method, ncData.nc_pubkey, ncData.nc_args);
Expand Down

0 comments on commit 8bdd32b

Please sign in to comment.