From 071014c87f4051cc77f4a519ed2eeb1bf5bd4e15 Mon Sep 17 00:00:00 2001 From: Collins Ikechukwu Date: Fri, 20 Dec 2024 11:48:01 +0100 Subject: [PATCH 1/2] feat(tokens): add support for sSTRK token and pools --- src/constants.ts | 23 ++++++++++++++++++++++- src/store/ekobu.store.ts | 3 +++ src/store/nostradex.store.ts | 9 ++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 5a5fe3b6..9be89a02 100755 --- a/src/constants.ts +++ b/src/constants.ts @@ -9,10 +9,18 @@ const LOGOS = { WBTC: '/zklend/icons/tokens/wbtc.svg?w=20', ETH: '/zklend/icons/tokens/eth.svg?w=20', STRK: '/zklend/icons/tokens/strk.svg?w=20', + sSTRK: '/zklend/icons/tokens/strk.svg?w=20', DAI: '/zklend/icons/tokens/dai.svg?w=20', }; -export type TokenName = 'USDT' | 'USDC' | 'ETH' | 'STRK' | 'WBTC' | 'DAI'; +export type TokenName = + | 'USDT' + | 'USDC' + | 'ETH' + | 'STRK' + | 'sSTRK' + | 'WBTC' + | 'DAI'; const CONSTANTS = { DEX_INCENTIVE_URL: @@ -77,6 +85,19 @@ const CONSTANTS = { }; export const TOKENS: TokenInfo[] = [ + { + token: standariseAddress( + '0x0260c02fd6942c788b8905d2c1b98b5a98fffd2ec0dfb013aa4b148781e269b6', + ), + name: 'sSTRK', + decimals: 18, + displayDecimals: 2, + logo: CONSTANTS.LOGOS.STRK, + minAmount: MyNumber.fromEther('10', 18), + maxAmount: MyNumber.fromEther('10000', 18), + stepAmount: MyNumber.fromEther('10', 18), + isERC4626: false, + }, { token: '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7', name: 'ETH', diff --git a/src/store/ekobu.store.ts b/src/store/ekobu.store.ts index aee40d33..b1a0047c 100755 --- a/src/store/ekobu.store.ts +++ b/src/store/ekobu.store.ts @@ -175,6 +175,9 @@ export class Ekubo extends IDapp { 'USDT', 'ETH', 'STRK', + 'sSTRK/USDC', + 'sSTRK/ETH', + 'sSTRK', ]; console.log('filter2', poolName, supportedPools.includes(poolName)); return supportedPools.includes(poolName); diff --git a/src/store/nostradex.store.ts b/src/store/nostradex.store.ts index aa17ed0b..5b3deda5 100755 --- a/src/store/nostradex.store.ts +++ b/src/store/nostradex.store.ts @@ -18,7 +18,14 @@ export class NostraDex extends Jediswap { if (!myData) return []; const pools: PoolInfo[] = []; - const supportedPools = ['ETH-USDC', 'STRK-ETH', 'STRK-USDC', 'USDC-USDT']; + const supportedPools = [ + 'ETH-USDC', + 'STRK-ETH', + 'STRK-USDC', + 'USDC-USDT', + 'sSTRK-ETH', + 'sSTRK-USDC', + ]; // Filter and map only the required pools Object.values(myData) .filter((poolData: any) => { From 03e4fcc3e14597619382e04d7f47243bcc50b8d3 Mon Sep 17 00:00:00 2001 From: Collins Ikechukwu Date: Tue, 31 Dec 2024 16:34:27 +0100 Subject: [PATCH 2/2] fix: correct token name from 'sSTRK' to 'SSTRK' throughout the codebase --- .codegpt/head | 1 + src/constants.ts | 8 ++++---- src/store/ekobu.store.ts | 6 +++--- src/store/nostradex.store.ts | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 .codegpt/head diff --git a/.codegpt/head b/.codegpt/head new file mode 100644 index 00000000..a616375b --- /dev/null +++ b/.codegpt/head @@ -0,0 +1 @@ +095b1ce0-c1b8-4464-9692-ad6ed63effed \ No newline at end of file diff --git a/src/constants.ts b/src/constants.ts index 9be89a02..0c0f8382 100755 --- a/src/constants.ts +++ b/src/constants.ts @@ -9,7 +9,7 @@ const LOGOS = { WBTC: '/zklend/icons/tokens/wbtc.svg?w=20', ETH: '/zklend/icons/tokens/eth.svg?w=20', STRK: '/zklend/icons/tokens/strk.svg?w=20', - sSTRK: '/zklend/icons/tokens/strk.svg?w=20', + SSTRK: '/zklend/icons/tokens/strk.svg?w=20', DAI: '/zklend/icons/tokens/dai.svg?w=20', }; @@ -18,7 +18,7 @@ export type TokenName = | 'USDC' | 'ETH' | 'STRK' - | 'sSTRK' + | 'SSTRK' | 'WBTC' | 'DAI'; @@ -87,9 +87,9 @@ const CONSTANTS = { export const TOKENS: TokenInfo[] = [ { token: standariseAddress( - '0x0260c02fd6942c788b8905d2c1b98b5a98fffd2ec0dfb013aa4b148781e269b6', + '0x0356f304b154d29d2a8fe22f1cb9107a9b564a733cf6b4cc47fd121ac1af90c9', ), - name: 'sSTRK', + name: 'SSTRK', decimals: 18, displayDecimals: 2, logo: CONSTANTS.LOGOS.STRK, diff --git a/src/store/ekobu.store.ts b/src/store/ekobu.store.ts index b1a0047c..3671ef43 100755 --- a/src/store/ekobu.store.ts +++ b/src/store/ekobu.store.ts @@ -175,9 +175,9 @@ export class Ekubo extends IDapp { 'USDT', 'ETH', 'STRK', - 'sSTRK/USDC', - 'sSTRK/ETH', - 'sSTRK', + 'SSTRK/USDC', + 'SSTRK/ETH', + 'SSTRK', ]; console.log('filter2', poolName, supportedPools.includes(poolName)); return supportedPools.includes(poolName); diff --git a/src/store/nostradex.store.ts b/src/store/nostradex.store.ts index 5b3deda5..96364d9e 100755 --- a/src/store/nostradex.store.ts +++ b/src/store/nostradex.store.ts @@ -23,8 +23,8 @@ export class NostraDex extends Jediswap { 'STRK-ETH', 'STRK-USDC', 'USDC-USDT', - 'sSTRK-ETH', - 'sSTRK-USDC', + 'SSTRK-ETH', + 'SSTRK-USDC', ]; // Filter and map only the required pools Object.values(myData)