@shapeshiftoss/swapper 9.3.0 → 9.3.1
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.
|
@@ -3,5 +3,7 @@ export declare const MAX_ALLOWANCE = "100000000000000000000000000";
|
|
|
3
3
|
export declare const THOR_MINIMUM_PADDING = 1.2;
|
|
4
4
|
export declare const THOR_ETH_GAS_LIMIT = "100000";
|
|
5
5
|
export declare const THORCHAIN_FIXED_PRECISION = 8;
|
|
6
|
+
export declare const THORCHAIN_AFFILIATE_NAME = "ss";
|
|
7
|
+
export declare const THORCHAIN_AFFILIATE_BIPS = "0";
|
|
6
8
|
export declare const THOR_TRADE_FEE_BTC_SIZE = 1000;
|
|
7
9
|
export declare const THOR_TRADE_FEE_ETH_GAS = 120000;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.THOR_TRADE_FEE_ETH_GAS = exports.THOR_TRADE_FEE_BTC_SIZE = exports.THORCHAIN_FIXED_PRECISION = exports.THOR_ETH_GAS_LIMIT = exports.THOR_MINIMUM_PADDING = exports.MAX_ALLOWANCE = exports.MAX_THORCHAIN_TRADE = void 0;
|
|
3
|
+
exports.THOR_TRADE_FEE_ETH_GAS = exports.THOR_TRADE_FEE_BTC_SIZE = exports.THORCHAIN_AFFILIATE_BIPS = exports.THORCHAIN_AFFILIATE_NAME = exports.THORCHAIN_FIXED_PRECISION = exports.THOR_ETH_GAS_LIMIT = exports.THOR_MINIMUM_PADDING = exports.MAX_ALLOWANCE = exports.MAX_THORCHAIN_TRADE = void 0;
|
|
4
4
|
exports.MAX_THORCHAIN_TRADE = '100000000000000000000000000';
|
|
5
5
|
exports.MAX_ALLOWANCE = '100000000000000000000000000';
|
|
6
6
|
exports.THOR_MINIMUM_PADDING = 1.2;
|
|
7
7
|
exports.THOR_ETH_GAS_LIMIT = '100000'; // for sends of eth / erc20 into thorchain router
|
|
8
8
|
exports.THORCHAIN_FIXED_PRECISION = 8; // limit values are precision 8 regardless of the chain
|
|
9
|
+
exports.THORCHAIN_AFFILIATE_NAME = 'ss';
|
|
10
|
+
exports.THORCHAIN_AFFILIATE_BIPS = '0'; // affiliate fee in basis points (100 = 1%)
|
|
9
11
|
// These are different from THOR_ETH_GAS_LIMIT
|
|
10
12
|
// Used to estimate the fee thorchain will take out of the buyAsset
|
|
11
13
|
exports.THOR_TRADE_FEE_BTC_SIZE = 1000; // used for estimating thorchain side fees
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makeSwapMemo = void 0;
|
|
4
4
|
const caip_1 = require("@shapeshiftoss/caip");
|
|
5
5
|
const api_1 = require("../../../../api");
|
|
6
|
+
const constants_1 = require("../constants");
|
|
6
7
|
// BTC (and likely other utxo coins) can only support up to 80 character memos
|
|
7
8
|
const MAX_LENGTH = 80;
|
|
8
9
|
/**
|
|
@@ -16,7 +17,7 @@ const makeSwapMemo = ({ buyAssetId, destinationAddress, limit }) => {
|
|
|
16
17
|
code: api_1.SwapErrorTypes.MAKE_MEMO_FAILED,
|
|
17
18
|
details: { buyAssetId }
|
|
18
19
|
});
|
|
19
|
-
const memo = `s:${thorId}:${destinationAddress}:${limit}`;
|
|
20
|
+
const memo = `s:${thorId}:${destinationAddress}:${limit}:${constants_1.THORCHAIN_AFFILIATE_NAME}:${constants_1.THORCHAIN_AFFILIATE_BIPS}`;
|
|
20
21
|
if (memo.length <= MAX_LENGTH)
|
|
21
22
|
return memo;
|
|
22
23
|
const abbreviationAmount = memo.length - MAX_LENGTH;
|
package/package.json
CHANGED