@sodax/sdk 1.2.4-beta → 1.2.5-beta
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/index.cjs +14 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.mjs +14 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -10443,13 +10443,12 @@ var MoneyMarketDataService = class {
|
|
|
10443
10443
|
}
|
|
10444
10444
|
/**
|
|
10445
10445
|
* Get the user reserves data
|
|
10446
|
-
* @param
|
|
10446
|
+
* @param spokeChainId - The spoke chain ID
|
|
10447
|
+
* @param userAddress - The user's wallet address on the spoke chain
|
|
10447
10448
|
* @returns {Promise<readonly [readonly UserReserveData[], number]>} - The user reserves data
|
|
10448
10449
|
*/
|
|
10449
|
-
async getUserReservesData(
|
|
10450
|
-
const
|
|
10451
|
-
const spokeChainId = spokeProvider.chainConfig.chain.id;
|
|
10452
|
-
const hubWalletAddress = await HubService.getUserHubWalletAddress(walletAddress, spokeChainId, this.hubProvider);
|
|
10450
|
+
async getUserReservesData(spokeChainId, userAddress) {
|
|
10451
|
+
const hubWalletAddress = await HubService.getUserHubWalletAddress(userAddress, spokeChainId, this.hubProvider);
|
|
10453
10452
|
return this.uiPoolDataProviderService.getUserReservesData(hubWalletAddress);
|
|
10454
10453
|
}
|
|
10455
10454
|
/**
|
|
@@ -10475,13 +10474,12 @@ var MoneyMarketDataService = class {
|
|
|
10475
10474
|
}
|
|
10476
10475
|
/**
|
|
10477
10476
|
* Get the user reserves humanized
|
|
10478
|
-
* @param
|
|
10477
|
+
* @param spokeChainId - The spoke chain ID
|
|
10478
|
+
* @param userAddress - The user's wallet address on the spoke chain
|
|
10479
10479
|
* @returns {Promise<{userReserves: UserReserveDataHumanized[], userEmodeCategoryId: number}>} - The user reserves humanized
|
|
10480
10480
|
*/
|
|
10481
|
-
async getUserReservesHumanized(
|
|
10482
|
-
const
|
|
10483
|
-
const spokeChainId = spokeProvider.chainConfig.chain.id;
|
|
10484
|
-
const hubWalletAddress = await HubService.getUserHubWalletAddress(walletAddress, spokeChainId, this.hubProvider);
|
|
10481
|
+
async getUserReservesHumanized(spokeChainId, userAddress) {
|
|
10482
|
+
const hubWalletAddress = await HubService.getUserHubWalletAddress(userAddress, spokeChainId, this.hubProvider);
|
|
10485
10483
|
return this.uiPoolDataProviderService.getUserReservesHumanized(hubWalletAddress);
|
|
10486
10484
|
}
|
|
10487
10485
|
/**
|
|
@@ -15521,6 +15519,11 @@ var PartnerFeeClaimService = class {
|
|
|
15521
15519
|
invariant6__default.default(isSonicSpokeProviderType(spokeProvider), "PartnerFeeClaimService only supports Sonic spoke provider");
|
|
15522
15520
|
invariant6__default.default(this.config.protocolIntentsContract, "protocolIntentsContract is not configured in solver config");
|
|
15523
15521
|
const walletAddress = await spokeProvider.walletProvider.getWalletAddress();
|
|
15522
|
+
const outputToken = params.dstChain !== this.hubProvider.chainConfig.chain.id ? this.hubProvider.configService.getHubAssetInfo(params.dstChain, params.outputToken)?.asset : params.outputToken;
|
|
15523
|
+
invariant6__default.default(
|
|
15524
|
+
outputToken,
|
|
15525
|
+
`hub asset not found for spoke chain token (params.outputToken): ${params.outputToken} with chain id: ${params.dstChain}`
|
|
15526
|
+
);
|
|
15524
15527
|
const rawTx = {
|
|
15525
15528
|
from: walletAddress,
|
|
15526
15529
|
to: this.config.protocolIntentsContract,
|
|
@@ -15529,7 +15532,7 @@ var PartnerFeeClaimService = class {
|
|
|
15529
15532
|
abi: ProtocolIntentsAbi,
|
|
15530
15533
|
functionName: "setAutoSwapPreferences",
|
|
15531
15534
|
args: [
|
|
15532
|
-
|
|
15535
|
+
outputToken,
|
|
15533
15536
|
BigInt(types.getIntentRelayChainId(params.dstChain)),
|
|
15534
15537
|
encodeAddress(params.dstChain, params.dstAddress)
|
|
15535
15538
|
]
|