@runesx/api-client 0.5.1 → 0.5.2
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/package.json
CHANGED
package/src/store/coinStore.mjs
CHANGED
|
@@ -17,6 +17,8 @@ const setInitialCoins = (coins) => {
|
|
|
17
17
|
projectName: coin.projectName,
|
|
18
18
|
status: coin.status,
|
|
19
19
|
runesComplianceRequirement: coin.runesComplianceRequirement || false,
|
|
20
|
+
swapMinimumInput: coin.swapMinimumInput,
|
|
21
|
+
tradeMinimumInput: coin.tradeMinimumInput,
|
|
20
22
|
updatedAt: coin.updatedAt,
|
|
21
23
|
CoinChains: coin.CoinChains || [],
|
|
22
24
|
});
|
|
@@ -54,6 +56,8 @@ const updateCoin = (coin) => {
|
|
|
54
56
|
projectName: coin.projectName,
|
|
55
57
|
status: coin.status,
|
|
56
58
|
runesComplianceRequirement: coin.runesComplianceRequirement || false,
|
|
59
|
+
swapMinimumInput: coin.swapMinimumInput !== undefined ? coin.swapMinimumInput : existingCoin.swapMinimumInput,
|
|
60
|
+
tradeMinimumInput: coin.tradeMinimumInput !== undefined ? coin.tradeMinimumInput : existingCoin.tradeMinimumInput,
|
|
57
61
|
updatedAt: coin.updatedAt,
|
|
58
62
|
CoinChains: coin.CoinChains || existingCoin.CoinChains,
|
|
59
63
|
});
|
|
@@ -65,6 +69,8 @@ const updateCoin = (coin) => {
|
|
|
65
69
|
projectName: coin.projectName,
|
|
66
70
|
status: coin.status,
|
|
67
71
|
runesComplianceRequirement: coin.runesComplianceRequirement || false,
|
|
72
|
+
swapMinimumInput: coin.swapMinimumInput,
|
|
73
|
+
tradeMinimumInput: coin.tradeMinimumInput,
|
|
68
74
|
updatedAt: coin.updatedAt,
|
|
69
75
|
CoinChains: coin.CoinChains || [],
|
|
70
76
|
});
|
|
@@ -8,11 +8,13 @@ const exchangeConfigStore = {
|
|
|
8
8
|
makerFeeRate: '0.001',
|
|
9
9
|
maxFillBatch: 50,
|
|
10
10
|
maxFillTotal: 500,
|
|
11
|
+
maxPriceDeviation: '5',
|
|
12
|
+
tickerPattern: null,
|
|
11
13
|
},
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
const setExchangeConfig = (config) => {
|
|
15
|
-
const { clobFees } = config;
|
|
17
|
+
const { clobFees, tickerPattern } = config;
|
|
16
18
|
if (clobFees) {
|
|
17
19
|
if (clobFees.takerFeeRate !== null && clobFees.takerFeeRate !== undefined) {
|
|
18
20
|
exchangeConfigStore.clobFees.takerFeeRate = clobFees.takerFeeRate;
|
|
@@ -26,6 +28,15 @@ const setExchangeConfig = (config) => {
|
|
|
26
28
|
if (clobFees.maxFillTotal !== null && clobFees.maxFillTotal !== undefined) {
|
|
27
29
|
exchangeConfigStore.clobFees.maxFillTotal = clobFees.maxFillTotal;
|
|
28
30
|
}
|
|
31
|
+
if (clobFees.maxPriceDeviation !== null && clobFees.maxPriceDeviation !== undefined) {
|
|
32
|
+
exchangeConfigStore.clobFees.maxPriceDeviation = clobFees.maxPriceDeviation;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// tickerPattern is at the top level of the config, not inside clobFees.
|
|
36
|
+
// Merge it into clobFees so swapUtils.deriveClobPairAndSide can access it
|
|
37
|
+
// via clobFees.tickerPattern — matching how runesx-app passes it.
|
|
38
|
+
if (typeof tickerPattern === 'string' && tickerPattern.length <= 100) {
|
|
39
|
+
exchangeConfigStore.clobFees.tickerPattern = tickerPattern;
|
|
29
40
|
}
|
|
30
41
|
};
|
|
31
42
|
|
|
@@ -37,6 +48,8 @@ const resetExchangeConfig = () => {
|
|
|
37
48
|
makerFeeRate: '0.001',
|
|
38
49
|
maxFillBatch: 50,
|
|
39
50
|
maxFillTotal: 500,
|
|
51
|
+
maxPriceDeviation: '5',
|
|
52
|
+
tickerPattern: null,
|
|
40
53
|
};
|
|
41
54
|
};
|
|
42
55
|
|