diff --git a/apps/dashboard/src/routes/(search-pages)/resource/[resource]/+layout.svelte b/apps/dashboard/src/routes/(search-pages)/resource/[resource]/+layout.svelte
index 7298b28b1..fbf216e75 100644
--- a/apps/dashboard/src/routes/(search-pages)/resource/[resource]/+layout.svelte
+++ b/apps/dashboard/src/routes/(search-pages)/resource/[resource]/+layout.svelte
@@ -27,6 +27,10 @@
{
id: 'configuration',
label: 'Configuration'
+ },
+ {
+ id: 'holders',
+ label: 'Top Holders'
}
]
]}
diff --git a/apps/dashboard/src/routes/(search-pages)/resource/[resource]/+layout.ts b/apps/dashboard/src/routes/(search-pages)/resource/[resource]/+layout.ts
index 8256c103c..a83b1bddb 100644
--- a/apps/dashboard/src/routes/(search-pages)/resource/[resource]/+layout.ts
+++ b/apps/dashboard/src/routes/(search-pages)/resource/[resource]/+layout.ts
@@ -6,7 +6,7 @@ import {
} from '../../utils'
import { isNFTAddress } from '@utils'
import { redirect } from '@sveltejs/kit'
-import { callApi } from '@api/_deprecated/gateway'
+import { callApi } from '@api/gateway'
import { andThen, pipe } from 'ramda'
import { handleGatewayResult } from '../../../../utils'
import { getStringMetadata } from '@api/utils/metadata'
@@ -55,7 +55,13 @@ export const load: LayoutLoad = async ({ params }) => {
? getRedeemableTokens(transformedResource)
: Promise.resolve(undefined)
+ const holders = pipe(
+ () => callApi('getResourceHolders', params.resource),
+ handleGatewayResult()
+ )()
+
return {
+ holders,
address: params.resource,
resource: transformedResource,
promises: {
diff --git a/apps/dashboard/src/routes/(search-pages)/resource/[resource]/holders/+page.svelte b/apps/dashboard/src/routes/(search-pages)/resource/[resource]/holders/+page.svelte
new file mode 100644
index 000000000..a663df216
--- /dev/null
+++ b/apps/dashboard/src/routes/(search-pages)/resource/[resource]/holders/+page.svelte
@@ -0,0 +1,88 @@
+
+
+
+ {#await data.holders}
+
+ {:then _}
+ {#each holders as holder}
+
+
+
+
+
+
+ {holder.type === 'FungibleResource'
+ ? formatTokenValue(holder.amount).displayValue
+ : holder.non_fungible_ids_count}
+
+
+ {/each}
+
+
{
+ loadMore()
+ }}
+ />
+ {/await}
+
+
+
diff --git a/package-lock.json b/package-lock.json
index 85fb52a4d..ea66c9837 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,37 +24,6 @@
"turbo": "^1.10.15"
}
},
- "../babylon-gateway/sdk/typescript": {
- "name": "@radixdlt/babylon-gateway-api-sdk",
- "version": "1.1.3",
- "extraneous": true,
- "license": "Apache-2.0",
- "devDependencies": {
- "@babel/preset-env": "^7.19.0",
- "@babel/preset-typescript": "^7.18.6",
- "@hirez_io/observer-spy": "^2.2.0",
- "@types/jest": "^29.0.2",
- "@typescript-eslint/eslint-plugin": "^5.37.0",
- "@typescript-eslint/parser": "^5.37.0",
- "babel-preset-vite": "^1.0.4",
- "buffer": "^6.0.3",
- "eslint": "^8.23.1",
- "eslint-config-alloy": "^4.6.2",
- "eslint-plugin-unused-imports": "^2.0.0",
- "husky": "^8.0.1",
- "jest": "^29.0.3",
- "jest-environment-jsdom": "^29.0.3",
- "prettier": "^2.7.1",
- "ts-jest": "^29.0.1",
- "ts-node": "^10.9.1",
- "typescript": "^4.8.3",
- "vite": "^3.1.0",
- "vite-tsconfig-paths": "^3.5.0"
- }
- },
- "../babylon-gateway/sdk/typescript/dist": {
- "extraneous": true
- },
"apps/console": {
"version": "0.0.1",
"license": "Apache-2.0",
@@ -8928,9 +8897,9 @@
"integrity": "sha512-BORxmE7j7jn+glNErr/d6n/focPGxYwie0a7G/0OUjjjUE/IlRjgnS5u2vh8mW3Sln7BiCg+UvXGoM1pV7fIsg=="
},
"node_modules/@radixdlt/babylon-gateway-api-sdk": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/@radixdlt/babylon-gateway-api-sdk/-/babylon-gateway-api-sdk-1.7.2.tgz",
- "integrity": "sha512-zYLlF5XObt66w7Fs9Fz4n/QB1rEFej0kj2cy4Lr2Wyx/MuJCJTjsmpwuFuKTnjad++zQtDzfTWPrtU/MbTPPQA=="
+ "version": "1.7.3",
+ "resolved": "https://registry.npmjs.org/@radixdlt/babylon-gateway-api-sdk/-/babylon-gateway-api-sdk-1.7.3.tgz",
+ "integrity": "sha512-wmdWX0AWCRSfKf6C3euiksJx9fpiGDN/8Hvmnw7PrHAY82k+CLaewWOL9P8pVD/s0mVXmReuOk9s3wJ5i+Nrxw=="
},
"node_modules/@radixdlt/dapps-dropdown": {
"version": "1.0.2",
@@ -32266,7 +32235,7 @@
"dependencies": {
"@floating-ui/dom": "^1.5.3",
"@radixdlt/babylon-core-api-sdk": "^1.2.3",
- "@radixdlt/babylon-gateway-api-sdk": "^1.7.2",
+ "@radixdlt/babylon-gateway-api-sdk": "^1.7.3",
"@radixdlt/radix-dapp-toolkit": "^2.1.1",
"@radixdlt/radix-engine-toolkit": "^1.0.5",
"@radixdlt/rola": "^2.0.0",
diff --git a/packages/common/package.json b/packages/common/package.json
index dca2bf19c..099539746 100644
--- a/packages/common/package.json
+++ b/packages/common/package.json
@@ -5,8 +5,8 @@
"scripts": {},
"dependencies": {
"@floating-ui/dom": "^1.5.3",
- "@radixdlt/babylon-gateway-api-sdk": "^1.7.2",
"@radixdlt/babylon-core-api-sdk": "^1.2.3",
+ "@radixdlt/babylon-gateway-api-sdk": "^1.7.3",
"@radixdlt/radix-dapp-toolkit": "^2.1.1",
"@radixdlt/radix-engine-toolkit": "^1.0.5",
"@radixdlt/rola": "^2.0.0",
diff --git a/packages/ui/src/api/gateway.ts b/packages/ui/src/api/gateway.ts
index 390803608..4bfd8e90c 100644
--- a/packages/ui/src/api/gateway.ts
+++ b/packages/ui/src/api/gateway.ts
@@ -50,7 +50,8 @@ export const api = {
...extractMethods(gatewayApi.stream),
...extractMethods(gatewayApi.status),
...extractMethods(gatewayApi.transaction),
- ...extractMethods(gatewayApi.statistics)
+ ...extractMethods(gatewayApi.statistics),
+ ...extractMethods(gatewayApi.extensions)
}
export const callApiWithCache = (