Skip to content

Commit 1e0d956

Browse files
authored
Fix/sorting (#855)
* fix sorting * testnet release 2.14.24 * fix sifchain block explorer url
1 parent 374b0cd commit 1e0d956

File tree

8 files changed

+18
-15
lines changed

8 files changed

+18
-15
lines changed

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "app",
3-
"version": "2.14.23",
3+
"version": "2.14.24",
44
"private": true,
55
"scripts": {
66
"bump": "bump patch --tag --commit 'testnet release '",

app/src/views/PoolPage/PoolItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,9 @@ export default defineComponent({
401401
"flex items-center justify-end font-mono",
402402
]}
403403
>
404-
{isNil(this.$props.poolStat?.poolApr)
404+
{isNil(this.$props.poolStat?.rewardApr)
405405
? "..."
406-
: `${(Number(this.$props.poolStat?.poolApr) ?? 0).toFixed(2)}%`}
406+
: `${(Number(this.$props.poolStat?.rewardApr) ?? 0).toFixed(2)}%`}
407407
</div>
408408
<div
409409
class={[

app/src/views/PoolPage/PoolPage.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default defineComponent({
2929
name: "PoolsPage",
3030
data() {
3131
return {
32-
sortBy: "rowanApr" as PoolPageColumnId,
32+
sortBy: "pairedApr" as PoolPageColumnId,
3333
sortReverse: false,
3434
searchQuery: "",
3535
showSmallPools: true,
@@ -119,14 +119,20 @@ export default defineComponent({
119119
const bAsset = b.pool.externalAmount?.asset.displaySymbol;
120120
return aAsset.localeCompare(bAsset);
121121
}
122-
case "rewardApr":
122+
case "rowanApr":
123123
return (
124124
Number(b.poolStat?.rewardApr) - Number(a.poolStat?.rewardApr)
125125
);
126+
case "pairedApr":
127+
return (
128+
Number(b.poolStat?.pairedApr) - Number(a.poolStat?.pairedApr)
129+
);
126130
case "poolTvl":
127131
return Number(b.poolStat?.poolTVL) - Number(a.poolStat?.poolTVL);
128132
default:
129-
return Number(b.poolStat?.poolApr) - Number(a.poolStat?.poolApr);
133+
return (
134+
Number(b.poolStat?.rewardApr) - Number(a.poolStat?.rewardApr)
135+
);
130136
}
131137
})
132138
// Then sort by balance

app/src/views/PoolPage/usePoolPageData.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export type PoolPageColumnId =
3232
| "pairedApr"
3333
// | "marginapy"
3434
| "gainLoss"
35-
| "rewardApr"
3635
| "poolTvl"
3736
| "userShare"
3837
| "userValue";

app/src/views/StatsPage/StatsPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default defineComponent({
1717
props: {},
1818
setup() {
1919
const { res, statsRef, state } = useStatsPageData({
20-
sortBy: "rewardApr",
20+
sortBy: "pairedApr",
2121
sortDirection: "desc",
2222
} as StatsPageState);
2323

@@ -183,7 +183,7 @@ export default defineComponent({
183183
class="h-[12px] w-[12px] transition-all"
184184
style={{
185185
transform:
186-
state.sortDirection === "asc"
186+
state.sortDirection === "desc"
187187
? "rotate(0deg)"
188188
: "rotate(180deg)",
189189
}}
@@ -270,7 +270,7 @@ export default defineComponent({
270270
${prettyNumber(item.volume)}
271271
</td>
272272
<td class="text-mono text-right align-middle">
273-
{item.poolApr}%
273+
{item.rewardApr}%
274274
</td>
275275
<td class="text-mono text-right align-middle">
276276
{item.pairedApr}%

app/src/views/StatsPage/useStatsPageData.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export type StatsPageState = {
1212
| "tvl"
1313
| "volume"
1414
| "arbitrage"
15-
| "poolApr"
1615
| "rowanApr"
1716
| "pairedApr"
1817
| "marginApr";
@@ -44,9 +43,8 @@ export function useStatsPageData(initialState: StatsPageState) {
4443
tvl: pool.poolTVL,
4544
volume: pool.volume ?? 0,
4645
arbitrage: pool.arb == null ? null : pool.arb ?? 0,
47-
poolApr: Number(pool.poolApr).toFixed(2),
4846
pairedApr: Number(pool.pairedApr).toFixed(1),
49-
rewardApr: pool.rewardApr,
47+
rewardApr: Number(pool.rewardApr).toFixed(2),
5048
marginApr: pool.margin_apr,
5149
};
5250

core/src/clients/chains/SifchainChain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BaseChain } from "./_BaseChain";
55

66
export class SifchainChain extends BaseChain implements Chain {
77
getBlockExplorerUrlForTxHash(hash: string) {
8-
return urlJoin(this.chainConfig.blockExplorerUrl, "txs", hash);
8+
return urlJoin(this.chainConfig.blockExplorerUrl, "tx", hash);
99
}
1010
getBlockExplorerUrlForAddress(hash: string) {
1111
return urlJoin(this.chainConfig.blockExplorerUrl, "account", hash);

core/src/config/chains/sifchain/sifchain-mainnet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const SIFCHAIN_MAINNET: IBCChainConfig = {
44
network: Network.SIFCHAIN,
55
chainType: "ibc",
66
displayName: "Sifchain",
7-
blockExplorerUrl: "https://www.mintscan.io/sifchain",
7+
blockExplorerUrl: "https://ping.pub/sifchain",
88
nativeAssetSymbol: "rowan",
99
chainId: "sifchain-1",
1010
rpcUrl: "https://proxies.sifchain.finance/api/sifchain-1/rpc",

0 commit comments

Comments
 (0)