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