apenft-js-tron 2.1.2-beta.3 → 2.1.2-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -277,31 +277,35 @@ var ContractSchemas = /** @class */ (function (_super) {
|
|
|
277
277
|
output: output
|
|
278
278
|
})];
|
|
279
279
|
}
|
|
280
|
-
return [
|
|
281
|
-
|
|
280
|
+
if (!navigator.userAgent.includes("TokenPocket")) return [3 /*break*/, 2];
|
|
281
|
+
if (output.receipt && output.receipt.result === 'SUCCESS') {
|
|
282
|
+
defer.eventEmitter.emit('confirmation', 0, output, signedTransaction);
|
|
283
|
+
if ('contract_address' in output) {
|
|
284
|
+
output['contract_address'] = this.web3.address.fromHex(output['contract_address']);
|
|
285
|
+
return [2 /*return*/, defer.resolve(output)];
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return [3 /*break*/, 4];
|
|
289
|
+
case 2: return [4 /*yield*/, this.web3.trx.getBlock('latest')];
|
|
290
|
+
case 3:
|
|
282
291
|
latestBlock = _a.sent();
|
|
283
292
|
latestBlockNumber = latestBlock.block_header.raw_data.number;
|
|
284
293
|
txBlockNumber = output.blockNumber;
|
|
285
294
|
confirmationNumber = latestBlockNumber - txBlockNumber;
|
|
286
|
-
//
|
|
287
|
-
|
|
288
|
-
// defer.eventEmitter.emit('confirmation', confirmationNumber, output, signedTransaction)
|
|
289
|
-
// if ('contract_address' in output) {
|
|
290
|
-
// output['contract_address'] = this.web3.address.fromHex(output['contract_address'])
|
|
291
|
-
// return defer.resolve(output)
|
|
292
|
-
// }
|
|
293
|
-
// }
|
|
294
|
-
// defer.eventEmitter.emit('confirming', confirmationNumber, output, signedTransaction)
|
|
295
|
-
// setTimeout(() => {
|
|
296
|
-
// checkResult(index + 1)
|
|
297
|
-
// }, 2000)
|
|
298
|
-
// // }
|
|
299
|
-
if (output.receipt && output.receipt.result === 'SUCCESS') {
|
|
300
|
-
console.log("defer.resolve");
|
|
295
|
+
// if(output.receipt && output.receipt.result === 'SUCCESS'){
|
|
296
|
+
if (confirmationNumber > 4) {
|
|
301
297
|
defer.eventEmitter.emit('confirmation', confirmationNumber, output, signedTransaction);
|
|
302
|
-
|
|
298
|
+
if ('contract_address' in output) {
|
|
299
|
+
output['contract_address'] = this.web3.address.fromHex(output['contract_address']);
|
|
300
|
+
return [2 /*return*/, defer.resolve(output)];
|
|
301
|
+
}
|
|
303
302
|
}
|
|
304
|
-
|
|
303
|
+
defer.eventEmitter.emit('confirming', confirmationNumber, output, signedTransaction);
|
|
304
|
+
setTimeout(function () {
|
|
305
|
+
checkResult(index + 1);
|
|
306
|
+
}, 2000);
|
|
307
|
+
_a.label = 4;
|
|
308
|
+
case 4: return [2 /*return*/];
|
|
305
309
|
}
|
|
306
310
|
});
|
|
307
311
|
});
|