File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed
Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @mento-protocol/mento-sdk" ,
33 "description" : " Official SDK for interacting with the Mento Protocol" ,
4- "version" : " 1.12 .0" ,
4+ "version" : " 1.14 .0" ,
55 "license" : " MIT" ,
66 "author" : " Mento Labs" ,
77 "keywords" : [
Original file line number Diff line number Diff line change @@ -149,26 +149,26 @@ ${tokenAddressesMapping}
149149
150150/**
151151 * Helper function to get token address by symbol for a specific chain
152- * @param chainId - The chain ID
153152 * @param symbol - The token symbol
153+ * @param chainId - The chain ID
154154 * @returns The token address or undefined if not found
155155 */
156156export function getTokenAddress(
157- chainId: number ,
158- symbol: TokenSymbol
157+ symbol: TokenSymbol ,
158+ chainId: number
159159): string | undefined {
160160 return TOKEN_ADDRESSES_BY_CHAIN[chainId]?.[symbol]
161161}
162162
163163/**
164164 * Helper function to find a token by symbol in the cached tokens
165- * @param chainId - The chain ID
166165 * @param symbol - The token symbol to search for
166+ * @param chainId - The chain ID
167167 * @returns The token object or undefined if not found
168168 */
169169export function findTokenBySymbol(
170- chainId: number ,
171- symbol: string
170+ symbol: string ,
171+ chainId: number
172172): Token | undefined {
173173 const tokens = getCachedTokensSync(chainId)
174174 return tokens.find((token) => token.symbol === symbol)
Original file line number Diff line number Diff line change @@ -164,26 +164,26 @@ export const TOKEN_ADDRESSES_BY_CHAIN: {
164164
165165/**
166166 * Helper function to get token address by symbol for a specific chain
167- * @param chainId - The chain ID
168167 * @param symbol - The token symbol
168+ * @param chainId - The chain ID
169169 * @returns The token address or undefined if not found
170170 */
171171export function getTokenAddress (
172- chainId : number ,
173- symbol : TokenSymbol
172+ symbol : TokenSymbol ,
173+ chainId : number
174174) : string | undefined {
175175 return TOKEN_ADDRESSES_BY_CHAIN [ chainId ] ?. [ symbol ]
176176}
177177
178178/**
179179 * Helper function to find a token by symbol in the cached tokens
180- * @param chainId - The chain ID
181180 * @param symbol - The token symbol to search for
181+ * @param chainId - The chain ID
182182 * @returns The token object or undefined if not found
183183 */
184184export function findTokenBySymbol (
185- chainId : number ,
186- symbol : string
185+ symbol : string ,
186+ chainId : number
187187) : Token | undefined {
188188 const tokens = getCachedTokensSync ( chainId )
189189 return tokens . find ( ( token ) => token . symbol === symbol )
You can’t perform that action at this time.
0 commit comments