Browse Source

Update storage-node-v2/src/services/runtime/hireLead.ts

Co-authored-by: Lezek123 <leszek@jsgenesis.com>
shamil-gadelshin 3 years ago
parent
commit
90e58aa4e0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      storage-node-v2/src/services/runtime/hireLead.ts

+ 2 - 2
storage-node-v2/src/services/runtime/hireLead.ts

@@ -49,9 +49,9 @@ export async function hireStorageWorkingGroupLead(api: ApiPromise): Promise<void
   )
   const newOpeningId = await sendAndFollowSudoNamedTx(api, SudoKeyPair, tx, (result) => {
     const event = getEvent(result, 'storageWorkingGroup', 'OpeningAdded')
-    const bucketId = event?.data[0]
+    const openingId = event?.data[0]
 
-    return bucketId.toNumber()
+    return openingId.toNumber()
   })
 
   if (typeof newOpeningId !== 'number') {