Skip to content

Commit 2cf70b4

Browse files
committed
Ensure REX is enabled before accessing
1 parent 69c9acf commit 2cf70b4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/routes/[network]/api/network/+server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ async function getNetworkNative(network: NetworkState): Promise<NetworkDataSourc
175175
circulating,
176176
locked: lockedsupply,
177177
supply: supply.supply,
178-
staked: rex.total_lendable,
178+
staked: network.supports('rex')
179+
? rex.total_lendable
180+
: Asset.fromUnits(0, supply.supply.symbol),
179181
max: supply.max_supply
180182
}
181183
});

0 commit comments

Comments
 (0)