@shapeshiftoss/swapper 17.4.3 → 17.5.0

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/api.d.ts CHANGED
@@ -44,6 +44,12 @@ declare type ChainSpecificQuoteFeeData<T extends ChainId> = ChainSpecific<T, {
44
44
  approvalFeeCryptoBaseUnit?: string;
45
45
  totalFee?: string;
46
46
  };
47
+ [KnownChainIds.BnbSmartChainMainnet]: {
48
+ estimatedGas?: string;
49
+ gasPriceCryptoBaseUnit?: string;
50
+ approvalFeeCryptoBaseUnit?: string;
51
+ totalFee?: string;
52
+ };
47
53
  [KnownChainIds.BitcoinMainnet]: {
48
54
  byteCount: string;
49
55
  satsPerByte: string;
@@ -35,7 +35,7 @@ declare type GrantAllowanceArgs<T extends EvmChainId> = {
35
35
  };
36
36
  export declare const getERC20Allowance: ({ erc20AllowanceAbi, web3, sellAssetErc20Address, ownerAddress, spenderAddress, }: GetERC20AllowanceArgs) => Promise<any>;
37
37
  export declare const isApprovalRequired: ({ adapter, receiveAddress, allowanceContract, sellAsset, sellAmountExcludeFeeCryptoBaseUnit, web3, erc20AllowanceAbi, }: IsApprovalRequiredArgs) => Promise<boolean>;
38
- export declare const grantAllowance: <T extends import("@shapeshiftoss/types").KnownChainIds.EthereumMainnet | import("@shapeshiftoss/types").KnownChainIds.AvalancheMainnet | import("@shapeshiftoss/types").KnownChainIds.OptimismMainnet>({ quote, wallet, adapter, erc20Abi, web3, }: GrantAllowanceArgs<T>) => Promise<string>;
38
+ export declare const grantAllowance: <T extends import("@shapeshiftoss/types").KnownChainIds.EthereumMainnet | import("@shapeshiftoss/types").KnownChainIds.AvalancheMainnet | import("@shapeshiftoss/types").KnownChainIds.OptimismMainnet | import("@shapeshiftoss/types").KnownChainIds.BnbSmartChainMainnet>({ quote, wallet, adapter, erc20Abi, web3, }: GrantAllowanceArgs<T>) => Promise<string>;
39
39
  /**
40
40
  * This function keeps 17 significant digits, so even if we try to trade 1 Billion of an
41
41
  * ETH or ERC20, we still keep 7 decimal places.
@@ -63,7 +63,7 @@ const grantAllowance = async ({ quote, wallet, adapter, erc20Abi, web3, }) => {
63
63
  accountNumber,
64
64
  value: '0',
65
65
  chainSpecific: {
66
- erc20ContractAddress: sellAssetErc20Address,
66
+ tokenContractAddress: sellAssetErc20Address,
67
67
  gasPrice: (0, web3_utils_1.numberToHex)(((_b = (_a = quote.feeData) === null || _a === void 0 ? void 0 : _a.chainSpecific) === null || _b === void 0 ? void 0 : _b.gasPriceCryptoBaseUnit) || 0),
68
68
  gasLimit: (0, web3_utils_1.numberToHex)(((_d = (_c = quote.feeData) === null || _c === void 0 ? void 0 : _c.chainSpecific) === null || _d === void 0 ? void 0 : _d.estimatedGas) || 0),
69
69
  },
@@ -18,7 +18,7 @@ export declare const setupBuildTrade: () => {
18
18
  accountNumber: number;
19
19
  receiveAccountNumber?: number | undefined;
20
20
  } & {
21
- chainId: KnownChainIds.EthereumMainnet | KnownChainIds.AvalancheMainnet | KnownChainIds.OptimismMainnet;
21
+ chainId: KnownChainIds.EthereumMainnet | KnownChainIds.AvalancheMainnet | KnownChainIds.OptimismMainnet | KnownChainIds.BnbSmartChainMainnet;
22
22
  } & {
23
23
  slippage?: string | undefined;
24
24
  wallet: HDWallet;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/swapper",
3
- "version": "17.4.3",
3
+ "version": "17.5.0",
4
4
  "description": "An interface and implementations to trade coins via various protocols",
5
5
  "repository": "https://github.com/shapeshift/lib",
6
6
  "license": "MIT",