Skip to content

Commit 21b720a

Browse files
committed
chore: finalizing latest changes
Signed-off-by: Kaan Caglan <[email protected]>
1 parent f16d671 commit 21b720a

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

app2/src/lib/transfer/shared/data/transfer-data.svelte.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
EU_SOLVER_ON_UNION_METADATA,
2020
SUI_ADDR,
2121
SUI_NATIVE_COIN,
22+
SUI_NATIVE_COIN_WITHOUT_0x,
2223
SUI_U_COIN,
2324
SUI_SOLVER_ON_COSMOS_METADATA,
2425
SUI_SOLVER_ON_SUI_METADATA,
@@ -165,7 +166,7 @@ export class TransferData {
165166
),
166167
Match.when(
167168
[toHex(SUI_ADDR.address), "sui", Str.startsWith("sui.")],
168-
() => SUI_NATIVE_COIN
169+
() => SUI_NATIVE_COIN_WITHOUT_0x
169170
),
170171
Match.when(
171172
[U_ERC20.address.toLowerCase(), "evm", Match.any],

ts-sdk-sui/src/Sui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ export const getCoinsWithBalance = (coinType: string, min: bigint) =>
387387
let total = 0n
388388

389389
while (true) {
390-
const page = await client.getCoins({ owner: resolvedOwner, coinType: coinType })
390+
const page = await client.getCoins({ owner: resolvedOwner, coinType: coinType, cursor, limit: 50 })
391391
for (const c of page.data) {
392392
acc.push({ coinObjectId: c.coinObjectId, balance: c.balance })
393393
total += BigInt(c.balance)

ts-sdk/src/Constants.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,22 @@ export const U_SUI = Token.SuiCoin.make({
244244
address: "c0d9421ae241dc48a720102016190a4b7bf3e14b5995dbe6e83d11fb966e5a99::u::U",
245245
})
246246

247+
/**
248+
* @category constants
249+
* @since 2.0.0
250+
*/
251+
export const SUI_NATIVE_COIN_WITHOUT_0x = Token.SuiCoin.make({
252+
address: "0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
253+
})
254+
255+
/**
256+
* @category constants
257+
* @since 2.0.0
258+
*/
259+
export const SUI_NATIVE_COIN = Token.SuiCoin.make({
260+
address: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
261+
})
262+
247263
/**
248264
* @category constants
249265
* @since 2.0.0
@@ -261,13 +277,7 @@ export const EU_LST = Ucs05.CosmosDisplay.make({
261277
export const SUI_ADDR = Ucs05.CosmosDisplay.make({
262278
address: "union1fufatgkyd23qmqlzt4avwj36kfhvjuur20pqjf8xewnx2mnhsses6dspmf",
263279
})
264-
/**
265-
* @category constants
266-
* @since 2.0.0
267-
*/
268-
export const SUI_NATIVE_COIN = Token.SuiCoin.make({
269-
address: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
270-
})
280+
271281

272282
/**
273283
* @category constants

0 commit comments

Comments
 (0)