From 2fad0844853bfe539d4a43da19e7f613fd475889 Mon Sep 17 00:00:00 2001 From: Lou-Kamades Date: Tue, 25 Jul 2023 10:53:30 -0500 Subject: [PATCH] feat: add open orders as a search option for accounts --- components/search/SearchPage.tsx | 7 ++++++- public/locales/en/search.json | 3 ++- public/locales/es/search.json | 3 ++- public/locales/ru/search.json | 3 ++- public/locales/zh/search.json | 3 ++- public/locales/zh_tw/search.json | 3 ++- yarn.lock | 31 +++---------------------------- 7 files changed, 19 insertions(+), 34 deletions(-) diff --git a/components/search/SearchPage.tsx b/components/search/SearchPage.tsx index d5b6e1c7..5e894110 100644 --- a/components/search/SearchPage.tsx +++ b/components/search/SearchPage.tsx @@ -21,6 +21,7 @@ const SEARCH_TYPES = [ 'mango-account-name', 'profile-name', 'wallet-pk', + 'open-orders-pk', ] const SearchPage = () => { @@ -33,7 +34,11 @@ const SearchPage = () => { const [isAccountSearch, setIsAccountSearch] = useState(true) const handleSearch = async () => { - if (searchType === 'mango-account' || searchType === 'mango-account-name') { + if ( + searchType === 'mango-account' || + searchType === 'mango-account-name' || + searchType === 'open-orders-pk' + ) { setIsAccountSearch(true) } else { setIsAccountSearch(false) diff --git a/public/locales/en/search.json b/public/locales/en/search.json index 859a8564..e8e96472 100644 --- a/public/locales/en/search.json +++ b/public/locales/en/search.json @@ -10,5 +10,6 @@ "search-by": "Search By", "search-for": "Search For", "search-failed": "Something went wrong. Try again later", - "wallet-pk": "Wallet Address" + "wallet-pk": "Wallet Address", + "open-orders-pk": "Open Orders Address" } \ No newline at end of file diff --git a/public/locales/es/search.json b/public/locales/es/search.json index 859a8564..e8e96472 100644 --- a/public/locales/es/search.json +++ b/public/locales/es/search.json @@ -10,5 +10,6 @@ "search-by": "Search By", "search-for": "Search For", "search-failed": "Something went wrong. Try again later", - "wallet-pk": "Wallet Address" + "wallet-pk": "Wallet Address", + "open-orders-pk": "Open Orders Address" } \ No newline at end of file diff --git a/public/locales/ru/search.json b/public/locales/ru/search.json index 859a8564..e8e96472 100644 --- a/public/locales/ru/search.json +++ b/public/locales/ru/search.json @@ -10,5 +10,6 @@ "search-by": "Search By", "search-for": "Search For", "search-failed": "Something went wrong. Try again later", - "wallet-pk": "Wallet Address" + "wallet-pk": "Wallet Address", + "open-orders-pk": "Open Orders Address" } \ No newline at end of file diff --git a/public/locales/zh/search.json b/public/locales/zh/search.json index fae06e7b..17239662 100644 --- a/public/locales/zh/search.json +++ b/public/locales/zh/search.json @@ -10,5 +10,6 @@ "search-by": "搜寻方式", "search-for": "搜寻", "search-failed": "出错了。稍后再试。", - "wallet-pk": "钱包地址" + "wallet-pk": "钱包地址", + "open-orders-pk": "Open Orders Address" } \ No newline at end of file diff --git a/public/locales/zh_tw/search.json b/public/locales/zh_tw/search.json index 0548c988..eca01fef 100644 --- a/public/locales/zh_tw/search.json +++ b/public/locales/zh_tw/search.json @@ -10,5 +10,6 @@ "search-by": "搜尋方式", "search-for": "搜尋", "search-failed": "出錯了。稍後再試。", - "wallet-pk": "錢包地址" + "wallet-pk": "錢包地址", + "open-orders-pk": "Open Orders Address" } \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 4c992be7..7dd39b8b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5006,7 +5006,7 @@ fast-equals@^4.0.3: resolved "https://registry.yarnpkg.com/fast-equals/-/fast-equals-4.0.3.tgz#72884cc805ec3c6679b99875f6b7654f39f0e8c7" integrity sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg== -fast-glob@^3.2.12: +fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.3.0" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.0.tgz#7c40cb491e1e2ed5664749e87bfb516dbe8727c0" integrity sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA== @@ -5017,17 +5017,6 @@ fast-glob@^3.2.12: merge2 "^1.3.0" micromatch "^4.0.4" -fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -6423,12 +6412,7 @@ nan@^2.14.0, nan@^2.14.2: resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== -nanoid@^3.3.1, nanoid@^3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== - -nanoid@^3.3.6: +nanoid@^3.3.1, nanoid@^3.3.4, nanoid@^3.3.6: version "3.3.6" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== @@ -7489,16 +7473,7 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve@^1.1.7, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.22.2: +resolve@^1.1.7, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.22.2: version "1.22.2" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==