Skip to content

Commit 6897871

Browse files
committed
default sort desc for tokens (#8405)
<!-- start pr-codex --> ## PR-Codex overview This PR introduces a new sorting option for retrieving tokens, allowing results to be ordered in descending order based on their balance. ### Detailed summary - Added a new property `sort_order` with the value `"desc"` to the object passed to `getV1Tokens`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Token balances are now displayed in consistent descending order. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent eca4ce2 commit 6897871

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/thirdweb/src/insight/get-tokens.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export async function getOwnedTokens(args: {
5959
owner_address: [ownerAddress],
6060
token_address: tokenAddresses ? tokenAddresses : undefined,
6161
sort_by: "balance",
62+
sort_order: "desc",
6263
};
6364

6465
const result = await getV1Tokens({

0 commit comments

Comments
 (0)