File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -219,12 +219,18 @@ describe('GNS', () => {
219219 const tx = gns
220220 . connect ( account . signer )
221221 . publishNewVersion ( subgraphID , newSubgraph . subgraphDeploymentID , newSubgraph . versionMetadata )
222- await expect ( tx )
223- . emit ( gns , 'SubgraphUpgraded' )
224- . withArgs ( subgraphID , newVSignalEstimate , totalAdjustedUp , newSubgraph . subgraphDeploymentID )
222+ const txResult = expect ( tx )
225223 . emit ( gns , 'SubgraphVersionUpdated' )
226224 . withArgs ( subgraphID , newSubgraph . subgraphDeploymentID , newSubgraph . versionMetadata )
227225
226+ // Only emits this event if there was actual signal to upgrade
227+ if ( beforeSubgraph . nSignal . gt ( 0 ) ) {
228+ txResult
229+ . emit ( gns , 'SubgraphUpgraded' )
230+ . withArgs ( subgraphID , newVSignalEstimate , totalAdjustedUp , newSubgraph . subgraphDeploymentID )
231+ }
232+ await txResult
233+
228234 // Check curation vSignal old are set to zero
229235 const [ afterTokensOldCuration , afterVSignalOldCuration ] = await getTokensAndVSignal (
230236 beforeSubgraph . subgraphDeploymentID ,
You can’t perform that action at this time.
0 commit comments