@thesingularitynetwork/darkswap-sdk 0.2.7-beta1 → 0.2.7-beta3
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.
- package/dist/darkswap-sdk.cjs.development.js +5 -5
- package/dist/darkswap-sdk.cjs.development.js.map +1 -1
- package/dist/darkswap-sdk.cjs.production.min.js +1 -1
- package/dist/darkswap-sdk.cjs.production.min.js.map +1 -1
- package/dist/darkswap-sdk.esm.js +5 -5
- package/dist/darkswap-sdk.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -13213,18 +13213,18 @@ var BridgeCreateOrderService = /*#__PURE__*/function () {
|
|
|
13213
13213
|
return _regenerator().w(function (_context0) {
|
|
13214
13214
|
while (1) switch (_context0.n) {
|
|
13215
13215
|
case 0:
|
|
13216
|
-
if (!(!context || !context.
|
|
13216
|
+
if (!(!context || !context.address || !context.signature || !context.proof || !context.sourceAsset || context.sourceAmount === undefined)) {
|
|
13217
13217
|
_context0.n = 1;
|
|
13218
13218
|
break;
|
|
13219
13219
|
}
|
|
13220
13220
|
throw new DarkSwapError('Invalid context');
|
|
13221
13221
|
case 1:
|
|
13222
13222
|
signer = this._darkSwapOfSourceChain.signer;
|
|
13223
|
-
asset = context.
|
|
13224
|
-
amount = context.
|
|
13223
|
+
asset = context.sourceAsset;
|
|
13224
|
+
amount = context.sourceAmount;
|
|
13225
13225
|
allowanceContract = new ethers.ethers.Contract(asset, ERC20Abi.abi, this._darkSwapOfSourceChain);
|
|
13226
13226
|
_context0.n = 2;
|
|
13227
|
-
return allowanceContract.allowance(signer.getAddress(), this._darkSwapOfSourceChain.contracts.
|
|
13227
|
+
return allowanceContract.allowance(signer.getAddress(), this._darkSwapOfSourceChain.contracts.synaraDarkSwapOnBridgeAssetManager);
|
|
13228
13228
|
case 2:
|
|
13229
13229
|
allowance = _context0.v;
|
|
13230
13230
|
if (!(BigInt(allowance) < amount)) {
|
|
@@ -13234,7 +13234,7 @@ var BridgeCreateOrderService = /*#__PURE__*/function () {
|
|
|
13234
13234
|
isLegacy = legacyTokenConfig.hasOwnProperty(this._darkSwapOfSourceChain.chainId) && legacyTokenConfig[this._darkSwapOfSourceChain.chainId].includes(asset.toLowerCase());
|
|
13235
13235
|
contract = new ethers.ethers.Contract(asset, isLegacy ? ERC20_USDT.abi : ERC20Abi.abi, signer);
|
|
13236
13236
|
_context0.n = 3;
|
|
13237
|
-
return contract.approve(this._darkSwapOfSourceChain.contracts.
|
|
13237
|
+
return contract.approve(this._darkSwapOfSourceChain.contracts.synaraDarkSwapOnBridgeAssetManager, hexlify32(MAX_ALLOWANCE));
|
|
13238
13238
|
case 3:
|
|
13239
13239
|
tx = _context0.v;
|
|
13240
13240
|
_context0.n = 4;
|