소스 검색

storage-node: runtime-api signAndSend drop attempts

Mokhtar Naamani 4 년 전
부모
커밋
5a5b4fc1ee
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      storage-node/packages/runtime-api/assets.js
  2. 2 2
      storage-node/packages/runtime-api/index.js

+ 1 - 1
storage-node/packages/runtime-api/assets.js

@@ -103,7 +103,7 @@ class AssetsApi {
     const tx = this.base.api.tx.dataObjectStorageRegistry.addRelationship(storageProviderId, contentId)
 
     const subscribed = [['dataObjectStorageRegistry', 'DataObjectStorageRelationshipAdded']]
-    return this.base.signAndSend(providerAccountId, tx, 3, subscribed, callback)
+    return this.base.signAndSend(providerAccountId, tx, subscribed, callback)
   }
 
   /*

+ 2 - 2
storage-node/packages/runtime-api/index.js

@@ -129,7 +129,7 @@ class RuntimeApi {
    * If the subscribed events are given, and a callback as well, then the
    * callback is invoked with matching events.
    */
-  async signAndSend(accountId, tx, attempts, subscribed, callback) {
+  async signAndSend(accountId, tx, subscribed, callback) {
     accountId = this.identities.keyring.encodeAddress(accountId)
 
     // Key must be unlocked
@@ -237,7 +237,7 @@ class RuntimeApi {
     // eslint-disable-next-line  no-async-promise-executor
     return new Promise(async (resolve, reject) => {
       try {
-        await this.signAndSend(senderAccountId, tx, 1, subscribed, (events) => {
+        await this.signAndSend(senderAccountId, tx, subscribed, (events) => {
           events.forEach((event) => {
             // fix - we may not necessarily want the first event
             // if there are multiple events emitted,