From 5fc8771812af303b8a4f7e3caff06692e38111fe Mon Sep 17 00:00:00 2001 From: "ilya.razievskij" Date: Thu, 12 Mar 2026 17:05:53 +0200 Subject: [PATCH 1/4] chore: parsing update for tezlink --- src/util/src/Comptroller.ts | 132 +++++++--- src/util/src/FToken.ts | 253 ++++++++++++++++++-- src/util/src/PriceFeed.ts | 34 ++- src/util/src/TezosLendingPlatform.ts | 23 +- src/util/src/const.ts | 68 +++++- src/util/src/contracts/InterestRateModel.ts | 10 +- src/util/src/types.ts | 7 + 7 files changed, 450 insertions(+), 77 deletions(-) diff --git a/src/util/src/Comptroller.ts b/src/util/src/Comptroller.ts index c6512e33..d1fcc36e 100644 --- a/src/util/src/Comptroller.ts +++ b/src/util/src/Comptroller.ts @@ -2,10 +2,9 @@ import { ConseilOperator, ConseilQuery, ConseilQueryBuilder, ConseilServerInfo, import { AssetType } from './enum' import { JSONPath } from 'jsonpath-plus'; -import { ProtocolAddresses } from './types'; +import { Network, ProtocolAddresses } from './types'; import bigInt from 'big-integer'; import log from 'loglevel'; - export namespace Comptroller { /* * @description @@ -53,43 +52,86 @@ export namespace Comptroller { * @param address */ export async function GetStorage(address: string, protocolAddresses: ProtocolAddresses, server: string): Promise { - const storageResult = await TezosNodeReader.getContractStorage(server, address); - // get marketsMapId - const marketsMapId = JSONPath({ path: '$.args[0].args[1].args[1].int', json: storageResult })[0]; - // get all market values for fTokens from protocolAddresses - const markets: MarketMap = {}; + if (protocolAddresses.network && protocolAddresses.network === Network.TezLink_Shadownet) { + const storageResult = await TezosNodeReader.getContractStorage(server, address); + + const marketsMapId = JSONPath({ path: '$.args[0].args[1].args[0].args[1].args[0].int', json: storageResult })[0]; + + const markets: MarketMap = {}; + + await Promise.all(Object.values(protocolAddresses.fTokens).map(async (addr) => { + try { + const packedKey = TezosMessageUtils.encodeBigMapKey(Buffer.from(TezosMessageUtils.writePackedData(addr, 'address'), 'hex')); + const marketsResult = await TezosNodeReader.getValueForBigMapKey(server, marketsMapId, packedKey) + const asset = protocolAddresses.fTokensReverse[addr]; + markets[asset] = parseMarketResult(marketsResult, true); + } catch (e) { + log.error(`Failed to get Comptroller.Markets big_map content for ${addr} from ${marketsMapId} with ${e}`); + } + })); - await Promise.all(Object.values(protocolAddresses.fTokens).map(async (addr) => { try { - const packedKey = TezosMessageUtils.encodeBigMapKey(Buffer.from(TezosMessageUtils.writePackedData(addr, 'address'), 'hex')); - const marketsResult = await TezosNodeReader.getValueForBigMapKey(server, marketsMapId, packedKey) - const asset = protocolAddresses.fTokensReverse[addr]; - markets[asset] = parseMarketResult(marketsResult); + const adminBytes = JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[0].bytes', json: storageResult })[0]; + const oracleBytes = JSONPath({ path: '$.args[0].args[1].args[1].args[0].args[1].bytes', json: storageResult })[0]; + + return { + accountLiquidityMapId: JSONPath({ path: '$.args[0].args[0].args[0].args[0].args[0].int', json: storageResult })[0], + collateralsMapId: JSONPath({ path: '$.args[0].args[0].args[1].args[0].args[0].int', json: storageResult })[0], + loansMapId: JSONPath({ path: '$.args[0].args[1].args[0].args[0].int', json: storageResult })[0], + administrator: TezosMessageUtils.readAddress(adminBytes), + closeFactorMantissa: JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].int', json: storageResult })[0], + expScale: JSONPath({ path: '$.args[0].args[0].args[1].args[1].int', json: storageResult })[0], + halfExpScale: JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[1].args[0].int', json: storageResult })[0], + liquidationIncentiveMantissa: JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[1].args[1].int', json: storageResult })[0], + marketsMapId: marketsMapId, + oracleAddress: TezosMessageUtils.readAddress(oracleBytes), + pendingAdministrator: JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[0].prim', json: storageResult })[0], + transferPaused: JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[1].prim', json: storageResult })[0].toString().toLowerCase().startsWith('t'), + markets: markets + }; } catch (e) { - log.error(`Failed to get Comptroller.Markets big_map content for ${addr} from ${marketsMapId} with ${e}`); + log.error(`Unable to parse storage JSON for Comptroller at ${address}`); + throw e; } - })); + } else { + const storageResult = await TezosNodeReader.getContractStorage(server, address); + // get marketsMapId + const marketsMapId = JSONPath({ path: '$.args[0].args[1].args[1].int', json: storageResult })[0]; + // get all market values for fTokens from protocolAddresses + const markets: MarketMap = {}; - // parse results - try { - return { - accountLiquidityMapId: JSONPath({ path: '$.args[0].args[0].args[0].args[0].args[0].int', json: storageResult })[0], - collateralsMapId: JSONPath({ path: '$.args[0].args[0].args[1].args[0].int', json: storageResult })[0], - loansMapId: JSONPath({ path: '$.args[0].args[1].args[0].args[0].int', json: storageResult })[0], - administrator: JSONPath({ path: '$.args[0].args[0].args[0].args[1].string', json: storageResult })[0], - closeFactorMantissa: JSONPath({ path: '$.args[0].args[0].args[0].args[2].int', json: storageResult })[0], - expScale: JSONPath({ path: '$.args[0].args[0].args[1].args[1].int', json: storageResult })[0], - halfExpScale: JSONPath({ path: '$.args[0].args[0].args[2].int', json: storageResult })[0], - liquidationIncentiveMantissa: JSONPath({ path: '$.args[0].args[0].args[3].int', json: storageResult })[0], - marketsMapId: marketsMapId, - oracleAddress: JSONPath({ path: '$.args[0].args[2].args[1].string', json: storageResult })[0], - pendingAdministrator: JSONPath({ path: '$.args[0].args[3].prim', json: storageResult })[0], - transferPaused: JSONPath({ path: '$.args[0].args[4].prim', json: storageResult })[0].toString().toLowerCase().startsWith('t'), - markets: markets - }; - } catch (e) { - log.error(`Unable to parse storage JSON for Comptroller at ${address}`); - throw e; + await Promise.all(Object.values(protocolAddresses.fTokens).map(async (addr) => { + try { + const packedKey = TezosMessageUtils.encodeBigMapKey(Buffer.from(TezosMessageUtils.writePackedData(addr, 'address'), 'hex')); + const marketsResult = await TezosNodeReader.getValueForBigMapKey(server, marketsMapId, packedKey) + const asset = protocolAddresses.fTokensReverse[addr]; + markets[asset] = parseMarketResult(marketsResult); + } catch (e) { + log.error(`Failed to get Comptroller.Markets big_map content for ${addr} from ${marketsMapId} with ${e}`); + } + })); + + // parse results + try { + return { + accountLiquidityMapId: JSONPath({ path: '$.args[0].args[0].args[0].args[0].args[0].int', json: storageResult })[0], + collateralsMapId: JSONPath({ path: '$.args[0].args[0].args[1].args[0].int', json: storageResult })[0], + loansMapId: JSONPath({ path: '$.args[0].args[1].args[0].args[0].int', json: storageResult })[0], + administrator: JSONPath({ path: '$.args[0].args[0].args[0].args[1].string', json: storageResult })[0], + closeFactorMantissa: JSONPath({ path: '$.args[0].args[0].args[0].args[2].int', json: storageResult })[0], + expScale: JSONPath({ path: '$.args[0].args[0].args[1].args[1].int', json: storageResult })[0], + halfExpScale: JSONPath({ path: '$.args[0].args[0].args[2].int', json: storageResult })[0], + liquidationIncentiveMantissa: JSONPath({ path: '$.args[0].args[0].args[3].int', json: storageResult })[0], + marketsMapId: marketsMapId, + oracleAddress: JSONPath({ path: '$.args[0].args[2].args[1].string', json: storageResult })[0], + pendingAdministrator: JSONPath({ path: '$.args[0].args[3].prim', json: storageResult })[0], + transferPaused: JSONPath({ path: '$.args[0].args[4].prim', json: storageResult })[0].toString().toLowerCase().startsWith('t'), + markets: markets + }; + } catch (e) { + log.error(`Unable to parse storage JSON for Comptroller at ${address}`); + throw e; + } } } @@ -115,7 +157,20 @@ export namespace Comptroller { * * @param */ - function parseMarketResult(result): Market { + function parseMarketResult(result, tezlink = false): Market { + if (tezlink) { + const assetType: AssetType = JSONPath({ path: '$.args[1].args[0].args[0].string', json: result })[0] as AssetType; + return { + assetType: assetType, + borrowPaused: JSONPath({ path: '$.args[0].args[0].args[0].prim', json: result })[0].toString().toLowerCase().startsWith('t'), + collateralFactor: JSONPath({ path: '$.args[0].args[0].args[1].int', json: result })[0], + isListed: JSONPath({ path: '$.args[0].args[1].args[0].prim', json: result })[0].toString().toLowerCase().startsWith('t'), + mintPaused: JSONPath({ path: '$.args[0].args[1].args[1].prim', json: result })[0].toString().toLowerCase().startsWith('t'), + price: bigInt(JSONPath({ path: '$.args[1].args[0].args[1].int', json: result })[0]), + updateLevel: JSONPath({ path: '$.args[1].args[1].args[1].args[1].int', json: result })[0], + } as Market; + } + const assetType: AssetType = JSONPath({ path: '$.args[1].args[0].string', json: result })[0] as AssetType; return { assetType: assetType, @@ -143,7 +198,12 @@ export namespace Comptroller { try { const collateralsResult = await TezosNodeReader.getValueForBigMapKey(server, comptroller.collateralsMapId, packedAccountKey); - const fTokenAddresses: AssetType[] = collateralsResult.map((json) => json['string']); + let fTokenAddresses: AssetType[]; + if(server.includes('shadownet.tezlink')) { + fTokenAddresses = collateralsResult.map((json) => json['bytes']).map((bytes) => TezosMessageUtils.readAddress(bytes)); + } else { + fTokenAddresses = collateralsResult.map((json) => json['string']); + } return fTokenAddresses.map((fTokenAddress) => protocolAddresses.fTokensReverse[fTokenAddress]); } catch (err) { log.error(`${address} has no collateralized assets`); diff --git a/src/util/src/FToken.ts b/src/util/src/FToken.ts index a61cb0e9..5773c34f 100644 --- a/src/util/src/FToken.ts +++ b/src/util/src/FToken.ts @@ -16,10 +16,11 @@ import { import { BigNumber } from 'bignumber.js'; import { InterestRateModel } from './contracts/InterestRateModel'; import { JSONPath } from 'jsonpath-plus'; -import { ProtocolAddresses, UnderlyingAsset } from './types'; +import { Network, ProtocolAddresses, UnderlyingAsset } from './types'; import bigInt from 'big-integer'; import Decimal from 'decimal.js'; import { TezosLendingPlatform } from './TezosLendingPlatform'; +import { blocksPerMinute } from './const'; export namespace FToken { /* @@ -72,6 +73,9 @@ export namespace FToken { switch (type) { case TokenStandard.FA12: { const storageResult = await TezosNodeReader.getContractStorage(server, fTokenAddress); + if (server.includes("shadownet.tezlink")) { + return await parseTezLinkStorage(storageResult, server, underlying, fTokenAddress, type); + } const balancesMapId = JSONPath({ path: '$.args[0].args[1].args[0].args[2].int', json: storageResult, @@ -110,7 +114,9 @@ export namespace FToken { ), }, borrow: { - totalBorrows: bigInt(JSONPath({ path: '$.args[0].args[3].args[1].int', json: storageResult })[0]), + totalBorrows: bigInt( + JSONPath({ path: '$.args[0].args[3].args[1].int', json: storageResult })[0], + ), borrowIndex: bigInt( JSONPath({ path: '$.args[0].args[0].args[0].args[1].int', json: storageResult })[0], ), @@ -127,13 +133,14 @@ export namespace FToken { json: storageResult, })[0], expScale: bigInt(JSONPath({ path: '$.args[0].args[0].args[2].int', json: storageResult })[0]), - halfExpScale: bigInt( - JSONPath({ path: '$.args[0].args[0].args[4].int', json: storageResult })[0], - ), + halfExpScale: bigInt(JSONPath({ path: '$.args[0].args[0].args[4].int', json: storageResult })[0]), initialExchangeRateMantissa: bigInt( JSONPath({ path: '$.args[0].args[1].args[0].args[0].int', json: storageResult })[0], ), - interestRateModel: JSONPath({ path: '$.args[0].args[1].args[0].args[1].string', json: storageResult })[0], + interestRateModel: JSONPath({ + path: '$.args[0].args[1].args[0].args[1].string', + json: storageResult, + })[0], pendingAdministrator: pendingAdministrator, reserveFactorMantissa: bigInt( JSONPath({ path: '$.args[0].args[2].args[0].int', json: storageResult })[0], @@ -147,6 +154,9 @@ export namespace FToken { } case TokenStandard.FA2: { const storageResult = await TezosNodeReader.getContractStorage(server, fTokenAddress); + if (server.includes("shadownet.tezlink")) { + return await parseTezLinkStorage(storageResult, server, underlying, fTokenAddress, type); + } const balancesMapId = JSONPath({ path: '$.args[0].args[1].args[0].args[1].int', json: storageResult, @@ -185,7 +195,9 @@ export namespace FToken { ), }, borrow: { - totalBorrows: bigInt(JSONPath({ path: '$.args[0].args[3].args[1].int', json: storageResult })[0]), + totalBorrows: bigInt( + JSONPath({ path: '$.args[0].args[3].args[1].int', json: storageResult })[0], + ), borrowIndex: bigInt( JSONPath({ path: '$.args[0].args[0].args[0].args[1].int', json: storageResult })[0], ), @@ -201,10 +213,10 @@ export namespace FToken { path: '$.args[0].args[0].args[1].args[1].string', json: storageResult, })[0], - expScale: bigInt(JSONPath({ path: '$.args[0].args[0].args[2].args[0].int', json: storageResult })[0]), - halfExpScale: bigInt( - JSONPath({ path: '$.args[0].args[0].args[3].int', json: storageResult })[0], + expScale: bigInt( + JSONPath({ path: '$.args[0].args[0].args[2].args[0].int', json: storageResult })[0], ), + halfExpScale: bigInt(JSONPath({ path: '$.args[0].args[0].args[3].int', json: storageResult })[0]), initialExchangeRateMantissa: bigInt( JSONPath({ path: '$.args[0].args[0].args[4].int', json: storageResult })[0], ), @@ -225,6 +237,9 @@ export namespace FToken { } case TokenStandard.XTZ: { const storageResult = await TezosNodeReader.getContractStorage(server, fTokenAddress); + if (server.includes("shadownet.tezlink")) { + return await parseTezLinkStorage(storageResult, server, underlying, fTokenAddress, type); + } const balancesMapId = JSONPath({ path: '$.args[0].args[1].args[0].args[1].int', json: storageResult, @@ -387,9 +402,9 @@ export namespace FToken { * @param irStorage InterestRateModel storage. * @returns supplyApy percent Mantissa as bigInt.BigInteger */ - export function getSupplyRateApy(storage: Storage, irStorage: InterestRateModel.Storage): bigInt.BigInteger { + export function getSupplyRateApy(storage: Storage, irStorage: InterestRateModel.Storage, network: Network): bigInt.BigInteger { const _blockRate = getSupplyRate(storage, irStorage); - return _calcAnnualizedRate(_blockRate, irStorage.scale).multiply(100); + return _calcAnnualizedRate(_blockRate, irStorage.scale, _blocksPerDay(blocksPerMinute[network])).multiply(100); } /** @@ -443,14 +458,14 @@ export namespace FToken { * @param irStorage InterestRateModel storage. * @returns borrowAPY percent Mantissa as bigInt.BigInteger */ - export function getBorrowRateApy(storage: Storage, irStorage: InterestRateModel.Storage): bigInt.BigInteger { + export function getBorrowRateApy(storage: Storage, irStorage: InterestRateModel.Storage, network: Network): bigInt.BigInteger { const _blockRate = getBorrowRate(storage, irStorage); if (_blockRate.greaterOrEquals(storage.borrow.borrowRateMaxMantissa)) { - return _calcAnnualizedRate(storage.borrow.borrowRateMaxMantissa, irStorage.scale).multiply(100); + return _calcAnnualizedRate(storage.borrow.borrowRateMaxMantissa, irStorage.scale, _blocksPerDay(blocksPerMinute[network])).multiply(100); } - return _calcAnnualizedRate(_blockRate, irStorage.scale).multiply(100); + return _calcAnnualizedRate(_blockRate, irStorage.scale, _blocksPerDay(blocksPerMinute[network])).multiply(100); } /** @@ -466,6 +481,7 @@ export namespace FToken { export function getDynamicBorrowRateApyFn( storage: Storage, irStorage: InterestRateModel.Storage, + network: Network ): (borrowAmount: bigInt.BigInteger) => bigInt.BigInteger { return (additionalAmount: bigInt.BigInteger) => { const _storage = { @@ -475,7 +491,7 @@ export namespace FToken { totalBorrows: storage.borrow.totalBorrows.plus(additionalAmount), }, }; - return getBorrowRateApy(_storage, irStorage); + return getBorrowRateApy(_storage, irStorage, network); }; } @@ -807,7 +823,7 @@ export namespace FToken { const borrowResult = await queryBalance(account, borrowsMapId, server); return parseBalanceResult(balanceResult, borrowResult, currentIndex, assetType); } catch (e) { - return parseBalanceResult({}, {},currentIndex, assetType); + return parseBalanceResult({}, {}, currentIndex, assetType); } } @@ -855,7 +871,7 @@ export namespace FToken { */ export function parseBalanceResult( balanceInfo: any, - borrowInfo:any, + borrowInfo: any, currentIndex: bigInt.BigInteger, assetType: AssetType, ): Balance { @@ -895,7 +911,7 @@ export namespace FToken { protocolAddresses: ProtocolAddresses, counter: number, pkh: string, - gas: number = 200_000, + gas: number = 60_000, freight: number = 20_000, ): Transaction[] { const entrypoint = 'accrueInterest'; @@ -932,7 +948,7 @@ export namespace FToken { signer: Signer, keystore: KeyStore, fee: number, - gas: number = 200_000, + gas: number = 60_000, freight: number = 20_000, ): Promise { // get account counter @@ -1198,4 +1214,201 @@ export namespace FToken { TezosParameterFormat.Michelson, ); } + + async function parseTezLinkStorage( + storageResult: any, + server: string, + underlying: UnderlyingAsset, + fTokenAddress: string, + type: TokenStandard, + ): Promise { + switch (type) { + case TokenStandard.FA12: { + const balancesMapId = JSONPath({ + path: '$.args[0].args[1].args[0].args[0].args[1].args[1].int', + json: storageResult, + })[0]; + const borrowsMapId = JSONPath({ + path: '$.args[0].args[0].args[1].args[0].args[0].int', + json: storageResult, + })[0]; + const adminJsonPrase = JSONPath({ path: '$.args[0].args[1].args[0].args[1].args[1].args[0].prim', json: storageResult })[0]; + const pendingAdministrator: string | undefined = adminJsonPrase === 'None' ? undefined : adminJsonPrase; + const protocolSeizeShareMantissa = JSONPath({ + path: '$.args[0].args[1].args[0].args[1].args[1].args[1].int', + json: storageResult, + })[0]; + const cash = await TezosLendingPlatform.GetUnderlyingBalanceToken(underlying, fTokenAddress, server); + + return { + accrualBlockNumber: JSONPath({ + path: '$.args[0].args[0].args[0].args[0].args[0].int', + json: storageResult, + })[0], + administrator: TezosMessageUtils.readAddress(JSONPath({ + path: '$.args[0].args[0].args[0].args[0].args[1].args[1].bytes', + json: storageResult, + })[0]), + balancesMapId: balancesMapId, + borrowsMapId: borrowsMapId, + supply: { + totalSupply: bigInt(JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[1].args[1].int', json: storageResult })[0]), + supplyRatePerBlock: bigInt( + JSONPath({ path: '$.args[0].args[1].args[1].args[0].args[1].args[1].int', json: storageResult })[0], + ), + }, + borrow: { + totalBorrows: bigInt( + JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[0].args[1].int', json: storageResult })[0], + ), + borrowIndex: bigInt( + JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[0].int', json: storageResult })[0], + ), + borrowRateMaxMantissa: bigInt( + JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].int', json: storageResult })[0], + ), + borrowRatePerBlock: bigInt( + JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].int', json: storageResult })[0], + ), + }, + protocolSeizeShareMantissa: bigInt(protocolSeizeShareMantissa), + comptrollerAddress: TezosMessageUtils.readAddress(JSONPath({ + path: '$.args[0].args[0].args[1].args[0].args[1].args[0].bytes', + json: storageResult, + })[0]), + expScale: bigInt(JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[0].int', json: storageResult })[0]), + halfExpScale: bigInt(JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[1].args[1].int', json: storageResult })[0]), + initialExchangeRateMantissa: bigInt( + JSONPath({ path: '$.args[0].args[1].args[0].args[0].args[0].int', json: storageResult })[0], + ), + interestRateModel: TezosMessageUtils.readAddress(JSONPath({ + path: '$.args[0].args[1].args[0].args[0].args[1].args[0].bytes', + json: storageResult, + })[0]), + pendingAdministrator: pendingAdministrator, + reserveFactorMantissa: bigInt( + JSONPath({ path: '$.args[0].args[1].args[1].args[0].args[0].int', json: storageResult })[0], + ), + reserveFactorMaxMantissa: bigInt( + JSONPath({ path: '$.args[0].args[1].args[1].args[0].args[1].args[0].int', json: storageResult })[0], + ), + totalReserves: bigInt(JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[1].args[0].int', json: storageResult })[0]), + currentCash: cash, + }; + } + case TokenStandard.FA2: { + const balancesMapId = JSONPath({ + path: '$.args[0].args[1].args[0].args[0].args[1].args[0].int', + json: storageResult, + })[0]; + const borrowsMapId = JSONPath({ + path: '$.args[0].args[0].args[1].args[0].args[0].int', + json: storageResult, + })[0]; + const adminJsonPrase = JSONPath({ path: '$.args[0].args[1].args[0].args[1].args[0].prim', json: storageResult })[0]; + const pendingAdministrator: string | undefined = adminJsonPrase === 'None' ? undefined : adminJsonPrase; + const protocolSeizeShareMantissa = JSONPath({ + path: '$.args[0].args[1].args[0].args[1].args[1].args[0].int', + json: storageResult, + })[0]; + const cash = await TezosLendingPlatform.GetUnderlyingBalanceToken(underlying, fTokenAddress, server); + + return { + accrualBlockNumber: JSONPath({ + path: '$.args[0].args[0].args[0].args[0].args[0].int', + json: storageResult, + })[0], + administrator: TezosMessageUtils.readAddress(JSONPath({ + path: '$.args[0].args[0].args[0].args[0].args[1].args[1].bytes', + json: storageResult, + })[0]), + balancesMapId: balancesMapId, + borrowsMapId: borrowsMapId, + supply: { + totalSupply: bigInt(JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[1].args[1].int', json: storageResult })[0]), + supplyRatePerBlock: bigInt( + JSONPath({ path: '$.args[0].args[1].args[1].args[0].args[1].args[0].int', json: storageResult })[0], + ), + }, + borrow: { + totalBorrows: bigInt( + JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[0].args[1].int', json: storageResult })[0], + ), + borrowIndex: bigInt( + JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[0].int', json: storageResult })[0], + ), + borrowRateMaxMantissa: bigInt( + JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].int', json: storageResult })[0], + ), + borrowRatePerBlock: bigInt( + JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].int', json: storageResult })[0], + ), + }, + protocolSeizeShareMantissa: bigInt(protocolSeizeShareMantissa), + comptrollerAddress: TezosMessageUtils.readAddress(JSONPath({ + path: '$.args[0].args[0].args[1].args[0].args[1].args[0].bytes', + json: storageResult, + })[0]), + expScale: bigInt( + JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[0].args[0].int', json: storageResult })[0], + ), + halfExpScale: bigInt(JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[1].args[0].int', json: storageResult })[0]), + initialExchangeRateMantissa: bigInt( + JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[1].args[1].int', json: storageResult })[0], + ), + interestRateModel: TezosMessageUtils.readAddress(JSONPath({ + path: '$.args[0].args[1].args[0].args[0].args[0].bytes', + json: storageResult, + })[0]), + pendingAdministrator: pendingAdministrator, + reserveFactorMantissa: bigInt( + JSONPath({ path: '$.args[0].args[1].args[0].args[1].args[1].args[1].int', json: storageResult })[0], + ), + reserveFactorMaxMantissa: bigInt( + JSONPath({ path: '$.args[0].args[1].args[1].args[0].args[0].int', json: storageResult })[0], + ), + totalReserves: bigInt(JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[1].args[0].int', json: storageResult })[0]), + currentCash: cash, + }; + } + case TokenStandard.XTZ: { + const borrowsMapId = JSONPath({ path: '$.args[0].args[0].args[1].args[0].args[1].args[0].int', json: storageResult })[0]; + const balancesMapId = JSONPath({ path: '$.args[0].args[1].args[0].args[0].args[1].args[0].int', json: storageResult })[0]; + const adminJsonParse = JSONPath({ path: '$.args[0].args[1].args[0].args[1].args[0].prim', json: storageResult })[0]; + const pendingAdministrator: string | undefined = adminJsonParse === 'None' ? undefined : adminJsonParse; + const spendableBalance = await TezosNodeReader.getSpendableBalanceForAccount(server, fTokenAddress); + const adminBytes = JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[0].bytes', json: storageResult })[0]; + const comptrollerBytes = JSONPath({ path: '$.args[0].args[0].args[1].args[0].args[1].args[1].bytes', json: storageResult })[0]; + const interestRateModelBytes = JSONPath({ path: '$.args[0].args[1].args[0].args[0].args[0].bytes', json: storageResult })[0]; + + return { + accrualBlockNumber: JSONPath({ path: '$.args[0].args[0].args[0].args[0].args[0].int', json: storageResult })[0], + administrator: TezosMessageUtils.readAddress(adminBytes), + balancesMapId, + borrowsMapId, + supply: { + totalSupply: bigInt(JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[1].args[1].int', json: storageResult })[0]), + supplyRatePerBlock: bigInt(JSONPath({ path: '$.args[0].args[1].args[1].args[0].args[1].args[0].int', json: storageResult })[0]), + }, + borrow: { + totalBorrows: bigInt(JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[0].int', json: storageResult })[0]), + borrowIndex: bigInt(JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[0].int', json: storageResult })[0]), + borrowRateMaxMantissa: bigInt(JSONPath({ path: '$.args[0].args[0].args[0].args[1].args[1].args[1].int', json: storageResult })[0]), + borrowRatePerBlock: bigInt(JSONPath({ path: '$.args[0].args[0].args[1].args[0].args[0].int', json: storageResult })[0]), + }, + protocolSeizeShareMantissa: bigInt(JSONPath({ path: '$.args[0].args[1].args[0].args[1].args[1].args[0].int', json: storageResult })[0]), + comptrollerAddress: TezosMessageUtils.readAddress(comptrollerBytes), + expScale: bigInt(JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[0].int', json: storageResult })[0]), + halfExpScale: bigInt(JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[1].args[0].int', json: storageResult })[0]), + initialExchangeRateMantissa: bigInt(JSONPath({ path: '$.args[0].args[0].args[1].args[1].args[1].args[1].int', json: storageResult })[0]), + interestRateModel: TezosMessageUtils.readAddress(interestRateModelBytes), + pendingAdministrator, + reserveFactorMantissa: bigInt(JSONPath({ path: '$.args[0].args[1].args[0].args[1].args[1].args[1].int', json: storageResult })[0]), + reserveFactorMaxMantissa: bigInt(JSONPath({ path: '$.args[0].args[1].args[1].args[0].args[0].int', json: storageResult })[0]), + totalReserves: bigInt(JSONPath({ path: '$.args[0].args[1].args[1].args[1].args[1].args[0].int', json: storageResult })[0]), + currentCash: bigInt(spendableBalance), + }; + } + } + } } diff --git a/src/util/src/PriceFeed.ts b/src/util/src/PriceFeed.ts index ae470b79..988071ae 100644 --- a/src/util/src/PriceFeed.ts +++ b/src/util/src/PriceFeed.ts @@ -25,18 +25,34 @@ export namespace PriceFeed { * @param oracleMap map id for harbinger oracle * @param server rpc node url */ - export async function GetPrice(asset: AssetType, oracle: string, level:number, server: string): Promise { + export async function GetPrice( + asset: AssetType, + oracle: string, + level: number, + server: string, + ): Promise { if (Object.prototype.hasOwnProperty.call(alias, asset)) { - asset = alias[asset] + asset = alias[asset]; } + // TezLink RPC does not support running views yet, so we have to directly read the price from storage. + if (server.includes('shadownet.tezlink')) { + const storageResult = await TezosNodeReader.getContractStorage(server, oracle); + const overrideMapId = JSONPath({ path: '$.args[1].args[1].args[0].int', json: storageResult })[0]; + const encodedKey = TezosMessageUtils.encodeBigMapKey( + Buffer.from(TezosMessageUtils.writePackedData(`${asset}-USD`, 'string'), 'hex') + ); + const priceResult = await TezosNodeReader.getValueForBigMapKey(server, overrideMapId, encodedKey); + return bigInt(priceResult.args[1].int); + } + const assetPrice = await TezosNodeWriter.runView( - server, - "main", - oracle, - "getPrice", - { "string": `${asset}-USD` }, - `${level}` - ); + server, + 'main', + oracle, + 'getPrice', + { string: `${asset}-USD` }, + `${level}`, + ); return bigInt(assetPrice.data.args[1].int); } diff --git a/src/util/src/TezosLendingPlatform.ts b/src/util/src/TezosLendingPlatform.ts index 1663be2d..4ad79d1d 100644 --- a/src/util/src/TezosLendingPlatform.ts +++ b/src/util/src/TezosLendingPlatform.ts @@ -6,6 +6,7 @@ import { Market, MarketData, MarketMap, + Network, ProtocolAddresses, SupplyComposition, SupplyMarket, @@ -78,6 +79,7 @@ export namespace TezosLendingPlatform { rateModel: InterestRateModel.Storage, price: bigInt.BigInteger, level: number, + network: Network, ): Market { const asset: UnderlyingAssetMetadata = { name: tokenNames[underlying.assetType], @@ -89,18 +91,18 @@ export namespace TezosLendingPlatform { // numParticipants: fToken.supply.numSuppliers?, numParticipants: 0, totalAmount: fToken.supply.totalSupply, - rate: FToken.getSupplyRateApy(fToken, rateModel), + rate: FToken.getSupplyRateApy(fToken, rateModel, network), // TODO: : create a dynamic supply rate apy function rateFn: (additionalAmount: bigInt.BigInteger) => { - return FToken.getSupplyRateApy(fToken, rateModel); + return FToken.getSupplyRateApy(fToken, rateModel, network); }, }; const borrow: MarketData = { // numParticipants: fToken.borrow.numBorrowers, numParticipants: 0, totalAmount: fToken.borrow.totalBorrows, - rate: FToken.getBorrowRateApy(fToken, rateModel), - rateFn: FToken.getDynamicBorrowRateApyFn(fToken, rateModel), + rate: FToken.getBorrowRateApy(fToken, rateModel, network), + rateFn: FToken.getDynamicBorrowRateApyFn(fToken, rateModel, network), }; const available = FToken.applyExchangeRate( supply.totalAmount.minus(borrow.totalAmount).minus(fToken.totalReserves), @@ -177,6 +179,7 @@ export namespace TezosLendingPlatform { rateModel, oraclePrice, head.header.level, + protocolAddresses.network, ); } catch (e) { log.error( @@ -424,7 +427,7 @@ export namespace TezosLendingPlatform { return bigInt(0); } return bigInt(regex[1]); - } + } const balance = JSONPath({ path: underlying.balancesPath!, json: mapResult })[0]; return bigInt(balance); @@ -728,7 +731,7 @@ export namespace TezosLendingPlatform { protocolAddresses: ProtocolAddresses, counter: number, pkh: string, - gas: number = 200_000, + gas: number = 40_000, freight: number = 20_000, ): Transaction[] | undefined { const underlying: UnderlyingAsset = @@ -775,13 +778,13 @@ export namespace TezosLendingPlatform { [ MultiAssetTokenHelper.RemoveOperatorsOperation(underlying.address!, counter, pkh, 0, [ updateOperator, - ]), + ], 40_000), ] : // fa2 add operator [ MultiAssetTokenHelper.AddOperatorsOperation(underlying.address!, counter, pkh, 0, [ updateOperator, - ]), + ], 40_000), ]; case TokenStandard.XTZ: return undefined; @@ -809,7 +812,7 @@ export namespace TezosLendingPlatform { protocolAddresses, 0, pkh, - gas, + 60_000, freight, ), ); @@ -893,7 +896,7 @@ export namespace TezosLendingPlatform { const counter = await TezosNodeReader.getCounterForAccount(server, keystore.publicKeyHash); const ops: Transaction[] = MintOpGroup(mint, protocolAddresses, keystore.publicKeyHash, gas, freight); // prep operation - const opGroup = await TezosNodeWriter.prepareOperationGroup(server, keystore, counter, ops, true); + const opGroup = await TezosNodeWriter.prepareOperationGroup(server, keystore, counter, ops); // send operation const operationResult = await TezosNodeWriter.sendOperation(server, opGroup, signer); return TezosContractUtils.clearRPCOperationGroupHash(operationResult.operationGroupID); diff --git a/src/util/src/const.ts b/src/util/src/const.ts index 547e3378..a67b6d64 100644 --- a/src/util/src/const.ts +++ b/src/util/src/const.ts @@ -1,6 +1,6 @@ import { AssetType, TokenStandard } from "./enum"; -import { ProtocolAddresses } from "./types"; +import { Network, ProtocolAddresses } from "./types"; export const decimals = { XTZ: 6, @@ -87,6 +87,7 @@ export const testnetAddresses: ProtocolAddresses = { }, governance: "KT1Dv2zRviAzW4NeGdfbVWmt5jZ8vvJpRFsq", oracle: "KT1NwzLYM8G8rzAuUutYzZgx1TgUXCFJhxyw", + network: Network.Shadownet }; export const mainnetAddresses: ProtocolAddresses = { @@ -155,6 +156,65 @@ export const mainnetAddresses: ProtocolAddresses = { }, governance: "KT1QScMEtDpXSuj7z2if1EMSqaXaXPnWCxqv", oracle: "KT1JiMMNrs6rptrQEZGCyxcZQSSZ8aqLqbYa", + network: Network.Mainnet +}; + +export const tezlinkShadownetAddresses: ProtocolAddresses = { + fTokens: { + XTZ: "KT1UqLeN9JgTTNRxZcK4TFeixkg9AeWHpeji", + USD: "KT1Na1DNaDYgwSAxw13XkiPsKn49tV58aqQS", + USDT: "KT1Aq65WT5usR4AUaujeActGgDKypFTBzh3E", + STXTZ: "KT1QJsxABrxky8fdCwjagiAzu3rWmXGAwsfp" + }, + fTokensReverse: { + KT1UqLeN9JgTTNRxZcK4TFeixkg9AeWHpeji: AssetType.XTZ, + KT1Na1DNaDYgwSAxw13XkiPsKn49tV58aqQS: AssetType.USD, + KT1Aq65WT5usR4AUaujeActGgDKypFTBzh3E: AssetType.USDT, + KT1QJsxABrxky8fdCwjagiAzu3rWmXGAwsfp: AssetType.STXTZ + }, + underlying: { + USD: { + assetType: AssetType.USD, + address: "KT1RfMCz7jonKzH9pkHD3Rko8pf4wnDaiM95", + balancesMapId: 300, + tokenStandard: TokenStandard.FA12, + decimals: 6, + balancesPath: "$.args[1].int", + }, + USDT: { + assetType: AssetType.USDT, + tokenStandard: TokenStandard.FA2, + decimals: 6, + address: "KT1VR8vMntyrcuqtyhMdiXDTfwVwffcMVdPw", + tokenId: 0, + balancesMapId: 247, + balancesPath: "$.int", + }, + XTZ: { + assetType: AssetType.XTZ, + tokenStandard: TokenStandard.XTZ, + decimals: 6, + }, + STXTZ: { + assetType: AssetType.STXTZ, + tokenStandard: TokenStandard.FA2, + decimals: 6, + address: "KT1MMjjXa5d7TwYSYahCXM4xkcsbBfDjsaYq", + tokenId: 0, + balancesMapId: 252, + balancesPath: "$.int", + } + }, + comptroller: "KT1XKz7d2Nh4SNz9HD7JXgZ5JVcGbQ4DNwLf", + interestRateModel: { + XTZ: "KT1Xo1kMu2jt33c9NSB2qnvEXtg65Q4sq27B", + USDT: "KT1HkpQzagFYWrheiVeuRSXShHoaiYYFRfsK", + USD: "KT1HkpQzagFYWrheiVeuRSXShHoaiYYFRfsK", + STXTZ: "KT1F16mVGisKzJ3vKjHPDaeopHm3gFMgPeJA" + }, + governance: "KT1A4CKnV8ANLnCjLHMRyX2asc1VHbFUWmWr", + oracle: "KT1FH4S1qQJ1a8R7RykHxC3ZgCbjjRyjfCdj", + network: Network.TezLink_Shadownet, }; export const tokenNames: { [assetType: string]: string } = { @@ -169,3 +229,9 @@ export const tokenNames: { [assetType: string]: string } = { }; export const expectedBlocksPerYear = 2 * 60 * 24 * 365; + +export const blocksPerMinute: Record = { + mainnet: 10, + shadownet: 10, + "tezlink-shadownet": 120, +}; diff --git a/src/util/src/contracts/InterestRateModel.ts b/src/util/src/contracts/InterestRateModel.ts index 431ac00c..a661a51a 100644 --- a/src/util/src/contracts/InterestRateModel.ts +++ b/src/util/src/contracts/InterestRateModel.ts @@ -13,7 +13,15 @@ export namespace InterestRateModel { export async function GetStorage(server: string, address: string): Promise { const storageResult = await TezosNodeReader.getContractStorage(server, address); - + if (server.includes('shadownet.tezlink')) { + return { + blockRate: bigInt(JSONPath({ path: '$.args[0].args[0].int', json: storageResult })[0]), + blockMultiplier: bigInt(JSONPath({ path: '$.args[1].args[1].args[0].int', json: storageResult })[0]), + jumpMultiplier: bigInt(JSONPath({ path: '$.args[0].args[1].int', json: storageResult })[0]), + kink: bigInt(JSONPath({ path: '$.args[1].args[0].int', json: storageResult })[0]), + scale: bigInt(JSONPath({ path: '$.args[1].args[1].args[1].int', json: storageResult })[0]), + }; + } return { blockRate: bigInt(JSONPath({ path: '$.args[0].args[0].int', json: storageResult })[0]), blockMultiplier: bigInt(JSONPath({ path: '$.args[2].int', json: storageResult })[0]), diff --git a/src/util/src/types.ts b/src/util/src/types.ts index c889a8bf..26eb79f4 100644 --- a/src/util/src/types.ts +++ b/src/util/src/types.ts @@ -15,6 +15,12 @@ export interface SupplyComposition { totalUsdValue: bigInt.BigInteger; } +export enum Network { + Mainnet = 'mainnet', + Shadownet = 'shadownet', + TezLink_Shadownet = 'tezlink-shadownet', +} + /* * @description * @@ -104,6 +110,7 @@ export interface ProtocolAddresses { interestRateModel: { [underlying: string]: string }; governance: string; oracle: string; + network: Network; } /* From ce4aa47de4a2f2ee210294e8c19aa4047f9117ba Mon Sep 17 00:00:00 2001 From: "ilya.razievskij" Date: Thu, 12 Mar 2026 17:06:38 +0200 Subject: [PATCH 2/4] feat: multi network config --- ...twork-config.json => mainnet-network-config.json} | 0 ...ork-config.json => shadownet-network-config.json} | 0 .../library/tezlink-shadownet-network-config.json | 12 ++++++++++++ 3 files changed, 12 insertions(+) rename src/ui/src/library/{prod-network-config.json => mainnet-network-config.json} (100%) rename src/ui/src/library/{dev-network-config.json => shadownet-network-config.json} (100%) create mode 100644 src/ui/src/library/tezlink-shadownet-network-config.json diff --git a/src/ui/src/library/prod-network-config.json b/src/ui/src/library/mainnet-network-config.json similarity index 100% rename from src/ui/src/library/prod-network-config.json rename to src/ui/src/library/mainnet-network-config.json diff --git a/src/ui/src/library/dev-network-config.json b/src/ui/src/library/shadownet-network-config.json similarity index 100% rename from src/ui/src/library/dev-network-config.json rename to src/ui/src/library/shadownet-network-config.json diff --git a/src/ui/src/library/tezlink-shadownet-network-config.json b/src/ui/src/library/tezlink-shadownet-network-config.json new file mode 100644 index 00000000..d41ff817 --- /dev/null +++ b/src/ui/src/library/tezlink-shadownet-network-config.json @@ -0,0 +1,12 @@ + +{ + "infra": { + "tezosNode": "https://rpc.shadownet.tezlink.nomadic-labs.com", + "conseilServer": { + "url": "https://conseil-ithaca.cryptonomic-infra.tech:443", + "apiKey": "", + "network": "tezlink-shadownet" + } + }, + "dappName": "TezFin" +} \ No newline at end of file From 9abdc3569eb03f157d43934f092281639f8812d1 Mon Sep 17 00:00:00 2001 From: "ilya.razievskij" Date: Thu, 12 Mar 2026 17:07:23 +0200 Subject: [PATCH 3/4] chore: beacon version update --- src/ui/package-lock.json | 670 ++++++++++++++++++++------------------- src/ui/package.json | 7 +- 2 files changed, 344 insertions(+), 333 deletions(-) diff --git a/src/ui/package-lock.json b/src/ui/package-lock.json index 3036e76c..e2ba8a3c 100644 --- a/src/ui/package-lock.json +++ b/src/ui/package-lock.json @@ -8,7 +8,7 @@ "name": "client", "version": "0.2.0", "dependencies": { - "@airgap/beacon-sdk": "^4.6.4", + "@airgap/beacon-sdk": "^4.7.0", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", @@ -107,33 +107,33 @@ "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==" }, "node_modules/@airgap/beacon-blockchain-substrate": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-substrate/-/beacon-blockchain-substrate-4.6.4.tgz", - "integrity": "sha512-UATNQ2EtdKMuEJFdJUILg1PbWJ54TBBOBxTrjPnM2pzEIfriEJBlyYLASKT/32vLoZJo524o/hGouyQfdnqfxA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-substrate/-/beacon-blockchain-substrate-4.7.0.tgz", + "integrity": "sha512-b0cM46Ucw5EhaFHjEvVnUUcK0r/mInSgyqhdR2IUKvBYYeLySSGMxMXoiou4SpQFsS0Vu9GsL38kDxa/wuhX7g==", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-ui": "4.6.4" + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-ui": "4.7.0" } }, "node_modules/@airgap/beacon-blockchain-tezos": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-tezos/-/beacon-blockchain-tezos-4.6.4.tgz", - "integrity": "sha512-xCgQ0fzdZDbH6ZC/t2PvrMPHaBnb+t3TL/0UlwEoFGelSP7wII/ZIHqmyGj+v/5AhbcoC4Pf0L6qBmdI9gl7BQ==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-tezos/-/beacon-blockchain-tezos-4.7.0.tgz", + "integrity": "sha512-x3ZTVolbYn+PZrzZFYED4Ow86ONiCVrBSDTkzfh4EvxuUbvsgTue+jwqrxH9bA9OcbFal/1VJXjpfROAkcO+Ww==", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-ui": "4.6.4" + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-ui": "4.7.0" } }, "node_modules/@airgap/beacon-core": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-core/-/beacon-core-4.6.4.tgz", - "integrity": "sha512-9SL0ABl9Aqe9DPtiulo6uan4r02/XATKtKEWOjizgSYxIh+AIhgoIZOwziVjCBklImhy91NG7iplNdsspFvKuA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-core/-/beacon-core-4.7.0.tgz", + "integrity": "sha512-RyPf6KaJcVgWbzef6CvAv5PbkhuF2BDMpkToXliYU0mXibUjkbGJL0bXwEJd2l0jlsxjnlXaE/V78MXhDi8o1Q==", "license": "ISC", "dependencies": { - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-utils": "4.6.4", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-utils": "4.7.0", "@stablelib/ed25519": "^2.0.2", "@stablelib/nacl": "^2.0.1", "@stablelib/utf8": "^2.0.1", @@ -227,91 +227,91 @@ } }, "node_modules/@airgap/beacon-dapp": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-dapp/-/beacon-dapp-4.6.4.tgz", - "integrity": "sha512-HX8ZRzX2YPiXFNIU4J/bjtolGokefN2nadQW50uwbfRi2FxhV00WZuetTPYeCIe3qSaABr+aXzMMfF1LX8t0aw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-dapp/-/beacon-dapp-4.7.0.tgz", + "integrity": "sha512-tXMDrvzAg3kXPF3p2FpwzHgnIheG8Ce9CJgZsMD8piY9YTxELrZp1V2nStnX/bwTrhqHsszKn+knJdLv6+PvKw==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-transport-matrix": "4.6.4", - "@airgap/beacon-transport-postmessage": "4.6.4", - "@airgap/beacon-transport-walletconnect": "4.6.4", - "@airgap/beacon-ui": "4.6.4", + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-transport-matrix": "4.7.0", + "@airgap/beacon-transport-postmessage": "4.7.0", + "@airgap/beacon-transport-walletconnect": "4.7.0", + "@airgap/beacon-ui": "4.7.0", "broadcast-channel": "^7.1.0" } }, "node_modules/@airgap/beacon-sdk": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-sdk/-/beacon-sdk-4.6.4.tgz", - "integrity": "sha512-cr73huucy9zT23oBfAlJ46RxufNt9GZ/LXu+QUUHWUymFsCOL53q6mEZh4sAOKMX9tvT44IWJjt/sz4AiN3UHQ==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-sdk/-/beacon-sdk-4.7.0.tgz", + "integrity": "sha512-ey/b9YQUhSQpLLCrrdHn2++mEllEypvsUTAeu63d2Yc/GZ58BDPyknkEJL1X9GjsyXoYdAz1/rJq3dHrHOkSkQ==", "license": "ISC", "dependencies": { - "@airgap/beacon-blockchain-substrate": "4.6.4", - "@airgap/beacon-blockchain-tezos": "4.6.4", - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-dapp": "4.6.4", - "@airgap/beacon-transport-matrix": "4.6.4", - "@airgap/beacon-transport-postmessage": "4.6.4", - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-ui": "4.6.4", - "@airgap/beacon-utils": "4.6.4", - "@airgap/beacon-wallet": "4.6.4" + "@airgap/beacon-blockchain-substrate": "4.7.0", + "@airgap/beacon-blockchain-tezos": "4.7.0", + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-dapp": "4.7.0", + "@airgap/beacon-transport-matrix": "4.7.0", + "@airgap/beacon-transport-postmessage": "4.7.0", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-ui": "4.7.0", + "@airgap/beacon-utils": "4.7.0", + "@airgap/beacon-wallet": "4.7.0" } }, "node_modules/@airgap/beacon-transport-matrix": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-matrix/-/beacon-transport-matrix-4.6.4.tgz", - "integrity": "sha512-WzNQy3HhJ01/ym0+jLcFEWstpWoCi0SAV794hchc8oTl6z+IyppYgIPlWxtt69JlmDcpQEVz6mnxekVUbmj1Ww==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-matrix/-/beacon-transport-matrix-4.7.0.tgz", + "integrity": "sha512-22o6bluMwePg+ekQD10HD9LNikAiMv3UNzouzlj4mFZgRn7BVFSyuwMQvFQ6JnsG8H7zvNT2+hlwrYfGLpaSbw==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-utils": "4.6.4", + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-utils": "4.7.0", "axios": "^1.8.4" } }, "node_modules/@airgap/beacon-transport-postmessage": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-postmessage/-/beacon-transport-postmessage-4.6.4.tgz", - "integrity": "sha512-IwLWw/zSBw2zm9PDfRXpIHWTkOOBfx3M51OniA7i/wJ815h7hsZ31rDFGj4bjQgLl7wpPDKlQxVuYrkUx4kNmw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-postmessage/-/beacon-transport-postmessage-4.7.0.tgz", + "integrity": "sha512-3+qLeeBEmIm74XcG6xYnxnjOf4GwvLGB89DgdjUB/Qovw0hvFtMsxomh/U52q5b4vb/fr8Rd4EmC1BGYFL9cNQ==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-utils": "4.6.4" + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-utils": "4.7.0" } }, "node_modules/@airgap/beacon-transport-walletconnect": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-walletconnect/-/beacon-transport-walletconnect-4.6.4.tgz", - "integrity": "sha512-3/TBSliZ7n+R7DA5KqQ8rDEPqg7fcv/aAN+0U+8O6KxVHVQamtLjdaYj6EO52IjDm/Afaul5gIueVfVk9iiFNw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-walletconnect/-/beacon-transport-walletconnect-4.7.0.tgz", + "integrity": "sha512-mwfnQ+rplc9f0I0z2x86tPA2gLgTc17Sc+xP9vTsR0niExntH9K7+U4QxPCgGav/plnA5ubzi/owLE+FaBEs4Q==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-utils": "4.6.4", + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-utils": "4.7.0", "@walletconnect/sign-client": "2.18.0", "elliptic": "^6.6.1" } }, "node_modules/@airgap/beacon-types": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-types/-/beacon-types-4.6.4.tgz", - "integrity": "sha512-QvxVcW0LMOJCobdSgfeuPdMVEWN4FNoITCMYSwqZzvwtZ7LNK7REYjIndh+Vfu0QPwPYBeAl4P1ne7Ll28BZ/w==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-types/-/beacon-types-4.7.0.tgz", + "integrity": "sha512-J6z+WBnJhTL8HVyW3cXL3LCOIcxo/rzBPSufsvIITuUTfgCnQE4CR6p1TIyJmaXbolorug/7jtobMyTIXUK04g==", "license": "ISC", "dependencies": { "@types/chrome": "0.0.315" } }, "node_modules/@airgap/beacon-ui": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-ui/-/beacon-ui-4.6.4.tgz", - "integrity": "sha512-NTWc+rr/LqGvYEZkDAFRYRirgKBpwea4RkdCE9vEQZwatxfizUox5gWoNsHkB0B4SJvJIWHM7Xlt7dPwNpQ3ng==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-ui/-/beacon-ui-4.7.0.tgz", + "integrity": "sha512-6R5teYH6oEGxNSNjs+HfFWryUxqoeajHJ+l55FSXYCzQlKBUpqz2cG7ZIzsr83N1bvARc4RJ8j2FLutYvCYttA==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-transport-postmessage": "4.6.4", - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-utils": "4.6.4", + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-transport-postmessage": "4.7.0", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-utils": "4.7.0", "@walletconnect/utils": "2.18.0", "qrcode-svg": "^1.1.0", "react": "^19.1.0", @@ -319,24 +319,24 @@ } }, "node_modules/@airgap/beacon-ui/node_modules/react": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", - "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", + "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/@airgap/beacon-ui/node_modules/react-dom": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", - "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", + "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", "license": "MIT", "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { - "react": "^19.2.3" + "react": "^19.2.4" } }, "node_modules/@airgap/beacon-ui/node_modules/scheduler": { @@ -346,9 +346,9 @@ "license": "MIT" }, "node_modules/@airgap/beacon-utils": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-utils/-/beacon-utils-4.6.4.tgz", - "integrity": "sha512-dtf82sWCGHZ1iVJArG6fA5VChcueLsHCiinHFTeP6tR/oHpyrPLqQ+fC0j1cgXrPzmltg0E6fe0MbfN7EyChxg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-utils/-/beacon-utils-4.7.0.tgz", + "integrity": "sha512-QIE927Q55yuPVXoKfoabPJm2/lpbgSHAaXPpvjjyfeEnXbs5hMsTVo5AyMkQFEBRalL1UIchpPB2/+iJ5YisEg==", "license": "ISC", "dependencies": { "@stablelib/ed25519": "^2.0.2", @@ -443,14 +443,14 @@ } }, "node_modules/@airgap/beacon-wallet": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-wallet/-/beacon-wallet-4.6.4.tgz", - "integrity": "sha512-dc1bfQJvY//dgcX1RlbLWG8EMlQuhci5ZtdgmUBk0fCac37WAbDpx1+Y08+WjIWD6iI+haWcIAj2mxDr3wnroA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-wallet/-/beacon-wallet-4.7.0.tgz", + "integrity": "sha512-5p2cMTZVpAPbTskKokZ0CIc0i+FeyHeRYVOiI1d81xQtxTAbFrKPM/yiyMbz3hA21zkNbJ7SKEUyWRzP0iwF2A==", "license": "ISC", "dependencies": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-transport-matrix": "4.6.4", - "@airgap/beacon-transport-postmessage": "4.6.4" + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-transport-matrix": "4.7.0", + "@airgap/beacon-transport-postmessage": "4.7.0" } }, "node_modules/@alloc/quick-lru": { @@ -2536,9 +2536,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "node_modules/@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", "license": "MIT", "engines": { "node": ">=6.9.0" @@ -4940,9 +4940,9 @@ } }, "node_modules/@stablelib/utf8": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/utf8/-/utf8-2.0.1.tgz", - "integrity": "sha512-7+C2Iap42fbLyoKMaEIIDSb1TrcQVo+lGDItYAwb2JoAJr7QffyuDnbtvV/qzTyokOIMBrJgT+Rpsp1bPR8SjA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@stablelib/utf8/-/utf8-2.1.0.tgz", + "integrity": "sha512-peZgjgrPYOvjbJcVp91yYQLocr/qw5zcLsQBL+vH3D/d0IS+Cvcsbvlu+LLEcG8sVbkWMxr0ZABhY/0t3JMh0w==", "license": "MIT" }, "node_modules/@stablelib/wipe": { @@ -6390,33 +6390,36 @@ } }, "node_modules/@walletconnect/core/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@walletconnect/core/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" + "version": "11.2.6", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", + "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } }, "node_modules/@walletconnect/core/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", "license": "MIT", "engines": { - "node": ">= 14.18.0" + "node": ">= 20.19.0" }, "funding": { "type": "individual", @@ -6424,19 +6427,19 @@ } }, "node_modules/@walletconnect/core/node_modules/unstorage": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.3.tgz", - "integrity": "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.4.tgz", + "integrity": "sha512-fHK0yNg38tBiJKp/Vgsq4j0JEsCmgqH58HAn707S7zGkArbZsVr/CwINoi+nh3h98BRCwKvx1K3Xg9u3VV83sw==", "license": "MIT", "dependencies": { "anymatch": "^3.1.3", - "chokidar": "^4.0.3", + "chokidar": "^5.0.0", "destr": "^2.0.5", - "h3": "^1.15.4", - "lru-cache": "^10.4.3", + "h3": "^1.15.5", + "lru-cache": "^11.2.0", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", - "ufo": "^1.6.1" + "ufo": "^1.6.3" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", @@ -6445,14 +6448,14 @@ "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", - "@capacitor/preferences": "^6.0.3 || ^7.0.0", + "@capacitor/preferences": "^6 || ^7 || ^8", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", - "@vercel/kv": "^1.0.1", + "@vercel/kv": "^1 || ^2 || ^3", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", @@ -6707,33 +6710,36 @@ } }, "node_modules/@walletconnect/types/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@walletconnect/types/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" + "version": "11.2.6", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", + "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } }, "node_modules/@walletconnect/types/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", "license": "MIT", "engines": { - "node": ">= 14.18.0" + "node": ">= 20.19.0" }, "funding": { "type": "individual", @@ -6741,19 +6747,19 @@ } }, "node_modules/@walletconnect/types/node_modules/unstorage": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.3.tgz", - "integrity": "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.4.tgz", + "integrity": "sha512-fHK0yNg38tBiJKp/Vgsq4j0JEsCmgqH58HAn707S7zGkArbZsVr/CwINoi+nh3h98BRCwKvx1K3Xg9u3VV83sw==", "license": "MIT", "dependencies": { "anymatch": "^3.1.3", - "chokidar": "^4.0.3", + "chokidar": "^5.0.0", "destr": "^2.0.5", - "h3": "^1.15.4", - "lru-cache": "^10.4.3", + "h3": "^1.15.5", + "lru-cache": "^11.2.0", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", - "ufo": "^1.6.1" + "ufo": "^1.6.3" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", @@ -6762,14 +6768,14 @@ "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", - "@capacitor/preferences": "^6.0.3 || ^7.0.0", + "@capacitor/preferences": "^6 || ^7 || ^8", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", - "@vercel/kv": "^1.0.1", + "@vercel/kv": "^1 || ^2 || ^3", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", @@ -6896,33 +6902,36 @@ } }, "node_modules/@walletconnect/utils/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@walletconnect/utils/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" + "version": "11.2.6", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", + "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } }, "node_modules/@walletconnect/utils/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==", "license": "MIT", "engines": { - "node": ">= 14.18.0" + "node": ">= 20.19.0" }, "funding": { "type": "individual", @@ -6930,19 +6939,19 @@ } }, "node_modules/@walletconnect/utils/node_modules/unstorage": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.3.tgz", - "integrity": "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.4.tgz", + "integrity": "sha512-fHK0yNg38tBiJKp/Vgsq4j0JEsCmgqH58HAn707S7zGkArbZsVr/CwINoi+nh3h98BRCwKvx1K3Xg9u3VV83sw==", "license": "MIT", "dependencies": { "anymatch": "^3.1.3", - "chokidar": "^4.0.3", + "chokidar": "^5.0.0", "destr": "^2.0.5", - "h3": "^1.15.4", - "lru-cache": "^10.4.3", + "h3": "^1.15.5", + "lru-cache": "^11.2.0", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", - "ufo": "^1.6.1" + "ufo": "^1.6.3" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", @@ -6951,14 +6960,14 @@ "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", - "@capacitor/preferences": "^6.0.3 || ^7.0.0", + "@capacitor/preferences": "^6 || ^7 || ^8", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/functions": "^2.2.12 || ^3.0.0", - "@vercel/kv": "^1.0.1", + "@vercel/kv": "^1 || ^2 || ^3", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", @@ -7742,13 +7751,13 @@ } }, "node_modules/axios": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", - "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", + "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, @@ -8221,12 +8230,12 @@ } }, "node_modules/broadcast-channel": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/broadcast-channel/-/broadcast-channel-7.2.0.tgz", - "integrity": "sha512-JgraikEriG/TxBUi2W/w2O0jhHjXZUtXAvCZH0Yr3whjxYVgAg0hSe6r/teM+I5H5Q/q6RhyuKdC2pHNlFyepQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/broadcast-channel/-/broadcast-channel-7.3.0.tgz", + "integrity": "sha512-UHPhLBQKfQ8OmMFMpmPfO5dRakyA1vsfiDGWTYNvChYol65tbuhivPEGgZZiuetorvExdvxaWiBy/ym1Ty08yA==", "license": "MIT", "dependencies": { - "@babel/runtime": "7.28.4", + "@babel/runtime": "7.28.6", "oblivious-set": "2.0.0", "p-queue": "6.6.2", "unload": "2.4.1" @@ -11452,15 +11461,16 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -11956,9 +11966,9 @@ } }, "node_modules/h3": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.4.tgz", - "integrity": "sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.5.tgz", + "integrity": "sha512-xEyq3rSl+dhGX2Lm0+eFQIAzlDN6Fs0EcC4f7BNUmzaRX/PTzeuM+Tr2lHB8FoXggsQIeXLj8EDVgs5ywxyxmg==", "license": "MIT", "dependencies": { "cookie-es": "^1.2.2", @@ -11966,9 +11976,9 @@ "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", - "node-mock-http": "^1.0.2", + "node-mock-http": "^1.0.4", "radix3": "^1.1.2", - "ufo": "^1.6.1", + "ufo": "^1.6.3", "uncrypto": "^0.1.3" } }, @@ -21237,9 +21247,9 @@ } }, "node_modules/ufo": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", - "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz", + "integrity": "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==", "license": "MIT" }, "node_modules/uint8arrays": { @@ -22499,30 +22509,30 @@ "integrity": "sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==" }, "@airgap/beacon-blockchain-substrate": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-substrate/-/beacon-blockchain-substrate-4.6.4.tgz", - "integrity": "sha512-UATNQ2EtdKMuEJFdJUILg1PbWJ54TBBOBxTrjPnM2pzEIfriEJBlyYLASKT/32vLoZJo524o/hGouyQfdnqfxA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-substrate/-/beacon-blockchain-substrate-4.7.0.tgz", + "integrity": "sha512-b0cM46Ucw5EhaFHjEvVnUUcK0r/mInSgyqhdR2IUKvBYYeLySSGMxMXoiou4SpQFsS0Vu9GsL38kDxa/wuhX7g==", "requires": { - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-ui": "4.6.4" + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-ui": "4.7.0" } }, "@airgap/beacon-blockchain-tezos": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-tezos/-/beacon-blockchain-tezos-4.6.4.tgz", - "integrity": "sha512-xCgQ0fzdZDbH6ZC/t2PvrMPHaBnb+t3TL/0UlwEoFGelSP7wII/ZIHqmyGj+v/5AhbcoC4Pf0L6qBmdI9gl7BQ==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-blockchain-tezos/-/beacon-blockchain-tezos-4.7.0.tgz", + "integrity": "sha512-x3ZTVolbYn+PZrzZFYED4Ow86ONiCVrBSDTkzfh4EvxuUbvsgTue+jwqrxH9bA9OcbFal/1VJXjpfROAkcO+Ww==", "requires": { - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-ui": "4.6.4" + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-ui": "4.7.0" } }, "@airgap/beacon-core": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-core/-/beacon-core-4.6.4.tgz", - "integrity": "sha512-9SL0ABl9Aqe9DPtiulo6uan4r02/XATKtKEWOjizgSYxIh+AIhgoIZOwziVjCBklImhy91NG7iplNdsspFvKuA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-core/-/beacon-core-4.7.0.tgz", + "integrity": "sha512-RyPf6KaJcVgWbzef6CvAv5PbkhuF2BDMpkToXliYU0mXibUjkbGJL0bXwEJd2l0jlsxjnlXaE/V78MXhDi8o1Q==", "requires": { - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-utils": "4.6.4", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-utils": "4.7.0", "@stablelib/ed25519": "^2.0.2", "@stablelib/nacl": "^2.0.1", "@stablelib/utf8": "^2.0.1", @@ -22608,84 +22618,84 @@ } }, "@airgap/beacon-dapp": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-dapp/-/beacon-dapp-4.6.4.tgz", - "integrity": "sha512-HX8ZRzX2YPiXFNIU4J/bjtolGokefN2nadQW50uwbfRi2FxhV00WZuetTPYeCIe3qSaABr+aXzMMfF1LX8t0aw==", - "requires": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-transport-matrix": "4.6.4", - "@airgap/beacon-transport-postmessage": "4.6.4", - "@airgap/beacon-transport-walletconnect": "4.6.4", - "@airgap/beacon-ui": "4.6.4", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-dapp/-/beacon-dapp-4.7.0.tgz", + "integrity": "sha512-tXMDrvzAg3kXPF3p2FpwzHgnIheG8Ce9CJgZsMD8piY9YTxELrZp1V2nStnX/bwTrhqHsszKn+knJdLv6+PvKw==", + "requires": { + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-transport-matrix": "4.7.0", + "@airgap/beacon-transport-postmessage": "4.7.0", + "@airgap/beacon-transport-walletconnect": "4.7.0", + "@airgap/beacon-ui": "4.7.0", "broadcast-channel": "^7.1.0" } }, "@airgap/beacon-sdk": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-sdk/-/beacon-sdk-4.6.4.tgz", - "integrity": "sha512-cr73huucy9zT23oBfAlJ46RxufNt9GZ/LXu+QUUHWUymFsCOL53q6mEZh4sAOKMX9tvT44IWJjt/sz4AiN3UHQ==", - "requires": { - "@airgap/beacon-blockchain-substrate": "4.6.4", - "@airgap/beacon-blockchain-tezos": "4.6.4", - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-dapp": "4.6.4", - "@airgap/beacon-transport-matrix": "4.6.4", - "@airgap/beacon-transport-postmessage": "4.6.4", - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-ui": "4.6.4", - "@airgap/beacon-utils": "4.6.4", - "@airgap/beacon-wallet": "4.6.4" + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-sdk/-/beacon-sdk-4.7.0.tgz", + "integrity": "sha512-ey/b9YQUhSQpLLCrrdHn2++mEllEypvsUTAeu63d2Yc/GZ58BDPyknkEJL1X9GjsyXoYdAz1/rJq3dHrHOkSkQ==", + "requires": { + "@airgap/beacon-blockchain-substrate": "4.7.0", + "@airgap/beacon-blockchain-tezos": "4.7.0", + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-dapp": "4.7.0", + "@airgap/beacon-transport-matrix": "4.7.0", + "@airgap/beacon-transport-postmessage": "4.7.0", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-ui": "4.7.0", + "@airgap/beacon-utils": "4.7.0", + "@airgap/beacon-wallet": "4.7.0" } }, "@airgap/beacon-transport-matrix": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-matrix/-/beacon-transport-matrix-4.6.4.tgz", - "integrity": "sha512-WzNQy3HhJ01/ym0+jLcFEWstpWoCi0SAV794hchc8oTl6z+IyppYgIPlWxtt69JlmDcpQEVz6mnxekVUbmj1Ww==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-matrix/-/beacon-transport-matrix-4.7.0.tgz", + "integrity": "sha512-22o6bluMwePg+ekQD10HD9LNikAiMv3UNzouzlj4mFZgRn7BVFSyuwMQvFQ6JnsG8H7zvNT2+hlwrYfGLpaSbw==", "requires": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-utils": "4.6.4", + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-utils": "4.7.0", "axios": "^1.8.4" } }, "@airgap/beacon-transport-postmessage": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-postmessage/-/beacon-transport-postmessage-4.6.4.tgz", - "integrity": "sha512-IwLWw/zSBw2zm9PDfRXpIHWTkOOBfx3M51OniA7i/wJ815h7hsZ31rDFGj4bjQgLl7wpPDKlQxVuYrkUx4kNmw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-postmessage/-/beacon-transport-postmessage-4.7.0.tgz", + "integrity": "sha512-3+qLeeBEmIm74XcG6xYnxnjOf4GwvLGB89DgdjUB/Qovw0hvFtMsxomh/U52q5b4vb/fr8Rd4EmC1BGYFL9cNQ==", "requires": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-utils": "4.6.4" + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-utils": "4.7.0" } }, "@airgap/beacon-transport-walletconnect": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-walletconnect/-/beacon-transport-walletconnect-4.6.4.tgz", - "integrity": "sha512-3/TBSliZ7n+R7DA5KqQ8rDEPqg7fcv/aAN+0U+8O6KxVHVQamtLjdaYj6EO52IjDm/Afaul5gIueVfVk9iiFNw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-transport-walletconnect/-/beacon-transport-walletconnect-4.7.0.tgz", + "integrity": "sha512-mwfnQ+rplc9f0I0z2x86tPA2gLgTc17Sc+xP9vTsR0niExntH9K7+U4QxPCgGav/plnA5ubzi/owLE+FaBEs4Q==", "requires": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-utils": "4.6.4", + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-utils": "4.7.0", "@walletconnect/sign-client": "2.18.0", "elliptic": "^6.6.1" } }, "@airgap/beacon-types": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-types/-/beacon-types-4.6.4.tgz", - "integrity": "sha512-QvxVcW0LMOJCobdSgfeuPdMVEWN4FNoITCMYSwqZzvwtZ7LNK7REYjIndh+Vfu0QPwPYBeAl4P1ne7Ll28BZ/w==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-types/-/beacon-types-4.7.0.tgz", + "integrity": "sha512-J6z+WBnJhTL8HVyW3cXL3LCOIcxo/rzBPSufsvIITuUTfgCnQE4CR6p1TIyJmaXbolorug/7jtobMyTIXUK04g==", "requires": { "@types/chrome": "0.0.315" } }, "@airgap/beacon-ui": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-ui/-/beacon-ui-4.6.4.tgz", - "integrity": "sha512-NTWc+rr/LqGvYEZkDAFRYRirgKBpwea4RkdCE9vEQZwatxfizUox5gWoNsHkB0B4SJvJIWHM7Xlt7dPwNpQ3ng==", - "requires": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-transport-postmessage": "4.6.4", - "@airgap/beacon-types": "4.6.4", - "@airgap/beacon-utils": "4.6.4", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-ui/-/beacon-ui-4.7.0.tgz", + "integrity": "sha512-6R5teYH6oEGxNSNjs+HfFWryUxqoeajHJ+l55FSXYCzQlKBUpqz2cG7ZIzsr83N1bvARc4RJ8j2FLutYvCYttA==", + "requires": { + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-transport-postmessage": "4.7.0", + "@airgap/beacon-types": "4.7.0", + "@airgap/beacon-utils": "4.7.0", "@walletconnect/utils": "2.18.0", "qrcode-svg": "^1.1.0", "react": "^19.1.0", @@ -22693,14 +22703,14 @@ }, "dependencies": { "react": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", - "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==" + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", + "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==" }, "react-dom": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", - "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", + "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", "requires": { "scheduler": "^0.27.0" } @@ -22713,9 +22723,9 @@ } }, "@airgap/beacon-utils": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-utils/-/beacon-utils-4.6.4.tgz", - "integrity": "sha512-dtf82sWCGHZ1iVJArG6fA5VChcueLsHCiinHFTeP6tR/oHpyrPLqQ+fC0j1cgXrPzmltg0E6fe0MbfN7EyChxg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-utils/-/beacon-utils-4.7.0.tgz", + "integrity": "sha512-QIE927Q55yuPVXoKfoabPJm2/lpbgSHAaXPpvjjyfeEnXbs5hMsTVo5AyMkQFEBRalL1UIchpPB2/+iJ5YisEg==", "requires": { "@stablelib/ed25519": "^2.0.2", "@stablelib/nacl": "^2.0.1", @@ -22801,13 +22811,13 @@ } }, "@airgap/beacon-wallet": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/@airgap/beacon-wallet/-/beacon-wallet-4.6.4.tgz", - "integrity": "sha512-dc1bfQJvY//dgcX1RlbLWG8EMlQuhci5ZtdgmUBk0fCac37WAbDpx1+Y08+WjIWD6iI+haWcIAj2mxDr3wnroA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@airgap/beacon-wallet/-/beacon-wallet-4.7.0.tgz", + "integrity": "sha512-5p2cMTZVpAPbTskKokZ0CIc0i+FeyHeRYVOiI1d81xQtxTAbFrKPM/yiyMbz3hA21zkNbJ7SKEUyWRzP0iwF2A==", "requires": { - "@airgap/beacon-core": "4.6.4", - "@airgap/beacon-transport-matrix": "4.6.4", - "@airgap/beacon-transport-postmessage": "4.6.4" + "@airgap/beacon-core": "4.7.0", + "@airgap/beacon-transport-matrix": "4.7.0", + "@airgap/beacon-transport-postmessage": "4.7.0" } }, "@alloc/quick-lru": { @@ -24201,9 +24211,9 @@ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==" }, "@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==" + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==" }, "@babel/runtime-corejs3": { "version": "7.23.5", @@ -25855,9 +25865,9 @@ } }, "@stablelib/utf8": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@stablelib/utf8/-/utf8-2.0.1.tgz", - "integrity": "sha512-7+C2Iap42fbLyoKMaEIIDSb1TrcQVo+lGDItYAwb2JoAJr7QffyuDnbtvV/qzTyokOIMBrJgT+Rpsp1bPR8SjA==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@stablelib/utf8/-/utf8-2.1.0.tgz", + "integrity": "sha512-peZgjgrPYOvjbJcVp91yYQLocr/qw5zcLsQBL+vH3D/d0IS+Cvcsbvlu+LLEcG8sVbkWMxr0ZABhY/0t3JMh0w==" }, "@stablelib/wipe": { "version": "1.0.1", @@ -26986,36 +26996,36 @@ } }, "chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "requires": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" } }, "lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + "version": "11.2.6", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", + "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==" }, "readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==" }, "unstorage": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.3.tgz", - "integrity": "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.4.tgz", + "integrity": "sha512-fHK0yNg38tBiJKp/Vgsq4j0JEsCmgqH58HAn707S7zGkArbZsVr/CwINoi+nh3h98BRCwKvx1K3Xg9u3VV83sw==", "requires": { "anymatch": "^3.1.3", - "chokidar": "^4.0.3", + "chokidar": "^5.0.0", "destr": "^2.0.5", - "h3": "^1.15.4", - "lru-cache": "^10.4.3", + "h3": "^1.15.5", + "lru-cache": "^11.2.0", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", - "ufo": "^1.6.1" + "ufo": "^1.6.3" } } } @@ -27179,36 +27189,36 @@ } }, "chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "requires": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" } }, "lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + "version": "11.2.6", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", + "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==" }, "readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==" }, "unstorage": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.3.tgz", - "integrity": "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.4.tgz", + "integrity": "sha512-fHK0yNg38tBiJKp/Vgsq4j0JEsCmgqH58HAn707S7zGkArbZsVr/CwINoi+nh3h98BRCwKvx1K3Xg9u3VV83sw==", "requires": { "anymatch": "^3.1.3", - "chokidar": "^4.0.3", + "chokidar": "^5.0.0", "destr": "^2.0.5", - "h3": "^1.15.4", - "lru-cache": "^10.4.3", + "h3": "^1.15.5", + "lru-cache": "^11.2.0", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", - "ufo": "^1.6.1" + "ufo": "^1.6.3" } } } @@ -27256,36 +27266,36 @@ } }, "chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "requires": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" } }, "lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" + "version": "11.2.6", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", + "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==" }, "readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.0.0.tgz", + "integrity": "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==" }, "unstorage": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.3.tgz", - "integrity": "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.4.tgz", + "integrity": "sha512-fHK0yNg38tBiJKp/Vgsq4j0JEsCmgqH58HAn707S7zGkArbZsVr/CwINoi+nh3h98BRCwKvx1K3Xg9u3VV83sw==", "requires": { "anymatch": "^3.1.3", - "chokidar": "^4.0.3", + "chokidar": "^5.0.0", "destr": "^2.0.5", - "h3": "^1.15.4", - "lru-cache": "^10.4.3", + "h3": "^1.15.5", + "lru-cache": "^11.2.0", "node-fetch-native": "^1.6.7", "ofetch": "^1.5.1", - "ufo": "^1.6.1" + "ufo": "^1.6.3" } } } @@ -27850,12 +27860,12 @@ "integrity": "sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==" }, "axios": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", - "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", + "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", "requires": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" }, "dependencies": { @@ -28229,11 +28239,11 @@ } }, "broadcast-channel": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/broadcast-channel/-/broadcast-channel-7.2.0.tgz", - "integrity": "sha512-JgraikEriG/TxBUi2W/w2O0jhHjXZUtXAvCZH0Yr3whjxYVgAg0hSe6r/teM+I5H5Q/q6RhyuKdC2pHNlFyepQ==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/broadcast-channel/-/broadcast-channel-7.3.0.tgz", + "integrity": "sha512-UHPhLBQKfQ8OmMFMpmPfO5dRakyA1vsfiDGWTYNvChYol65tbuhivPEGgZZiuetorvExdvxaWiBy/ym1Ty08yA==", "requires": { - "@babel/runtime": "7.28.4", + "@babel/runtime": "7.28.6", "oblivious-set": "2.0.0", "p-queue": "6.6.2", "unload": "2.4.1" @@ -30679,9 +30689,9 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==" }, "follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==" }, "for-each": { "version": "0.3.5", @@ -31011,18 +31021,18 @@ } }, "h3": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.4.tgz", - "integrity": "sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.5.tgz", + "integrity": "sha512-xEyq3rSl+dhGX2Lm0+eFQIAzlDN6Fs0EcC4f7BNUmzaRX/PTzeuM+Tr2lHB8FoXggsQIeXLj8EDVgs5ywxyxmg==", "requires": { "cookie-es": "^1.2.2", "crossws": "^0.3.5", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", - "node-mock-http": "^1.0.2", + "node-mock-http": "^1.0.4", "radix3": "^1.1.2", - "ufo": "^1.6.1", + "ufo": "^1.6.3", "uncrypto": "^0.1.3" } }, @@ -37798,9 +37808,9 @@ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==" }, "ufo": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", - "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==" + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz", + "integrity": "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==" }, "uint8arrays": { "version": "3.1.0", diff --git a/src/ui/package.json b/src/ui/package.json index 5be1d6c9..8ff94114 100644 --- a/src/ui/package.json +++ b/src/ui/package.json @@ -3,7 +3,7 @@ "version": "0.2.0", "private": true, "dependencies": { - "@airgap/beacon-sdk": "^4.6.4", + "@airgap/beacon-sdk": "^4.7.0", "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", @@ -58,8 +58,9 @@ "vm-browserify": "^1.1.2" }, "scripts": { - "start": "DISABLE_ESLINT_PLUGIN=true REACT_APP_ENV=dev npm run patch && react-app-rewired start", - "mainnet": "DISABLE_ESLINT_PLUGIN=true npm run patch && react-app-rewired start", + "start": "DISABLE_ESLINT_PLUGIN=true REACT_APP_ENV=shadownet npm run patch && react-app-rewired start", + "mainnet": "DISABLE_ESLINT_PLUGIN=true REACT_APP_ENV=mainnet npm run patch && react-app-rewired start", + "tezlink:shadownet": "DISABLE_ESLINT_PLUGIN=true REACT_APP_ENV=tezlink-shadownet npm run patch && react-app-rewired start", "patch": "patch-package", "build": "npm run patch && tsc && react-app-rewired build", "test": "react-app-rewired test", From 3faf355d9897145843c849db59be3148d1ce7771 Mon Sep 17 00:00:00 2001 From: "ilya.razievskij" Date: Thu, 12 Mar 2026 17:07:57 +0200 Subject: [PATCH 4/4] feat: application update --- src/ui/src/components/Constants/index.js | 51 ++++++++++++------- .../Dashboard/BorrowMarketTokenTable.tsx | 13 ++--- src/ui/src/components/Header/index.js | 2 +- .../components/StatusModal/PendingModal.js | 10 ++-- src/ui/src/reduxContent/nodes/actions.js | 9 ++-- src/ui/src/util/index.js | 18 ++++++- 6 files changed, 62 insertions(+), 41 deletions(-) diff --git a/src/ui/src/components/Constants/index.js b/src/ui/src/components/Constants/index.js index e31e272c..ae5625c0 100644 --- a/src/ui/src/components/Constants/index.js +++ b/src/ui/src/components/Constants/index.js @@ -1,4 +1,6 @@ -import { AssetType, testnetAddresses, mainnetAddresses } from 'tezoslendingplatformjs'; +import { + AssetType, testnetAddresses, mainnetAddresses, tezlinkShadownetAddresses +} from 'tezoslendingplatformjs'; import fUSDtz from '../../assets/fusdtz.svg'; import fXTZ from '../../assets/fXTZ.svg'; import fUSDT from '../../assets/fusdt.svg'; @@ -24,7 +26,20 @@ import fstXTZ from '../../assets/fstXTZ.svg'; // import fOXTZ from '../../assets/foxtz.svg'; // import fWTZ from '../../assets/fwtz.svg'; -const addresses = process.env.REACT_APP_ENV=="dev"? testnetAddresses : mainnetAddresses; +export const getAddresses = () => { + switch (process.env.REACT_APP_ENV) { + case 'shadownet': + return testnetAddresses; + case 'tezlink-shadownet': + return tezlinkShadownetAddresses; + case 'mainnet': + return mainnetAddresses; + default: + return mainnetAddresses; + } +}; + +const addresses = getAddresses(); export const tokens = [ { @@ -34,7 +49,7 @@ export const tokens = [ fLogo: fXTZ, banner: 'Tez', assetType: AssetType.XTZ, - address: '' + address: '' }, { title: 'USDtz', @@ -43,7 +58,7 @@ export const tokens = [ fLogo: fUSDtz, banner: 'USDtz', assetType: AssetType.USD, - address: addresses.underlying.USD?.address ?? '' + address: addresses.underlying.USD?.address ?? '' }, { title: 'USDt', @@ -52,9 +67,9 @@ export const tokens = [ fLogo: fUSDT, banner: 'USDt', assetType: AssetType.USDT, - address: addresses.underlying.USDT?.address ?? '' + address: addresses.underlying.USDT?.address ?? '' }, - { + process.env.REACT_APP_ENV !== 'tezlink-shadownet' && { title: 'tzBTC', name: 'tzBTC', logo: tzBTC, @@ -62,7 +77,7 @@ export const tokens = [ banner: 'tzBTC', assetType: AssetType.TZBTC, visibilityThreshold: 0.0000001, - address: addresses.underlying.TZBTC?.address ?? '' + address: addresses.underlying.TZBTC?.address ?? '' }, { title: 'stXTZ', @@ -86,16 +101,16 @@ export const tokens = [ // { // title: 'WTZ', logo: wtz, fLogo: fWTZ, banner: 'WTZ', assetType: AssetType.WTZ // TODO: update fToken for WTZ // } -]; +].filter(Boolean); export const tokenColor = { - XTZ: 'rgb(51,145,246)', - USDtz: 'rgb(24,157,163)', - USDt: 'rgb(65 145 146)', - tzBTC: 'rgb(20,89,255)', - stXTZ: '#2B62F8' - // ETHtz: '#662F9D', - // BTCtz: '#F2991A', - // oXTZ: '#B52B31', - // WTZ: '#0C2C93' - // CTEZ: '#2B62F8' + XTZ: 'rgb(51,145,246)', + USDtz: 'rgb(24,157,163)', + USDt: 'rgb(65 145 146)', + tzBTC: 'rgb(20,89,255)', + stXTZ: '#2B62F8' + // ETHtz: '#662F9D', + // BTCtz: '#F2991A', + // oXTZ: '#B52B31', + // WTZ: '#0C2C93' + // CTEZ: '#2B62F8' }; diff --git a/src/ui/src/components/Dashboard/BorrowMarketTokenTable.tsx b/src/ui/src/components/Dashboard/BorrowMarketTokenTable.tsx index 432a129d..1d1be894 100644 --- a/src/ui/src/components/Dashboard/BorrowMarketTokenTable.tsx +++ b/src/ui/src/components/Dashboard/BorrowMarketTokenTable.tsx @@ -5,7 +5,7 @@ import React, { useState } from 'react'; import { useSelector } from 'react-redux'; -import { AssetType, decimals, mainnetAddresses, testnetAddresses } from 'tezoslendingplatformjs'; +import { AssetType, decimals } from 'tezoslendingplatformjs'; import BigNumber from 'bignumber.js'; import Table from '@mui/material/Table'; @@ -16,12 +16,13 @@ import TableHead from '@mui/material/TableHead'; import TableRow from '@mui/material/TableRow'; import { Button, Typography } from '@mui/material'; -import { decimalify, nFormatter, roundValue } from '../../util'; +import { decimalify, getExplorerLink, nFormatter, roundValue } from '../../util'; import AllMarketModal from '../AllMarketModal'; import TableSkeleton from '../Skeleton'; import { useStyles } from './style'; +import { getAddresses } from '../Constants'; const BorrowMarketTokenTable = (props) => { const classes = useStyles(); @@ -36,12 +37,8 @@ const BorrowMarketTokenTable = (props) => { }; const handleClickDetails = (asset: AssetType) => { - const fTokenAddress = - process.env.REACT_APP_ENV == 'dev' ? testnetAddresses.fTokens[asset] : mainnetAddresses.fTokens[asset]; - const tzktUrl = - process.env.REACT_APP_ENV == "dev" - ? `https://shadownet.tzkt.io/${fTokenAddress}/operations` - : `https://tzkt.io/${fTokenAddress}/operations`; + const fTokenAddress = getAddresses().fTokens[asset]; + const tzktUrl = `${getExplorerLink()}/${fTokenAddress}/operations`; window.open(tzktUrl, '_blank'); }; diff --git a/src/ui/src/components/Header/index.js b/src/ui/src/components/Header/index.js index bf61af92..b61dc68f 100644 --- a/src/ui/src/components/Header/index.js +++ b/src/ui/src/components/Header/index.js @@ -19,7 +19,7 @@ import { borrowCompositionAction } from "../../reduxContent/borrowComposition/ac import { LightTooltip } from "../StackedBars/style.tsx"; // eslint-disable-next-line import/no-dynamic-require -const config = require(`../../library/${process.env.REACT_APP_ENV || "prod"}-network-config.json`); +const config = require(`../../library/${process.env.REACT_APP_ENV || 'mainnet'}-network-config.json`); const Header = () => { const classes = useStyles(); diff --git a/src/ui/src/components/StatusModal/PendingModal.js b/src/ui/src/components/StatusModal/PendingModal.js index 8d7160c1..04e8198d 100644 --- a/src/ui/src/components/StatusModal/PendingModal.js +++ b/src/ui/src/components/StatusModal/PendingModal.js @@ -1,6 +1,5 @@ // eslint-disable-next-line no-use-before-define import React, { useEffect, useState } from 'react'; -import { useSelector } from 'react-redux'; import IconButton from '@mui/material/IconButton'; @@ -10,14 +9,12 @@ import confirmGif from '../../assets/confirm.gif'; import CopyIcon from '../../assets/copyIcon.svg'; import useStyles from './style'; -import { shorten } from '../../util'; +import { shorten, getExplorerLink } from '../../util'; const PendingModal = (props) => { const classes = useStyles(); const { token, tokenText, response } = props; - const { network } = useSelector((state) => state.nodes.tezosNode.conseilServerInfo); - const [transactionHash, setTransactionHash] = useState('one'); useEffect(() => { @@ -35,9 +32,8 @@ const PendingModal = (props) => { ? <> Operation hash: {' '} async (dispatch) => { dispatch({ type: GET_PROTOCOL_ADDRESSES, payload: addresses }); diff --git a/src/ui/src/util/index.js b/src/ui/src/util/index.js index f81a0b29..d7f82ffd 100644 --- a/src/ui/src/util/index.js +++ b/src/ui/src/util/index.js @@ -6,7 +6,7 @@ import bigInt from 'big-integer'; import { TezosLendingPlatform } from 'tezoslendingplatformjs'; // eslint-disable-next-line import/no-dynamic-require -const config = require(`../library/${process.env.REACT_APP_ENV || 'prod'}-network-config.json`); +const config = require(`../library/${process.env.REACT_APP_ENV || 'mainnet'}-network-config.json`); const client = new DAppClient({ name: config.dappName, network: { type: config.infra.conseilServer.network } }); @@ -79,12 +79,13 @@ export const evaluateTransaction = async (operations) => { const counter = await TezosNodeReader.getCounterForAccount(config.infra.tezosNode, address); console.log("operation", operations); + const optimizeGas = config.infra.conseilServer.network !== 'tezlink-shadownet'; const opGroup = await TezosNodeWriter.prepareOperationGroup( config.infra.tezosNode, keyStore, counter, operations, - true, + optimizeGas ); return { opGroup }; @@ -228,3 +229,16 @@ export const nFormatter = (num, formatDecimals = 4) => { .match(/^-?\d+(?:\.\d{0,2})?/) + suffix[i].symbol ); }; + +export const getExplorerLink = () => { + switch (config.infra.conseilServer.network) { + case 'mainnet': + return 'https://tzkt.io'; + case 'shadownet': + return 'https://shadownet.tzkt.io'; + case 'tezlink-shadownet': + return 'https://shadownet.tezlink.tzkt.io'; + default: + return 'https://tzkt.io'; + } +};