diff --git a/src/app/api/_data/_mock/_countries.ts b/src/app/api/_data/_countries.ts similarity index 100% rename from src/app/api/_data/_mock/_countries.ts rename to src/app/api/_data/_countries.ts diff --git a/src/app/api/_data/_mock/_mock.ts b/src/app/api/_data/_mock/_mock.ts deleted file mode 100644 index b7b37c9..0000000 --- a/src/app/api/_data/_mock/_mock.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { sub } from 'date-fns' - -import { - _id, - _ages, - _prices, - _emails, - _ratings, - _nativeS, - _nativeM, - _nativeL, - _percents, - _booleans, - _sentences, - _lastNames, - _fullNames, - _firstNames, - _descriptions, - _phoneNumbers -} from './assets' - -// ---------------------------------------------------------------------- - -export const _mock = { - id: (index: number) => _id[index], - time: (index: number) => sub(new Date(), { days: index, hours: index }), - boolean: (index: number) => _booleans[index], - // role: (index: number) => _roles[index], - // Text - // taskNames: (index: number) => _taskNames[index], - // postTitle: (index: number) => _postTitles[index], - // jobTitle: (index: number) => _jobTitles[index], - // tourName: (index: number) => _tourNames[index], - // productName: (index: number) => _productNames[index], - sentence: (index: number) => _sentences[index], - description: (index: number) => _descriptions[index], - // Contact - email: (index: number) => _emails[index], - phoneNumber: (index: number) => _phoneNumbers[index], - // fullAddress: (index: number) => _fullAddress[index], - // Name - firstName: (index: number) => _firstNames[index], - lastName: (index: number) => _lastNames[index], - fullName: (index: number) => _fullNames[index], - // companyName: (index: number) => _companyNames[index], - // Number - number: { - percent: (index: number) => _percents[index], - rating: (index: number) => _ratings[index], - age: (index: number) => _ages[index], - price: (index: number) => _prices[index], - nativeS: (index: number) => _nativeS[index], - nativeM: (index: number) => _nativeM[index], - nativeL: (index: number) => _nativeL[index] - }, - // Image - image: { - cover: (index: number) => `/assets/images/cover_1.jpg`, - avatar: (index: number) => `/assets/images/avatars/avatar_${index + 1}.jpg`, - travel: (index: number) => `/assets/images/travel_1.jpg`, - company: (index: number) => `/assets/images/company_1.png`, - product: (index: number) => `/assets/images/product_1.jpg`, - portrait: (index: number) => `/assets/images/portrait_1.jpg` - } -} diff --git a/src/app/api/_data/_mock/_others.ts b/src/app/api/_data/_mock/_others.ts deleted file mode 100644 index f66eced..0000000 --- a/src/app/api/_data/_mock/_others.ts +++ /dev/null @@ -1,52 +0,0 @@ -// ---------------------------------------------------------------------- - -export const _socials = [ - { - value: 'facebook', - name: 'FaceBook', - icon: 'eva:facebook-fill', - color: '#1877F2', - path: 'https://www.facebook.com/caitlyn.kerluke' - }, - { - value: 'instagram', - name: 'Instagram', - icon: 'ant-design:instagram-filled', - color: '#E02D69', - path: 'https://www.instagram.com/caitlyn.kerluke' - }, - { - value: 'linkedin', - name: 'Linkedin', - icon: 'eva:linkedin-fill', - color: '#007EBB', - path: 'https://www.linkedin.com/caitlyn.kerluke' - }, - { - value: 'twitter', - name: 'Twitter', - icon: 'eva:twitter-fill', - color: '#00AAEC', - path: 'https://www.twitter.com/caitlyn.kerluke' - } -] - -// ---------------------------------------------------------------------- - -export const _homePlans = [...Array(3)].map((_, index) => ({ - license: ['Standard', 'Standard Plus', 'Extended'][index], - commons: ['One end products', '12 months updates', '6 months of support'], - options: [ - 'JavaScript version', - 'TypeScript version', - 'Design Resources', - 'Commercial applications' - ], - icons: [ - '/assets/icons/platforms/ic_js.svg', - '/assets/icons/platforms/ic_ts.svg', - '/assets/icons/platforms/ic_figma.svg' - ] -})) - -// ---------------------------------------------------------------------- diff --git a/src/app/api/_data/_mock/_wallet.ts b/src/app/api/_data/_mock/_wallet.ts deleted file mode 100644 index 8e512e6..0000000 --- a/src/app/api/_data/_mock/_wallet.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { IBalance, ITransaction } from 'src/types/wallet' - -import { _mock } from './_mock' - -export const _balances: IBalance[] = [ - { - network: 'sepolia', - balance: 23432.03, - token: 'USDC', - balance_conv: { - usd: 1, - ars: 1, - brl: 1, - uyu: 1 - } - }, - { - network: 'sepolia', - balance: 1.5, - token: 'ETH', - balance_conv: { - usd: 1, - ars: 1, - brl: 1, - uyu: 1 - } - }, - { - network: 'sepolia', - balance: 1, - token: 'BTC', - balance_conv: { - usd: 1, - ars: 1, - brl: 1, - uyu: 1 - } - } -] - -export const _transactions: ITransaction[] = [ - { - id: _mock.id(2), - trx_hash: '0x469c61b085335276861a90a7dc6809c6144317f9a811c95c923a1b3b35d85c29', - wallet_from: '0x35dad65F60c1A32c9895BE97f6bcE57D32792E83', - contact_from_phone: '5491153475555', - contact_from_name: _mock.fullName(2), - contact_from_avatar_url: _mock.fullName(2), - wallet_to: '0x117b706DEF40310eF5926aB57868dAcf46605b8d', - contact_to_phone: '5491131997779', - contact_to_name: _mock.fullName(10), - contact_to_avatar_url: _mock.image.avatar(10), - type: 'transfer', - date: _mock.time(2), - status: 'completed', - amount: _mock.number.price(2), - token: 'USDC' - }, - { - id: _mock.id(3), - trx_hash: '0x5832143b88fcd1727760bc656ee61219f74a1329eee401f2f9afc2e4802a0974', - wallet_from: '0x117b706DEF40310eF5926aB57868dAcf46605b8d', - contact_from_phone: '5491131997779', - contact_from_name: _mock.fullName(10), - contact_from_avatar_url: _mock.fullName(10), - wallet_to: '0x35dad65F60c1A32c9895BE97f6bcE57D32792E83', - contact_to_phone: '5491153475555', - contact_to_name: _mock.fullName(3), - contact_to_avatar_url: _mock.image.avatar(3), - type: 'transfer', - - date: _mock.time(3), - status: 'completed', - amount: _mock.number.price(3), - token: 'USDC' - }, - { - id: _mock.id(4), - wallet_from: '0x35dad65F60c1A32c9895BE97f6bcE57D32792E83', - trx_hash: '0x3eb9d217ff24604ad149c61487dd166296982849eb87d9992988f21ee22fdc17', - contact_from_phone: '5491153475555', - contact_from_name: _mock.fullName(4), - contact_from_avatar_url: _mock.fullName(4), - wallet_to: '0x117b706DEF40310eF5926aB57868dAcf46605b8d', - contact_to_phone: '5491131997779', - contact_to_name: _mock.fullName(10), - contact_to_avatar_url: _mock.image.avatar(10), - type: 'transfer', - - date: _mock.time(4), - status: 'failed', - amount: _mock.number.price(4), - token: 'USDC' - }, - { - id: _mock.id(5), - trx_hash: '0x4f6c005226909336066dd8f199bb0e0346175e53e1a53c50231b2395ba770b67', - wallet_from: '0x117b706DEF40310eF5926aB57868dAcf46605b8d', - contact_from_phone: '5491131997779', - contact_from_name: _mock.fullName(10), - contact_from_avatar_url: _mock.fullName(10), - wallet_to: '0x35dad65F60c1A32c9895BE97f6bcE57D32792E83', - contact_to_phone: '5491153475555', - contact_to_name: _mock.fullName(5), - contact_to_avatar_url: _mock.image.avatar(5), - type: 'transfer', - - date: _mock.time(5), - status: 'completed', - amount: _mock.number.price(5), - token: 'USDC' - }, - { - id: _mock.id(6), - trx_hash: '0x1fb00e771fdac89017694d22504a45568785c903c568fa6ffb40641f9ea59a2f', - wallet_from: '0x117b706DEF40310eF5926aB57868dAcf46605b8d', - contact_from_phone: '5491131997779', - contact_from_name: _mock.fullName(10), - contact_from_avatar_url: _mock.fullName(10), - wallet_to: '0x35dad65F60c1A32c9895BE97f6bcE57D32792E83', - contact_to_phone: '5491153475555', - contact_to_name: _mock.fullName(6), - contact_to_avatar_url: _mock.image.avatar(6), - type: 'transfer', - date: _mock.time(6), - status: 'failed', - amount: _mock.number.price(6), - token: 'USDC' - } -] diff --git a/src/app/api/_data/_mock/assets.ts b/src/app/api/_data/_mock/assets.ts deleted file mode 100644 index 6a244b6..0000000 --- a/src/app/api/_data/_mock/assets.ts +++ /dev/null @@ -1,268 +0,0 @@ -// ---------------------------------------------------------------------- - -export const _id = [...Array(40)].map( - (_, index) => `e99f09a7-dd88-49d5-b1c8-1daf80c2d7b${index + 1}` -) - -// ---------------------------------------------------------------------- - -export const _booleans = [ - true, - true, - true, - false, - false, - true, - false, - false, - false, - false, - true, - true, - true, - false, - false, - false, - true, - false, - false, - false, - true, - false, - false, - true -] - -// ---------------------------------------------------------------------- - -export const _emails = [ - 'nannie_abernathy70@yahoo.com', - 'ashlynn_ohara62@gmail.com', - 'milo.farrell@hotmail.com', - 'violet.ratke86@yahoo.com', - 'letha_lubowitz24@yahoo.com', - 'aditya_greenfelder31@gmail.com', - 'lenna_bergnaum27@hotmail.com', - 'luella.ryan33@gmail.com', - 'joana.simonis84@gmail.com', - 'marjolaine_white94@gmail.com', - 'vergie_block82@hotmail.com', - 'vito.hudson@hotmail.com', - 'tyrel_greenholt@gmail.com', - 'dwight.block85@yahoo.com', - 'mireya13@hotmail.com', - 'dasia_jenkins@hotmail.com', - 'benny89@yahoo.com', - 'dawn.goyette@gmail.com', - 'zella_hickle4@yahoo.com', - 'avery43@hotmail.com', - 'olen_legros@gmail.com', - 'jimmie.gerhold73@hotmail.com', - 'genevieve.powlowski@hotmail.com', - 'louie.kuphal39@gmail.com' -] - -// ---------------------------------------------------------------------- - -export const _fullNames = [ - 'Jayvion Simon', - 'Lucian Obrien', - 'Deja Brady', - 'Harrison Stein', - 'Reece Chung', - 'Lainey Davidson', - 'Cristopher Cardenas', - 'Melanie Noble', - 'Chase Day', - 'Shawn Manning', - 'Soren Durham', - 'Cortez Herring', - 'Brycen Jimenez', - 'Giana Brandt', - 'Aspen Schmitt', - 'Colten Aguilar', - 'Angelique Morse', - 'Selina Boyer', - 'Lawson Bass', - 'Ariana Lang', - 'Amiah Pruitt', - 'Harold Mcgrath', - 'Esperanza Mcintyre', - 'Mireya Conner' -] - -export const _firstNames = [ - 'Mossie', - 'David', - 'Ebba', - 'Chester', - 'Eula', - 'Jaren', - 'Boyd', - 'Brady', - 'Aida', - 'Anastasia', - 'Gregoria', - 'Julianne', - 'Ila', - 'Elyssa', - 'Lucio', - 'Lewis', - 'Jacinthe', - 'Molly', - 'Brown', - 'Fritz', - 'Keon', - 'Ella', - 'Ken', - 'Whitney' -] - -export const _lastNames = [ - 'Carroll', - 'Simonis', - 'Yost', - 'Hand', - 'Emmerich', - 'Wilderman', - 'Howell', - 'Sporer', - 'Boehm', - 'Morar', - 'Koch', - 'Reynolds', - 'Padberg', - 'Watsica', - 'Upton', - 'Yundt', - 'Pfeffer', - 'Parker', - 'Zulauf', - 'Treutel', - 'McDermott', - 'McDermott', - 'Cruickshank', - 'Parisian' -] - -// ---------------------------------------------------------------------- - -export const _prices = [ - 83.74, 97.14, 68.71, 85.21, 52.17, 25.18, 43.84, 60.98, 98.42, 53.37, 72.75, 56.61, 64.55, 77.32, - 60.62, 79.81, 93.68, 47.44, 76.24, 92.87, 72.91, 20.54, 94.25, 37.51 -] - -export const _ratings = [ - 4.2, 3.7, 4.5, 3.5, 0.5, 3.0, 2.5, 2.8, 4.9, 3.6, 2.5, 1.7, 3.9, 2.8, 4.1, 4.5, 2.2, 3.2, 0.6, - 1.3, 3.8, 3.8, 3.8, 2.0 -] - -export const _ages = [ - 30, 26, 59, 47, 29, 46, 18, 56, 39, 19, 45, 18, 46, 56, 38, 41, 44, 48, 32, 45, 42, 60, 33, 57 -] - -export const _percents = [ - 10.1, 13.6, 28.2, 42.1, 37.2, 18.5, 40.1, 94.8, 91.4, 53.0, 25.4, 62.9, 86.6, 62.4, 35.4, 17.6, - 52.0, 6.8, 95.3, 26.6, 69.9, 92.1, 46.2, 85.6 -] - -export const _nativeS = [ - 11, 10, 7, 10, 12, 5, 10, 1, 8, 8, 10, 11, 12, 8, 4, 11, 8, 9, 4, 9, 2, 6, 3, 7 -] - -export const _nativeM = [ - 497, 763, 684, 451, 433, 463, 951, 194, 425, 435, 807, 521, 538, 839, 394, 269, 453, 821, 364, - 849, 804, 776, 263, 239 -] - -export const _nativeL = [ - 9911, 1947, 9124, 6984, 8488, 2034, 3364, 8401, 8996, 5271, 8478, 1139, 8061, 3035, 6733, 3952, - 2405, 3127, 6843, 4672, 6995, 6053, 5192, 9686 -] - -// ---------------------------------------------------------------------- - -export const _phoneNumbers = [ - '365-374-4961', - '904-966-2836', - '399-757-9909', - '692-767-2903', - '990-588-5716', - '955-439-2578', - '226-924-4058', - '552-917-1454', - '285-840-9338', - '306-269-2446', - '883-373-6253', - '476-509-8866', - '201-465-1954', - '538-295-9408', - '531-492-6028', - '981-699-7588', - '500-268-4826', - '205-952-3828', - '222-255-5190', - '408-439-8033', - '272-940-8266', - '812-685-8057', - '353-801-5212', - '606-285-8928' -] - -// ---------------------------------------------------------------------- - -export const _sentences = [ - 'The sun slowly set over the horizon, painting the sky in vibrant hues of orange and pink.', - 'She eagerly opened the gift, her eyes sparkling with excitement.', - 'The old oak tree stood tall and majestic, its branches swaying gently in the breeze.', - 'The aroma of freshly brewed coffee filled the air, awakening my senses.', - 'The children giggled with joy as they ran through the sprinklers on a hot summer day.', - 'He carefully crafted a beautiful sculpture out of clay, his hands skillfully shaping the intricate details.', - 'The concert was a mesmerizing experience, with the music filling the venue and the crowd cheering in delight.', - 'The waves crashed against the shore, creating a soothing symphony of sound.', - 'The scent of blooming flowers wafted through the garden, creating a fragrant paradise.', - 'She gazed up at the night sky, marveling at the twinkling stars that dotted the darkness.', - 'The professor delivered a captivating lecture, engaging the students with thought-provoking ideas.', - 'The hiker trekked through the dense forest, guided by the soft glow of sunlight filtering through the trees.', - 'The delicate butterfly gracefully fluttered from flower to flower, sipping nectar with its slender proboscis.', - 'The aroma of freshly baked cookies filled the kitchen, tempting everyone with its irresistible scent.', - "The majestic waterfall cascaded down the rocks, creating a breathtaking display of nature's power.", - 'The actor delivered a powerful performance, moving the audience to tears with his emotional portrayal.', - 'The book transported me to a magical world, where imagination knew no bounds.', - 'The scent of rain filled the air as dark clouds gathered overhead, promising a refreshing downpour.', - 'The chef skillfully plated the dish, turning simple ingredients into a work of culinary art.', - 'The newborn baby let out a tiny cry, announcing its arrival to the world.', - 'The athlete sprinted across the finish line, arms raised in victory as the crowd erupted in applause.', - 'The ancient ruins stood as a testament to a civilization long gone, their grandeur still awe-inspiring.', - 'The artist dipped the brush into vibrant paint, bringing the canvas to life with bold strokes and vivid colors.', - 'The laughter of children echoed through the playground, filling the atmosphere with pure joy.' -] - -// ---------------------------------------------------------------------- - -export const _descriptions = [ - `Occaecati est et illo quibusdam accusamus qui. Incidunt aut et molestiae ut facere aut. Est quidem iusto praesentium excepturi harum nihil tenetur facilis. Ut omnis voluptates nihil accusantium doloribus eaque debitis.`, - `Atque eaque ducimus minima distinctio velit. Laborum et veniam officiis. Delectus ex saepe hic id laboriosam officia. Odit nostrum qui illum saepe debitis ullam. Laudantium beatae modi fugit ut. Dolores consequatur beatae nihil voluptates rem maiores.`, - `Rerum eius velit dolores. Explicabo ad nemo quibusdam. Voluptatem eum suscipit et ipsum et consequatur aperiam quia. Rerum nulla sequi recusandae illum velit quia quas. Et error laborum maiores cupiditate occaecati.`, - `Et non omnis qui. Qui sunt deserunt dolorem aut velit cumque adipisci aut enim. Nihil quis quisquam nesciunt dicta nobis ab aperiam dolorem repellat. Voluptates non blanditiis. Error et tenetur iste soluta cupiditate ratione perspiciatis et. Quibusdam aliquid nam sunt et quisquam non esse.`, - `Nihil ea sunt facilis praesentium atque. Ab animi alias sequi molestias aut velit ea. Sed possimus eos. Et est aliquid est voluptatem.`, - `Non rerum modi. Accusamus voluptatem odit nihil in. Quidem et iusto numquam veniam culpa aperiam odio aut enim. Quae vel dolores. Pariatur est culpa veritatis aut dolorem.`, - `Est enim et sit non impedit aperiam cumque animi. Aut eius impedit saepe blanditiis. Totam molestias magnam minima fugiat.`, - `Unde a inventore et. Sed esse ut. Atque ducimus quibusdam fuga quas id qui fuga.`, - `Eaque natus adipisci soluta nostrum dolorem. Nesciunt ipsum molestias ut aliquid natus ut omnis qui fugiat. Dolor et rem. Ut neque voluptatem blanditiis quasi ullam deleniti.`, - `Nam et error exercitationem qui voluptate optio. Officia omnis qui accusantium ipsam qui. Quia sequi nulla perspiciatis optio vero omnis maxime omnis ipsum. Perspiciatis consequuntur asperiores veniam dolores.`, - `Perspiciatis nulla ut ut ut voluptates totam consectetur eligendi qui. Optio ut cum. Dolorum sapiente qui laborum. Impedit temporibus totam delectus nihil. Voluptatem corrupti rem.`, - `Distinctio omnis similique omnis eos. Repellat cumque rerum nisi. Reiciendis soluta non ut veniam temporibus. Accusantium et dolorem voluptas harum. Nemo eius voluptate dicta et hic nemo. Dolorem assumenda et beatae molestias sit quo mollitia quis consequatur.`, - `Sed ut mollitia tempore ipsam et illum doloribus ut. Occaecati ratione veritatis explicabo. Omnis nam omnis sunt placeat tempore accusantium placeat distinctio velit.`, - `Eum illo dicta et perspiciatis ut blanditiis eos sequi. Ea veritatis aut et voluptas aut. Laborum eos quia tempore a culpa.`, - `Aut quos quae dolores repudiandae similique perferendis perferendis earum laudantium. Facere placeat natus nobis. Eius vitae ullam dolorem.`, - `Vero dolorem et voluptatem fugit tempore a quam iure. Fuga consequatur corrupti sunt asperiores vitae. Libero totam repellendus animi debitis illum et sunt officia.`, - `Cupiditate illum officiis id molestiae. Numquam non molestiae aliquid et natus sed hic. Alias quia explicabo sed corrupti sint. Natus in et odio qui unde facilis quia. Est sit eius laboriosam aliquid non aperiam quia quo corporis.`, - `Et a ab. Optio aspernatur minus tempora amet vitae consectetur inventore cumque. Sed et omnis. Aspernatur a magnam.`, - `Ipsum omnis et. Quia ea et autem tempore consequuntur veniam dolorem officiis. Ipsa dicta et ut quidem quia doloremque. Sequi vitae doloremque temporibus. Deserunt incidunt id aperiam itaque natus. Earum sit eaque quas incidunt nihil.`, - `Quae consequatur reiciendis. Consequatur non optio. Eaque id placeat. Commodi quo officia aut repudiandae reiciendis tempore voluptatem et. Ut accusamus qui itaque maxime aliquam. Fugit ut animi molestiae porro maiores.`, - `Modi hic asperiores ab cumque quam est aut. Voluptas atque quos molestias. Ut excepturi distinctio ipsam aspernatur sit.`, - `Sunt totam facilis. Quam commodi voluptatem veniam. Tempora deleniti itaque fugit nihil voluptas.`, - `Ipsam aliquam velit nobis repellendus officiis aut deserunt id et. Nihil sunt aut dolores aut. Dolores est ipsa quia et laborum quidem laborum accusamus id. Facilis odit quod hic laudantium saepe omnis nisi in sint. Sed cupiditate possimus id.`, - `Magnam non eveniet optio optio ut aliquid atque. Velit libero aspernatur quis laborum consequatur laudantium. Tempora facere optio fugit accusantium ut. Omnis aspernatur reprehenderit autem esse ut ut enim voluptatibus.` -] diff --git a/src/app/api/_data/_mock/index.ts b/src/app/api/_data/_mock/index.ts deleted file mode 100644 index 0f99637..0000000 --- a/src/app/api/_data/_mock/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './_mock' -export * from './assets' -export * from './_others' -export * from './_wallet' -export * from './_countries' diff --git a/src/app/api/_data/blk-service.ts b/src/app/api/_data/blk-service.ts index 080c666..a123df1 100644 --- a/src/app/api/_data/blk-service.ts +++ b/src/app/api/_data/blk-service.ts @@ -2,7 +2,6 @@ import axios from 'axios' import { ethers, JsonRpcProvider } from 'ethers' import { - USE_MOCK, API3_ENABLED, defaultBalance, BACKEND_API_URL, @@ -12,7 +11,6 @@ import { import { IBalance, IBalances, CurrencyKey } from 'src/types/wallet' -import { _balances } from './_mock' import { cache } from './cache-connection' import TokenPriceFeedsAbi from './_abis/TokenPriceFeedsAbi.json' @@ -61,19 +59,15 @@ export async function getBalancesWithTotals(walletAddress: string): Promise = calculateTotals(balances) const result = { balances, @@ -129,7 +123,7 @@ async function getBalances(walletAddress: string): Promise { const ethRateApi3 = getRateByKey(api3Rates, 'eth') const ethRateApi3Usd = parseFloat(ethers.formatUnits(ethRateApi3.usd, 18)) // API3: no rate in ARS or BRL - // netowrk Main Token + // network Main Token balances.push({ network: network.config.chainName, token: network.config.chainCurrency, diff --git a/src/app/api/_hooks/common.ts b/src/app/api/_hooks/common.ts index f97ee49..d541366 100644 --- a/src/app/api/_hooks/common.ts +++ b/src/app/api/_hooks/common.ts @@ -1,4 +1,3 @@ -// @ts-ignore import useSWR from 'swr' import { useMemo } from 'react' diff --git a/src/app/api/v1/wallet/[id]/transactions/route.ts b/src/app/api/v1/wallet/[id]/transactions/route.ts index c8e1cd1..ec817b8 100644 --- a/src/app/api/v1/wallet/[id]/transactions/route.ts +++ b/src/app/api/v1/wallet/[id]/transactions/route.ts @@ -1,7 +1,5 @@ import { NextResponse } from 'next/server' -import { USE_MOCK } from 'src/config-global' -import { _transactions } from 'src/app/api/_data/_mock' import { geUserTransactions } from 'src/app/api/_data/data-service' import { IErrorResponse } from 'src/types/api' @@ -14,8 +12,6 @@ type IParams = { } export async function GET(request: Request, { params }: { params: IParams }) { - // TODO: Check if id exists in backend - if (!params.id) { const errorMessage: IErrorResponse = { error: { @@ -38,13 +34,7 @@ export async function GET(request: Request, { params }: { params: IParams }) { } try { - let data: ITransaction[] = [] - if (USE_MOCK) { - data = _transactions - } else { - data = _transactions - data = (await geUserTransactions(params.id)) ?? [] - } + const data: ITransaction[] = (await geUserTransactions(params.id)) ?? [] return NextResponse.json(data) } catch (ex) { console.error(ex) diff --git a/src/components/country-select/country-select.tsx b/src/components/country-select/country-select.tsx index a997a3b..0e6a3c9 100644 --- a/src/components/country-select/country-select.tsx +++ b/src/components/country-select/country-select.tsx @@ -3,7 +3,7 @@ import TextField from '@mui/material/TextField' import InputAdornment from '@mui/material/InputAdornment' import Autocomplete, { AutocompleteProps } from '@mui/material/Autocomplete' -import { allCountries } from 'src/app/api/_data/_mock' +import { allCountries } from 'src/app/api/_data/_countries' import Iconify from 'src/components/iconify' diff --git a/src/components/hook-form/rhf-autocomplete.tsx b/src/components/hook-form/rhf-autocomplete.tsx index 2955483..babe182 100644 --- a/src/components/hook-form/rhf-autocomplete.tsx +++ b/src/components/hook-form/rhf-autocomplete.tsx @@ -5,7 +5,7 @@ import TextField from '@mui/material/TextField' import InputAdornment from '@mui/material/InputAdornment' import Autocomplete, { AutocompleteProps } from '@mui/material/Autocomplete' -import { allCountries } from 'src/app/api/_data/_mock' +import { allCountries } from 'src/app/api/_data/_countries' import Iconify from 'src/components/iconify' diff --git a/src/config-global.ts b/src/config-global.ts index c9e8cf3..87e32c6 100644 --- a/src/config-global.ts +++ b/src/config-global.ts @@ -185,3 +185,34 @@ export const tokensByNetwork: { [networkKey: string]: Network } = { } } } + +export const _socials = [ + { + value: 'facebook', + name: 'FaceBook', + icon: 'eva:facebook-fill', + color: '#1877F2', + path: 'https://www.facebook.com/caitlyn.kerluke' + }, + { + value: 'instagram', + name: 'Instagram', + icon: 'ant-design:instagram-filled', + color: '#E02D69', + path: 'https://www.instagram.com/caitlyn.kerluke' + }, + { + value: 'linkedin', + name: 'Linkedin', + icon: 'eva:linkedin-fill', + color: '#007EBB', + path: 'https://www.linkedin.com/caitlyn.kerluke' + }, + { + value: 'twitter', + name: 'Twitter', + icon: 'eva:twitter-fill', + color: '#00AAEC', + path: 'https://www.twitter.com/caitlyn.kerluke' + } +] diff --git a/src/layouts/main/footer.tsx b/src/layouts/main/footer.tsx index fa4f462..aa71c67 100644 --- a/src/layouts/main/footer.tsx +++ b/src/layouts/main/footer.tsx @@ -13,8 +13,7 @@ import { usePathname } from 'src/routes/hooks' import { RouterLink } from 'src/routes/components' import { useTranslate } from 'src/locales' -import { _socials } from 'src/app/api/_data/_mock' -import { BOT_WAPP_URL, CONTACT_EMAIL } from 'src/config-global' +import { _socials, BOT_WAPP_URL, CONTACT_EMAIL } from 'src/config-global' import Logo from 'src/components/logo' import Iconify from 'src/components/iconify' diff --git a/src/sections/auth/jwt/jwt-login-view.tsx b/src/sections/auth/jwt/jwt-login-view.tsx index 0319c94..e7c9198 100644 --- a/src/sections/auth/jwt/jwt-login-view.tsx +++ b/src/sections/auth/jwt/jwt-login-view.tsx @@ -27,7 +27,7 @@ import { getRecaptchaLng } from 'src/utils/format-number' import { useAuthContext } from 'src/auth/hooks' import { useLocales, useTranslate } from 'src/locales' -import { allCountries } from 'src/app/api/_data/_mock' +import { allCountries } from 'src/app/api/_data/_countries' import { PATH_AFTER_LOGIN, RECAPTCHA_SITE_KEY } from 'src/config-global' import FormProvider, { RHFCode, RHFTextField } from 'src/components/hook-form' diff --git a/src/sections/auth/jwt/jwt-register-view.tsx b/src/sections/auth/jwt/jwt-register-view.tsx index 5e58a3c..003c97c 100644 --- a/src/sections/auth/jwt/jwt-register-view.tsx +++ b/src/sections/auth/jwt/jwt-register-view.tsx @@ -18,7 +18,7 @@ import { RouterLink } from 'src/routes/components' import { useTranslate } from 'src/locales' import { BOT_WAPP_URL } from 'src/config-global' -import { allCountries } from 'src/app/api/_data/_mock' +import { allCountries } from 'src/app/api/_data/_countries' import FormProvider, { RHFTextField } from 'src/components/hook-form'