@thesingularitynetwork/darkswap-sdk 0.1.25 → 0.1.26

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.
@@ -8832,7 +8832,7 @@ var ProSwapService = /*#__PURE__*/function (_BaseContractService) {
8832
8832
  }();
8833
8833
  _proto.execute = /*#__PURE__*/function () {
8834
8834
  var _execute = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(context) {
8835
- var contract, tx;
8835
+ var contract, swapArgs, estimatedGas, tx;
8836
8836
  return _regenerator().w(function (_context4) {
8837
8837
  while (1) switch (_context4.n) {
8838
8838
  case 0:
@@ -8846,13 +8846,20 @@ var ProSwapService = /*#__PURE__*/function (_BaseContractService) {
8846
8846
  throw new DarkSwapError('Invalid context');
8847
8847
  case 2:
8848
8848
  contract = new ethers.ethers.Contract(this._darkSwap.contracts.darkSwapAssetManager, DarkSwapAssetManagerAbi.abi, this._darkSwap.signer);
8849
+ swapArgs = [context.merkleRoot, context.proof.aliceOutNullifier, hexlify32(context.orderNote.feeRatio), hexlify32(context.swapInNote.note), context.proof.aliceInNoteFooter, hexlify32(context.changeNote.note), context.proof.aliceChangeNoteFooter, context.proof.bobOutNullifier, hexlify32(context.bobSwapMessage.orderNote.feeRatio), hexlify32(context.bobSwapMessage.inNote.note), context.proof.bobInNoteFooter];
8849
8850
  _context4.n = 3;
8850
- return contract.proSwap([context.merkleRoot, context.proof.aliceOutNullifier, hexlify32(context.orderNote.feeRatio), hexlify32(context.swapInNote.note), context.proof.aliceInNoteFooter, hexlify32(context.changeNote.note), context.proof.aliceChangeNoteFooter, context.proof.bobOutNullifier, hexlify32(context.bobSwapMessage.orderNote.feeRatio), hexlify32(context.bobSwapMessage.inNote.note), context.proof.bobInNoteFooter], context.proof.proof);
8851
+ return contract.proSwap.estimateGas(swapArgs, context.proof.proof);
8851
8852
  case 3:
8852
- tx = _context4.v;
8853
+ estimatedGas = _context4.v;
8853
8854
  _context4.n = 4;
8854
- return tx.wait();
8855
+ return contract.proSwap(swapArgs, context.proof.proof, {
8856
+ gasLimit: estimatedGas
8857
+ });
8855
8858
  case 4:
8859
+ tx = _context4.v;
8860
+ _context4.n = 5;
8861
+ return tx.wait();
8862
+ case 5:
8856
8863
  return _context4.a(2, tx.hash);
8857
8864
  }
8858
8865
  }, _callee4, this);