@pioneer-platform/uniswap-client 0.0.27 → 0.0.29
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.
|
@@ -88,20 +88,35 @@ function getQuote(_a, router, routerConfig) {
|
|
|
88
88
|
return __generator(this, function (_b) {
|
|
89
89
|
switch (_b.label) {
|
|
90
90
|
case 0:
|
|
91
|
+
console.log("Checkpoint: getQuote");
|
|
91
92
|
tokenInIsNative = Object.values(types_1.SwapRouterNativeAssets).includes(tokenIn.address);
|
|
92
93
|
tokenOutIsNative = Object.values(types_1.SwapRouterNativeAssets).includes(tokenOut.address);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
console.log("Checkpoint: getQuote2");
|
|
95
|
+
if (tokenInIsNative) {
|
|
96
|
+
console.log("Checkpoint: tokenInIsNative");
|
|
97
|
+
currencyIn = (0, tokens_1.nativeOnChain)(tokenIn.chainId); // Use the native token for the chain if tokenIn is native
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
console.log("Checkpoint: !tokenInIsNative tokenIn: ", tokenIn);
|
|
101
|
+
currencyIn = new sdk_core_1.Token(tokenIn.chainId, tokenIn.address, tokenIn.decimals, tokenIn.symbol); // Otherwise, create a new token
|
|
102
|
+
}
|
|
103
|
+
if (tokenOutIsNative) {
|
|
104
|
+
console.log("Checkpoint: tokenOutIsNative");
|
|
105
|
+
currencyOut = (0, tokens_1.nativeOnChain)(tokenOut.chainId); // Use the native token for the chain if tokenOut is native
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
console.log("Checkpoint: !tokenOutIsNative");
|
|
109
|
+
currencyOut = new sdk_core_1.Token(tokenOut.chainId, tokenOut.address, tokenOut.decimals, tokenOut.symbol); // Otherwise, create a new token
|
|
110
|
+
}
|
|
99
111
|
baseCurrency = tradeType === sdk_core_1.TradeType.EXACT_INPUT ? currencyIn : currencyOut;
|
|
100
112
|
quoteCurrency = tradeType === sdk_core_1.TradeType.EXACT_INPUT ? currencyOut : currencyIn;
|
|
113
|
+
console.log("baseCurrency", baseCurrency);
|
|
114
|
+
console.log("quoteCurrency", quoteCurrency);
|
|
101
115
|
amount = sdk_core_1.CurrencyAmount.fromRawAmount(baseCurrency, jsbi_1.default.BigInt(amountRaw));
|
|
102
116
|
return [4 /*yield*/, router.route(amount, quoteCurrency, tradeType, /*swapConfig=*/ undefined, routerConfig)];
|
|
103
117
|
case 1:
|
|
104
118
|
swapRoute = _b.sent();
|
|
119
|
+
console.log("swapRoute", swapRoute);
|
|
105
120
|
if (!swapRoute) {
|
|
106
121
|
return [2 /*return*/, { state: types_1.QuoteState.NOT_FOUND }];
|
|
107
122
|
}
|
|
@@ -4,5 +4,5 @@ import { SupportedInterfaceChain } from '../constants/chains';
|
|
|
4
4
|
export default class ConfiguredJsonRpcProvider extends StaticJsonRpcProvider {
|
|
5
5
|
constructor(url: string | undefined, networkish: Networkish & {
|
|
6
6
|
chainId: SupportedInterfaceChain;
|
|
7
|
-
}, pollingInterval?:
|
|
7
|
+
}, pollingInterval?: number);
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pioneer-platform/uniswap-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@keepkey/keepkey-sdk": "^0.2.57",
|
|
8
8
|
"@pioneer-platform/loggerdog": "^8.3.1",
|
|
9
|
-
"@pioneer-platform/maya-network": "^8.3.
|
|
10
|
-
"@pioneer-platform/pioneer-caip": "^9.2.
|
|
11
|
-
"@pioneer-platform/pioneer-coins": "^9.2.
|
|
9
|
+
"@pioneer-platform/maya-network": "^8.3.9",
|
|
10
|
+
"@pioneer-platform/pioneer-caip": "^9.2.34",
|
|
11
|
+
"@pioneer-platform/pioneer-coins": "^9.2.24",
|
|
12
12
|
"@pioneer-platform/pioneer-discovery": "^0.0.7",
|
|
13
13
|
"@types/ms": "^0.7.34",
|
|
14
14
|
"@types/ms.macro": "^2.0.2",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"ts-jest": "^29.0.5",
|
|
50
50
|
"typescript": "^5.0.2"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "e4a7114f00103ee48533c369dba4a02021ddcbe4"
|
|
53
53
|
}
|