@scallop-io/sui-scallop-sdk 1.3.3-alpha.1 → 1.3.3

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.
@@ -72,7 +72,7 @@ export const getVeScas = async (
72
72
  }: {
73
73
  utils: ScallopUtils;
74
74
  },
75
- ownerAddress?: string,
75
+ ownerAddress: string,
76
76
  excludeEmpty?: boolean
77
77
  ) => {
78
78
  const keyObjectDatas = await getVescaKeys(utils, ownerAddress);
@@ -88,7 +88,7 @@ export const getVeScas = async (
88
88
 
89
89
  const result = veScas
90
90
  .filter(Boolean)
91
- .sort((a, b) => b!.currentVeScaBalance - a!.currentVeScaBalance);
91
+ .sort((a, b) => b.currentVeScaBalance - a.currentVeScaBalance);
92
92
 
93
93
  if (excludeEmpty) {
94
94
  return result.filter((v) => v.lockedScaAmount !== '0');
@@ -113,11 +113,9 @@ type SuiObjectRefType = zod.infer<typeof SuiObjectRefZod>;
113
113
  */
114
114
  export const getVeSca = async (
115
115
  utils: ScallopUtils,
116
- veScaKey?: string | SuiObjectData,
117
- ownerAddress?: string
116
+ veScaKey: string | SuiObjectData
118
117
  ) => {
119
118
  const tableId = utils.address.get(`vesca.tableId`);
120
- veScaKey = veScaKey || (await getVescaKeys(utils, ownerAddress))[0];
121
119
 
122
120
  if (!veScaKey) return undefined;
123
121
  if (typeof veScaKey === 'object') {
@@ -168,7 +166,7 @@ export const getVeSca = async (
168
166
  lockedScaCoin,
169
167
  currentVeScaBalance,
170
168
  unlockAt: BigNumber(dynamicFields.unlock_at * 1000).toNumber(),
171
- } as Vesca;
169
+ };
172
170
  }
173
171
 
174
172
  return vesca;
@@ -153,7 +153,6 @@ export type MarketCollateral = {
153
153
  coinWrappedType: CoinWrappedType;
154
154
  coinDecimal: number;
155
155
  coinPrice: number;
156
- isIsolated: boolean;
157
156
  } & Required<
158
157
  Pick<
159
158
  ParsedMarketCollateralData,
@@ -22,6 +22,7 @@ export type Lending = Required<
22
22
  | 'symbol'
23
23
  | 'coinType'
24
24
  | 'marketCoinType'
25
+ | 'sCoinType'
25
26
  | 'coinDecimal'
26
27
  | 'coinPrice'
27
28
  | 'conversionRate'
@@ -12,6 +12,7 @@ export type Spool = {
12
12
  coinType: string;
13
13
  marketCoinType: string;
14
14
  rewardCoinType: string;
15
+ sCoinType: string;
15
16
  coinDecimal: number;
16
17
  rewardCoinDecimal: number;
17
18
  coinPrice: number;
@@ -4,7 +4,7 @@ export type Vesca = {
4
4
  id: string;
5
5
  keyId: string;
6
6
  keyObject?: SuiObjectRef;
7
- object?: SuiObjectRef;
7
+ object: SuiObjectRef;
8
8
  lockedScaAmount: string;
9
9
  lockedScaCoin: number;
10
10
  currentVeScaBalance: number;